drupal

How to additionaly filter list of published nodes in Drupal 6

I need to adjust the way which a content is determined as published or not published. The editor of particular content (this is a separate non-administrative role) should have a possibility to set the published flag for particular node (it can be achieved using Override Node Options module directly or by implementing it's techniques). He...

Drupal: how to see the query when the node is created or any content type is created

I want to know the insert query when the content is created or any node is created. What is a simple example for that? The main purpose of doing this is I want to log the entries when the node is created. So I have created a history content. When the user creates certain type of content, I have inserted his/her details in to the table...

drupal what does vid mean in drupal

i m completly newbie to drupal i have designed a view and when i see the query in preview section SELECT node.nid AS nid, node_data_field_crm_history_brokerid.field_crm_history_brokerid_value AS node_data_field_crm_history_brokerid_field_crm_history_brokerid_value, node.language AS node_language, node.type AS node_type, node.vid AS...

Drupal reserve checkbox module?

Hey, I have a drupal site I'm working on here: selkirk.treethink.net I have CCK and Views modules installed, so on the frontend you see the Request Work page created using CCK. On the backend admins and students can view all the work post through that form with the Views module. I need to add a checkbox that the person submitting the...

What's the drupal way to define global constants?

I'm creating a custom "glue" module for my site, and I want to define a path to another site as a global constant. Is there some drupal way to do it beyond putting a define() statement at the top of my module? ...

Using the simpletest automator in Drupal 6.

I've been trying to learn how to use simpletest, and I found the simpletest automator. I was able to install it and run it, but where is the file with the results of the 'macro' saved? I haven't been able to find it. Also, is there a quick way to duplicate a drupal install in simpletest? I know it starts from a clean install, but I d...

Fixing problems on a site that only breaks on IE7

I did a new Drupal theme for my site based on the Zen theme. Since I am on Windows 7, I did testing with IE8, Firefox 3.5, and the most recent version of Chrome. The site looks great in all of those, but I just found out that it breaks on IE7. Unfortunately there is no way to put IE7 on Windows 7, so I'm at a loss for how I am going to f...

Drupal Array of Inputs

I have a drupal form where users are entering a list of names (via textfields) and I'd like for them to be able to enter as many as they want. Is there some way to make an "input array" with drupal? Any ideas for using Ajax or Ahah to do this? ...

Drupal: fieldgroup_view_group to print multigroup in block

I'm trying to use the fieldgroup_view_group function to print a multigroup inside a block. The fieldgroup_view_group function looks like this: <?php function fieldgroup_view_group($group, &$node, $teaser = FALSE, $page = FALSE) { $group_name = $group['group_name']; $field_types = _content_field_types(); // Clone the node to pre...

Hacking into the Drupal Login

Hello All, I am very experienced with PHP etc but a Drupal newbie. I would like to know if there is a way I could put in some additional PHP code once a user has logged in to a Drupal site. The reason I need to do this - to update fields in a different database (not the MySQL Drupal DB). I would need to have access to the Drupal site lo...

Drupal: How to get a CCK field value when inserting a node?

I'm working on a registration system where someone can enter the number of participants they will be bringing in a CCK field. I want to, whenever a node type with that CCK field is added, grab the value of that field, then add it to a variable value I have in my variables table. Is the CCK value inserted into the field's table in the db...

drupal 6 can any one tell me how to write a query to insert into the content type

i have created a content type named history when ever users want to opens specific page the content history should be inserted with new row. i m using rules but stucked with query can any one help me please very urgent guys. i have written a simple query to insert the data it even works but the problem wheni fetch the data in view it ...

How can I add an onmouseover event to all drupal forms?

I want to add an onmouseover event to the submit button of all forms on my drupal site. How can I do this? Ben ...

Drupal hook priority

I'm using drupal 6.15 with ubercart 2.x and I'm trying to implement ubercart's hook_checkout_pane() to override their default uc_cart_checkout_pane(). I made a function my_module_checkout_pane() in my_module.module and it does get called but the uc_cart version seems to be generating what's actually rendered. I understand why both func...

Drupal: How to retrieve parent page's $node variable in a block using module_invoke()?

Hi, I'm using module_invoke() to include a block and I need in this block to read a value contained in my parent content type page. So how can I get the $node variable in my block from the view? Code I'm using: <?php $block = module_invoke('my_blocks', 'block', 'view', 7); print $block['content']; ?> Now I need to access $no...

How can I programmatically store an image in a publicly accessible location on my Drupal site?

Hi, I am writing a Drupal module where users send down content (formatted as HTML). The content will almost always include <img> tags. Those tags will reference the user's server. But, I don't want to hit the user's server every time that content is requested; I want to serve up a version on my server. So, I have written a function ...

Attach class to menu item based on content type in Drupal

I have seen a few functions that allow one to attach classes/ID's to menu items; unfortunately, none of them apply to my use case. What I want to do is assign a class/ID to any menu item based on the content type of the linked item. For example, I have a content type called "Internal" which is only displayed if the viewer is within the ...

Using drupal batch api with services

I have a drupal app that needs to publish out some of it's content - there is a flash wysiwyg front end that communicates with a drupal backend through the services module. The user can upload images / video, places and manipulates them in flash, and when they are done will export out a static version. As part of this export process th...

Drupal Ajax: Passing values by url vs data param

What is the difference between using: $.ajax({ type: 'POST', url: Drupal.settings.basePath + 'module/get/' + node, dataType: 'json', data: { 'ajax' : true } }); versus: $.ajax({ type: 'POST', url: Drupal.settings.basePath + 'module/get', dataType: 'json', data: { 'ajax' : true, 'node' : node } }); In the first case ...

problem with Search module in drupal

hi! I've problem with the search module in drupal. When I do a seach, it return 0 results even-though there are patterns matching. I ran the cron manually and flushed the cache. Now, the search module works fine. I wanna know whether I should do this procedure regularly for the search module to work? thanks. ...