drupal

Have trouble creating an hello-world module in drupal 5

Here're the steps I did to create an mudule: create a directory groups under sites/all/modules in the above directory groups, create two files groups.module and groups.info The content of groups.info: ; $Id: groups.info,v 1.3 2006/11/21 20:55:36 dries Exp $ name = groups description = Test Groups Listings. package = "test groups" v...

Drupal Audio with Audio module or other

I tried the Audio module at http://www.drupal.org/project/audio but I'm looking for alternatives if better ones exist. My problem with the Audio module is that the current release (and the past 5 releases) seem to have all been released as unsable. The second problem is that the player itself that plays the audio is not showing when ...

Save button missing from Drupal site

Hi there, I'm in the middle of creating a Drupal site. It already has lots of content. This morning I found out that the "Save" button has now gone missing from my Page and News nodes. Users now have to click Preview before the Save button appears (both for creating new content and editing existing content). It was fine yesterday and I'...

Drupal variables - doesn't print path correctly

I'm trying to make a variable for an edit button. In template.php, I've put this code function phptemplate_preprocess_node(&$vars) { if ($user->uid == $node->uid || in_array('moderator', array_values($user->roles))|| $user->uid == 1){ $vars['edit'] = l('Edit', 'node/' . $node->nid . '/edit'); } } Then I print $edit...

Changing menu links, if user is authenticated or not

hi, I need to change the menu links on my website (and leave the same items names) depending on the user is a guest, or authenticated user. What's the standard way to do it ? thanks ...

Key of radio-button into json view

Hi there, I am using the view_datasource module with drupal5 to get a json view. Now I have a cck-field with radio-boxes and want the key to be displayed in the json. However, it always displays the label. My allowed value list: http://dummyimage.com/960x240&text=foo|<img src="http://dummyimage.com/96x24&text=foo"> http:...

Ubercart cart layout

hi, I've an issue with the Ubercart cart layout in Drupal. See this image: http://dl.dropbox.com/u/72686/cart.png The column products and the products name are not aligned, for some reason. I cannot fix it with only css, because I cannot align all columns, if I hide elements, or change their size. I'm looking for the cart php templat...

Registration in Drupal Sites

I am making a drupal site and have a custom content type Event. I want user be able to register themselves at the event page. For this there is a module namely Event Manager . But this module is not present Drupal 6.x release. Is there some other workaround of this? ...

Best practices to update a Drupal multisite installation

Hi guys, im gonna install a drupal multisite behavior: common codebase and one database per site. The idea is to keep the modules that are used by all the sites in the /sites/all/modules/ folder, and the themes and modules used just by one sites in it /sites/example1.com/ folders. I've read the 10 minutes multisite configuration and al...

use htaccess to rewrite subfolder in drupal

So there is a drupal installation with a subfolder with kohana 3 in it. Trying to redirect the URL to something much more clean RewriteRule ^newpage$ /registered_affiliates/index.php/affiliates/splash Thanks ...

Drupal 6 how do I display a view in a panel as content

I have a Drupal 6.17 install with Views and Panels2 Im only new to these modules. how do I get a view to display as content in one of the panel regions? I have the panels setup and when I select to load content I dont see the view as an option. do I need to do something to make the view a node? Ive setup the view page and block, sti...

theme_menu_item() is not working

Hello I have a Drupal theme called wellington located in \sites\all\themes\wellington. I wish to override the menu_item function and followed the instructions at http://drupal.org/node/310356. I want to add a class to the li as described. I have tried naming the function wellington_menu_item and tried phptemplate_menu_item but no luc...

How / where can I include a library?

hi, how can I include a custom library in Drupal ? For example I need to insert this statement somewhere, to use the dompdf library: require_once("dompdf_config.inc.php"); Once the this file is included, i can trigger custom php code from my drupal back-end custom actions. thanks ...

Equality of $is_admin for custom created role users

Hi friends, I have created a site-admin role for my client to edit page contents. Are users under this site-admin included to $is_admin condition? I tested and as I see it is not unless I miss something. So, what is the equality of $is_admin for my custom created role users? Appreciate helps!! Thanks a lot ...

How to send e-mails from custom PHP code ?

hi, I need to send an e-mail from my custom php code using the Drupal service. In other words, I've noticed Drupal can easily send emails so I would like to know how can I use drupal libraries to send the emails, instead of using external libraries. thanks ...

Exported filter with preloaded value

Hi, everyone. I defined a profile field for users called "Size" which can take the values "Small", "Normal" and "Big", so it's presented as a combo box. Now I have a Page view with an exposed filter defined over "Size", furthermore the filter is optional so an "Any" value is presented in the combo box. Two questions: When the user en...

Drupal: access permissions for php scripts ?

hi, I'm writing a custom php code in my Drupal website. I need to load the content of specific pages from PHP. These pages are visible only for authenticated users, and it seems I cannot access them from php, even if I trigger the script when I'm logged in as user. Is there a way to simulate "a logged in" user from php, so I have acce...

Load particular stylesheet on Access Denied

When a user gets an Access Denied page, how can you use drupal_add_css to load a particular stylesheet? Is this possible? ...

how to do an drupal form submit using ajax ?

i have a custom module, in which i am submitting the form using drupal submit. ie using mymodule_submit() function. i want to ajaxify this submit using jquery. what all are the prerequisites for ajaxifying in drupal ? how to return the values and all? somebody please help . thanks in advance ...

Is Multi language support possible in Drupal?

Am creating a website.Is support of other languages apart from English possible ? ...