drupal-module

How to work with hook_nodeapi after image thumbnail creation with ImageCache

Hi all, A bit of a followup from a previous question. As I mentioned in that question, my overall goal is to call a Ruby script after ImageCache does its magic with generating thumbnails and whatnot. Sebi's suggestion from this question involved using hook_nodeapi. Sadly, my Drupal knowledge of creating modules and/or hacking into e...

Drupal DB Query

Hi, I have a problem with a custom query in drupal: $brief = db_query("SELECT * FROMdr_wiwe_profile_valuesWHEREfid= 16 ANDuid= 266"); This query returns resource(286) of type (mysql result) resource(562) of type (mysql result) . What is wrong with my query? ...

Saving drupal webform data to a database

Hello, Im using Drupal version 6.19 and the webform module in Drupal to create forms.I have two forms on my site.When the user submits the form, where in the drupal database are the entries saved for each form ? Please help Thank You ...

Theming Webform in Drupal

I'm trying to theme my webform but I can't seem to get the new webform_form_#.tpl.php to load properly. When I go to the node page I get a blank page on firefox with an empty body. So in Template.php i've added the following line (my webform is on node 4) function phptemplate_webform_form_4 ($form) { return _phptemplate_callback('web...

Drupal 6 Form Api adding an item to an existing form.

Please delete duplicate question ...

Drupal 6 Form Api adding an item to an existing form.

I want to add a new item into an existing form. I have the ID of the form and I know I need to use hook form_alter but not sure how to add it. function modulename_form_alter(&$form, $form_state, $form_id) { switch ($form_id) { case 'form id goes here': // Need to do something here.... break; ...

Drupal 6 editing the submit function on a content type

I have a content type and I wish to edit the submit function. I thought the way you would do this would be as follows: function moduleName_contentType_node_form_submit($form, &$form_state){ drupal_set_message(t('Test')); } I cleared the cached but the message is not being displayed on the screen. Am I doing this correctly or do I ...

Drupal 6 getting the node title from a submitted form

I am using form_alter to edit the submit function when editing content. In my custom function I wish to edit a custom message to the screen with the title name. I thought a way I could do this is something as follows function mymodule_myfunction(&$form) { drupal_set_message(t('Some text ' . $form['#node']->title)); } The title is ...

Globally filter the whole site by tag

Hello! I am looking for an easy way to allow visitors of our Drupal 6-based website to filter all displayed obejcts globally by a tag from a given taxonomy ("featured topics"). This way a user could eg. select the tag "marketing" from a drop-down-list, which is located somewhere near the navigation, and the system would filter all pages...

Is there an easy way to import Drupal Advance Forum to BuddyPress forum?

I want to migrate my Drupal community to Wordpress + Buddypress. After struggling for a while I was able import Drupal blog to Wordpress but I also want to import Drupal forum to BuddyPress forum. Is there any easy way for that? Thanks. ...

Problems fetching node content

Hi, I am writing a small custon page where I execute db query. It also retursn results. But not the node content. How do I load the node content? This is my current code: ` $result = db_query('SELECT node.nid AS nid, node.created AS node_created FROM dr_wiwe_node node INNER JOIN dr_wiwe_term_node term_node ON node.vid = term_nod...

Friendly URL in Drupal to a PDF that is buried deep in a module?

I have a PDF burried in a module (sites/all/modules/mymodule/pdf/userguide.pdf)....how do i make it a friendly url like (sitename.com/mymodule/userguide.pdf) ? ...

How can I make a page created be editable only by user that created the page?

I have created 2 users. Page created by user1 shouldn't be editable by user2. Also in Administer->content section, each user can view only his own content. ...

how can one override default registration email in a hook form alter registration?

The main site sends a registration email and I do not want that email to be sent to this new registration as it should have its own custom email. I am having a hard time with this because every time a user registers either on main registration or this custom registration, they get the same mail. How can i keep my custom registration mail...

Problems with drupal Database Query

Hello, i try to fetch a result with this request, which works in phpayadmin: $result_med = db_query("SELECT node.nid AS nid, node.created AS node_created FROM dr_wiwe_node node LEFT JOIN dr_wiwe_content_type_classified node_data_field_classified_valid_till ON node.vid = node_data_field_classified_valid_till.vid WHERE ((node.typ...

append data in user global variable?

Is there any way that i can append my data into user global variable so i can access it on other pages? ...

How to add a disclaimer above the comments form?

I'm looking for a good, standards friendly way to alter the default comments form, such that there is a disclaimer immediately below the "Reply" header. I only want this disclaimer to appear above the comments form itself, not meerly when viewing comments. This thread ( http://stackoverflow.com/questions/2644483/drupal-adding-disclaimer...

Drupal Views: How can I log searches ?

Hi ! Is there a module that allows me to log all the searches made on a view ? Thanks ! ...

Drupal get database configuration

Is there any function preserved to extract database configuration inside of my code, something like $db_user = drupal_get_dbuser(); $db_pass = drupal_get_dbpass(); ... ... ...

What can I check for in module building to ensure no crashes in drupal

Hello guys, I have a quick question I am currently running a test site of Drupal. I have a module that was written and supported for versions up to 6.16 the test site that I would currently like to use this module in crashes when I enable the module. I would like to know what basic elements can I look at to ensure that the code is comp...