drupal-6

How can one display local time and date to my drupal website visitors depending upon their geographic location?

I need to display the FIFA world Cup 2010 schedule on my Drupal website. But what I want is that each visitor should be able to see the time for the upcoming matching as per his/her own geographic location . How can this be done ?Any suggestions would be welcomed. Thanks for reading this through. ...

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. ...

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 ...

how to know if user is seeing home page or not?

Hey guys, today i was doing some java script coding, in that i need some images only appear on my home page. so how can know that if user is seeing the home page or not? or i do this with url check up? is their in built function check in drupal 6? ...

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 6: Creating "ON/OFF News Links" functionality for a block created with View Module.

Hi friends, I'm a drupal newbie who needs some advice... I have a news list block at homepage, created with View Module. It is listing all added news' title and link. Everything is cool so far. Now I need to add an ON/OFF option at admin side for homepage news block. When the setting is ON, it will work as it is. When it is OFF, only t...

how to remove node index when delete a node

Hi All: When I am remove a node from drupal , I also am want to remove index for that node. how can I do that. I am use drupal 6. ...

Can i set two different kind of actions on one form?

Hey guysi was making one web sites. in that, there is one page on which i have one form, so in thati want two thing done on same data.1) it should store in the database 2) that form data should also to be send on one email account. i know i can do this if i use "mail" function of php and on that same php file, i can store that. but i d...

Drupal get a CKK field from a node object

I am using the Rules module to send an email. I need to include a CCK field from my node in the email. The rules module provide a $node object. How do I get from this object to my field so I can output it in the email? ...

Drupal Exposed Views Filter custom date

I have a date filter that I have exposed on my view. I want to make the interface more user friendly and tighten up the look of it. Instead of selecting a date I would like to select from the following options. The last day The last week The last year All This would then filter on the date field. Is this possible? How would you go ab...

Add login / logout to drupal menu that's not a primary or secondary menu

Hello, Im trying to append an item to a menu that I created. I know its get the primary and secondary menus using "menu_secondary_local_tasks()" etc, and then add items within preprocess page. How would I go about this with a menu that I created? Here is the code I am using to check is the user is logged in... function themeName_chec...

how to add multilingual feature for site information in drupal using i18n

i want to add multilingual feature for slogan and mission in the drupal site information. I tried adding: $conf['i18n_variables'] = array ( 'site_name', 'site_slogan', 'site_mission', 'site_footer', 'anonymous' ); to settings.php, but that is not working. I am using drupal 6.17 ...

Drupal 6: getting CCK field value with php in a Block by View Module...

Hi friends, I'm a drupal newbie (mean it :) I have a Block, created with View Module. and this block content has CCK fields. I display any of field with Fields Box in View Module. It's cool. the issue is, one of the CCK field has a condition value for linking at homepage or not. So I need to get the value of field_homepage_linking CC...

Drupal, template.php where do the $form names come from ?

hi, I want to customize my Drupal back-end forms. I'm using template.php file.. i.e. $form['menu']['#collapsed'] = true; $form['author']['#collapsed'] = true; $form['buttons']['#weight'] = 100; But I was wondering from where the section names (menu, author, buttons), come from. (They are not id or classes in html code, so I g...

Drupal: make a section invisible

is there any way to make a section invisible from template.php in drupal ? Something like: $form['name'] = array( '#visibility' => 'hidden', ... thanks ...

Drupal: customizing modules question

hi, I've a question about how to customize drupal modules avoiding hacks. Let's say I've downloaded Lightbox2 module and I want to change the javascript file to display differently my lightbox. At the moment I'm modifying the Lightbox2 module, so I cannot update it anymore, so I know it is not the best practice. I was wondering if I ...

How do I replace the "node view" screen in Drupal 6?

I have no need for the node "view" screen/tab for certain types of content. Instead, when a user goes into /node/nid I wish to show the node edit form. Any ideas on how I do that? thanks, Omer. ...

Drupal htaccess redirect - all files in directory to new directory

Hiya, I've moved a site to Drupal, but am now getting a lot of 404 errors due to the search engines taking their time to update the indexes. The 404 paths all look similar to this: recipedata/ccp1300006/633_L.jpg recipedata/ccp1500005/risotto.jpg recipedata/ccp1500006/haddock.jpg So I'd like to do some htaccess redirection with mo...