drupal

Possible to save a node using a multi-step form?

I'm building a Drupal based site that requires the communication of a node ID to a seperate web service. This web service handles the uploading of files to a seperate server (from the one Drupal is on). This creates a problem where in if I create a new node, the Node ID is not generated until the form is submitted - meaning I can't att...

Drupal - Including more than one user_profile_form on a page?

Edit: So, I've been working on this for hours now... I think it's because the action is the same or something... I tried to modify the action using this: function mytheme_user_profile_form($form) { global $user; $uid = $user->uid; //print '<pre>'; print_r($form); print '</pre>'; $category = $form['_categ...

Calling custom PHP inside Drupal

Drupal version 6.12 I have a page whose input format is PHP. I simply want to update a database table. The SQL code appears to be too complex for db_query. I can not make db_query work nor does including php nor does dropping custom php code into the “Body” seem to work either. Any advise on how I can make the following code work in...

drupal - override form action?

I originally started this question in another thread, but that thread was sorta, kinda answered, and now I primarily want to know how to specify another form action... I tried using the code below, but the form action, when output, remains unchanged, although looking at the print_r($form), it's correctly changed... Why isn't it picking ...

Drupal: Views titles

I have a View that outputs a page. Under Basic Settings I set a "title". When I load the page, I see that title as the page title (at top of the browser) - all good. How can I print this value out in the "Display output" .tpl file? The $title variable doesn't seem to hold any value here. Do I need to use a preprocess function? Thanks ...

Drupal allow anonymous comments

I'm trying to allow comments by anon users but the add comment form, "add comments" title etc is not showing. For logged in users it's showing perfectly. I've allowed comments by anon users in the permissions page (not specific to a content type), comments are allowed for the specific node and "Anonymous posters may leave their contact ...

Drupal View/Block not displaying

Another Drupal question: I have a View of type Term that outputs a block. It shows taxonomy items from a single vocabulary and the Preview of the View shows this content correctly. Whatever region I assign this block to, nothing displays. I've set a title and empty text in the View but those don't show either. I created several blocks t...

Creating custom CCK Field Types in Drupal

I've been trying to get this module to work and no matter what I've tried I can't seem to get this to show up in the "Add Field" selection box, full code is over here: http://drupalbin.com/11854 The gist follows, I have the following hooks implemented: function uc_product_content_install() { } function uc_product_content_uninstall()...

Favorite Drupal tips or best practices?

Just wondering what tips or tricks you guys might have to share. As always with posts like this, please only one tip per post so they can be voted on independently. I'll start: however you do your theming, you can use the mothership theme as a base theme for your theme to inherit from so that your markup will be a lot cleaner and less v...

Add Openid module in drupal 4.7.x

Can any one please tell me the steps to be followed or how to configure and also to add Openid module in drupal 4.7.x. It would be great if i can get detail steps of adding & configuring it as i am very new to this. Please help me. Ok now i am getting both Openid login form & as well as User Login form of Drupal 4.7 in the same page. ...

How to configure or add OpenId login form with User Login form of Drupal 4.7

I am getting both Openid login form & as well as User Login form of Drupal 4.7 in the same page. Can we show as i shown below. Please anyone help me in this... User Login Log in using OpenID: ( Labels) Username: * ( Labels) Log In ( Button) Cancel OpenID login ( Links) Create New account ( Links) Request New Password ( Links) ...

Drupal installing another language

I Downloaded the http://ftp.drupal.org/files/projects/nl-6.x-1.5.tar.gz file from Drupal Translations page. The readme file says to "Copy (merge) the content of this translation package into your Drupal installation root directory". If i look at the package it has a few text files and a modules, profiles and themes folders. If I copy th...

How to use AJAX in DRUPAL

I want to implement AJAX in DRUPAL 4.7 as I am beginner in Drupal can any one help me in this, it would be great if I get a snippet of Code. Actually in a page I have list of items is being there using pagination it is being accessed, but everytime when I click on the next button it relaods the page, Since in the same page I have other ...

not able to 301 redirect url in drupal

i am trying to redirect an url from location a to b using .htaccess with the following code RewriteRule ^accessibility$ http://example.com/topic/accessibility/ [R=301,L] it is not working i have this turned on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] ...

Drupal Imagecache not working

I created an Imagecache setting that just resizes to 125px wide. First issue is that the preview image is 404. Then I want to print out an image via <?php print theme('imagecache', 'imported_image', $node->picture, 'test', 'test', $attributes); ?> 'imported_image' being the preset and $node->picture is a correct path. The html prin...

Drupal - Set default value in hook_form_alter?

Trying to prepopulate some of my form fields, and am using hook_form_alter(). I've tried a couple of different ways, but in both cases, the fields still come up empty. I'm assuming that I need to set default_value and not value because if the user changes what's in the field, I want that to update correctly. Is that right? Here's wha...

Drupal issue accessing custom content type

I'm having an issue where a certain content type is not accessible by standard user accounts and anon users. The content type is Page (not the Drupal one but one I created). It contains nothing special, just static text. When I try and view a page I see the title displayed but below that, the html from the tpl isn't included. So the iss...

Drupal contributed modules problem

I extracted a contributed module into the sites/all/modules folder, but it is not yet appearing in my admin panel under Administer -> Site building -> Modules. What could be the problem? I tried clearing the cache, it made no difference. ...

Drupal Cache & Stylesheet Switch

I'm using a very simple Stylesheet Switch by php. It was fine all along but days ago I turn on Caching mode and now it only work for login user. If turn off Caching mode, it will work again for both user. Basically the code looks like this In the page.php header <?php if(isset($_COOKIE['style'])){ $style=$_COOKIE['style'];...

Importing content from one/two Drupal installs into a fresh Drupal install

We're upgrading a large site, opendemocracy.net, from Drupal 4.7 to Drupal 6. Our existing install has a lot of superfluous tables in the database from once-used modules we won't be using: ideally, we wouldn't keep these, or our old blocks, etc. This is because: (a) it'd be nice to keep the database as small as possible, (b) it'd be nice...