drupal

Drupal $_SESSION issue (value not being retained)

I have 2 php files that are being used to set and retrieve a very specific session variable. The initial script sets the value like: require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION); if(($_POST['region'])){ $_SESSION['region'] = $_POST['region']; print '1'; }else{ print '0'; } an...

Drupal trigger on Session-timeout

Is there a way to set up a Drupal trigger to fire off on Session time out? I've seen iTweak login, but that trigger only fires if the user has clicked/visited logout. I need something to fire even if they hold the power button and hard shut their PC. Is there a Drupal solution for this out there? ...

Multiple node reference, display the original node as many as node reference

I have 2 custom type made with CCK : Reunion Title Description Node reference to Guests (multiple) Guests Name Picture Biography In Reunion I have a multiple node reference to Guests. (I can have multiple Guest in Reunion). I would like to print (using views) like this : Reunion 1 Description of the reunion 1 Guests : * G...

Is it possible to take a Drupal site offline using Drush?

Is it possible to take a Drupal site offline using Drush? ...

Setting up Drupal and Wordpress under a single document root

I have a hosting account which provides me a folder to publish my files for my domain (say www.example.com). I have set up Drupal for www.example.com with .htaccess at the top folder to enable clean-urls for the Drupal installation. Now I want to have a Wordpress installation under www.example.com/blog/ and have clean URLs for that blog....

What are the differences between dpm() and dsm()?

What are the differences between dpm() and dsm()? ...

Drupal Rules - Reference

Hello, I need to create something like this. Have several nodes ( NODE A ) with: C++, PHP, PLSQL, JAVA, etc... ( in each node ) And for, each one of these nodes i will have something like (NODE B): 1 - medium skills; 2 - good skills; 3 - guru; I have a reference field in (NODE B) to (NODE A) but i have always to create the same refe...

CCK fields disappear from Content type

Sometimes, during period of high traffic on sites, CCK input fields disappear while adding a content from the backend. I haven't enabled the throttle module. The fields are restored automatically at other times. For example - field for image upload, checkbox for featured for a content type News disappear during heavy traffic but get au...

Drupal Site accessible to Mobile

I have some 20 sites with common codebase and database via Drupal Multisite installation. Whats the best way to make a multisite Drupal installation also accessible via mobile. For example, I have sites like www.abc.com, www.cde.com, www.fgh.com etc all poiting to same codebase and a common database of a Drupal multisiste installation w...

Issues in hook_form_submit() in IE browser

i have a custom module with a form I have implemented form hooks like this hook_form() hook_form_submit($form, &$form_state) When i have a print statement in _submit it doesnt show on the screen , but which works fine in mozilla firefox . In IE _submit is only not getting called , am using drupal_render to render each form elements in...

drupal 6, merging two content types in a view(2.0) results

I am building a site for research oriented company. and having problems showing fields from two different content-types into one view without duplicating node (titles). To be specific. I have a content type called as 'Articles' where all the information like title, teaser, body, year, image will be stored. and another content type by na...

Drupal web forms that can be half-filled and remember my input when I come back

Drupal's webform module is awesome for building forms, but since my form is very long, I'd like my users to be able to: Fill in some data, Save them (without submitting the form) Do something else and finally Come back after some time to fill in the rest of the data and submit. Is there a way to do this? I suppose this is a common ...

Why is Drupal not aware of my template file?

Hi there, this is a question how to override themable items in Drupal 6. According to the book "Pro Drupal Development", we can override themable items in two ways: overriding via Theme functions overriding via Template files So for example, in order to reformat the breadcrumb, I can: via function theme_breadcrumb($breadcrumb) v...

How to get drupal custom profile values ?

Hi, There is a checkbox added in user profile form, subscribe to daily newsletter. I want to get list of users who have subscribed (checkbox ON) and send them daily newsletter. How can I do this in drupal-6. (1) to get list of all subscribed users (2) Send them Email. If you can explain at code level, I 'll really appreciate that. ...

Customize TinyMCE using Drupal's WYSIWYG module

Hi there, I am looking to create a custom button on the TinyMCE toolbar that wraps the currently selected content in a div with a class. I am using drupal 6.19 with wysiwyg-dev and TinyMCE 3.3.9.2. Sample text: <h3>Heading</h3> <p>Sample text</p> <ul> <li>item 1</li> <li>item 2</li> </ul> <p>more text</p> Sample text that has ...

Downgrading PHP version on Drupal Test Server

I have several live Drupal sites running on an Ubuntu server (10.04), Apache 2.2 with PHP 5.2.3-1. I recently started the work of setting up a test server that would be as close as possible to the live environment, but I stupidly didn't check the PHP version that Ubuntu installed when I did an apt-get install php. I've now had my test se...

Running Drupal application on a webfarm (scalability ) , HOW?!!!

Hey everyone, We have created a website using Drupal , but the problem ( good problem ) is that we are getting WAAAAYY too many hits on the server to the point where the traffic is brining the server down to its knees. now we want to run the application off of 3 servers behind a load balancer, one to just serve mysql and the other 2 ...

Really weird behaviour when printing a date with php and drupal

So i'm just trying to print day month and year (not printing actually, i'll compare then with some dates that are in the database, but printing is testing), so my code looks like this: print($now = format_date(time(), "custom", "Ymd")); print(' '); print( substr($now, 0, 4)); //year print(' '); print(substr($now, 4, 6)); /...

Drupal theme() function and custom template

I have a custom module that returns data from a web service call. It comes back from an XML response, which I am converting to an array. Once I have the array, I do: $output = theme('search_srs_results', $data); return $output; But I am getting a white screen. No apache/php/watchdog errors. I've done this before in another module wi...

Druapl views & to do list

Hi All, Wondered if anyone can tell me whether the following is possible within views. I have installed To do module - http://drupal.org/project/to_do I then created my own view which lists all the tasks created in a particular Organic Group, which works lovely. One of the fields ive added as the to do button field which gives the us...