drupal

Drupal Features include Theme

Is it possible to include a theme in a Drupal Feature? if so how? ...

Using nodereference + views to create combined view

I'm trying to set up a relational View but not sure how to do it. Here's an example of what I'm going for using the node types Artist and Song. Artist Song Length Bob Dylan Like a Rolling Stone 2:00 Bruce Springsteen Atlantic City 4:00 Burce Springsteen Born to Run ...

Hook perm for more than one content type

Drupal 6.x I have this module that manages four different content types. For that matter, how do I define permission for each content within the same module? Is that even possible? I can't figure out how to define permission for each content type cuz hook_perm has to be named with module name and it doesn't have any argument(like hook_a...

How do i create a view that can filter unique titles from a checkbox?

I'm currently creating a view in Drupal that contains a number of fields. What I want to do is to create an exposed filter that is able to filter duplicate titles. The filter would be a checkbox. This is an example of the list NAME TIME RACE DISTANCE John Doe 2.07.54 Boston Marathon 42km Ja...

Adding Refresh Tag to View

I need a view to refresh automatically every 20 seconds, and have added the following code to the view header via the views GUI - with no success. The code (or portions of it) are simply displayed on the view and no updating is performed. I've tried omitting both and just the ending ?php statement. If someone can tell me the proper code ...

Product Kit does not save the selected products!

Arg! When I save my product kit, with several product selected, I land on a blank product kit node (as in no sub products). The message confirms the update, however when I return to the node edit page the products are no longer selected, hence the blank kit node page. Thoughts on debugging this, or what might lead to it? ...

Drupal: set active class on primary links menu depending on path or content type

Hi there, I have some styling based on the primary links active class. I would like to set the class of a link in the primary links to active (<a class="active"...>) based on either the content type or the path. I have already done some research on this but haven't yet seen anything that seems to match my query. Would be grateful for ...

Drupal pass argument to page

I have a custom Drupal module displaying some data in a table. Each row has a link which if clicked will delete the relevant row. Specifically, when the link is clicked it will take the user to a confirmation page. This page is really just a drupal form which says 'are you sure' with two buttons: 'Yes', 'No'. I figure I will need to p...

PHP throws 'Allowed memory exhausted' errors while migrating data in Drupal.

I'm trying to setup a tiny sandbox on a local machine to play around with Drupal. I created a few CCK types; in order to create a few nodes I wrote the following script: chdir('C:\..\drupal'); require_once '.\includes\bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); module_load_include('inc', 'node', 'node.pages'); $node = arr...

Drupal Autoresponder with Token Module

Hi All, I'm using Drupal autoresponder module - and I want to use tokens so I can include the username who has subscribed within the emails being sent... Does anybody know how this can be achieved? Thanks for any help. Shane ...

Need help with drupal, ubercart and a module hook on product load

Hi, I am trying to make a module that works with ubercart. What I need to know is how do I hook into the loading of a product. I want to modify some of the data slightly before any output. Thanks ...

How to override form just on one page?

OK so this is my hook form alter function.It is causing all the registration forms on site to be over written which I do not want as I just want it on this page. function special_registration_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'user_register') { drupal_set_title(t('Custom registration')); $form['fir...

How does one control select lists using form API ?

I know this is somewhat of a newb question but I am running into a deadline and 3 days of Drupal experience will just not cut it... $form['gender'] = array('#type' => 'select', '#title' => t('Gender: *'), '#options' => array(t('Male'), t('Female')), '#required' => TRUE, '#weight' => 2, ); How do I assign values to select values ? For e...

Most efficient way to have a 50 state drop down box in Drupal Forms

I know that one way is to have a table in database with all the states and then you would read it in your form. Is there any easier way in your opinion guys ? I feel bad asking for something like this since it is so elementary however I would suppose something as simple like this would already be implemented in Drupal. ...

How can I create The Oatmeal like quizzes (http://theoatmeal.com/quizzes) using Drupal module quiz ?

Hi, I am trying to create quizzes which are kind of like the ones found here : http://theoatmeal.com/quizzes on my drupal site. I am trying to use drupal's quiz module ( http://drupal.org/project/quiz ) Basically everyone answer, in every question, in a quiz will have some particular weightage. Say answer 1 will have 2 marks, ans two w...

What is the opposite of Access Callback user_is_anonymous?

I know that is used in a drupal module to specify that only anonymous users can see that module. What would be the callback that specifies only logged in users ? I have a page that I only want accessible to logged in users. Thank You ...

"Connection timed out" error on a deploy with deployment module

Locally deploying content between two site instances works fine. It's when moving one instance to a remote server that gives me the following error message: Module : login Description : Remote user Result : Error Message : Connection timed out My apache access log entries are: ./node_operations/deploy_now/86 HTTP/1.1" 302 ./admin/build...

Hide other domains' menus from node edit form on a Drupal site using domain access

I'm in the process of making some improvements to a live Drupal site that's using the Domain Access module to run a number of microsites. I'm trying to find a way of restricting the menus a user can post content to from the node edit screen. A user on one of the domains should only be able to post content to menus associated with that d...

Removing the navigation menu from the node menu settings in Drupal

How do you remove the "Navigation" menu (and others) from the menu settings on the node edit form? I suspect this can be achieved somehow using a hook like module_form_alter, but am not sure how to implement it. The motivation for this is to remove the confusion our users have when menus other than the standard primary links menu is in t...

drupal multiple interest of user

hi i want to refresh user page with different data but with same template (user-profile.tpl.php) by simply clicking tabs. Can any one suggest the best way to do that ?. for ex: tab1:sports , tab2: music tab3: literature by clicking tabs the template is same but the data is going to refreshed. Note: Look like profile categories but n...