drupal

Drupal: How to remove login to make site passwordless for users?

I want to remove the login page from a Drupal site so that the site is open and public-facing. Only the admin would need to login. Does anyone know how this can be accomplished? ...

donation in Drupal

Hi all, My site have a number of different persons each representing different diseases. I made a content type "person" to represent each person, and add some cck fields such as name, image, location etc...Now all I want to do is add the ability to donate to their cause. Each individual would have a donate button on her/his page. I'd al...

Enhanced Drupal User Administration

Drupal's user administration page @ admin/user/user allows admins to checkmark users & perform bulk operations on the selected accounts (ie: adding roles to users). Contrib modules can add to the list of available user operations that can be performed. Very handy. The interface, however, only allows the administrator to deal with a sing...

Drupal question - How to set / hide groups select from form?

I'm using Drupal with the organic groups module, and I've defined a content type that may be posted in a group, but on the node/add form, I want to set the default value to that user's group (as they can only belong to one) and set the type to "hidden". I'm trying to implement a hook_form_alter, but I don't see how to manage the group f...

Posting to Drupal via PHP

I'm wanting to insert SMS text messages into Drupal. The SMS gateway is configured to forward the received message to a PHP script on our server and at the moment it's just inserting the message and the phone number into a database. For example, the message is forwarded to http://www.example.com/smsupdate.php?phone=123445&text=mess...

Drupal: displaying menus with Views ?

hi, I need to develop a kinda Sitemap on the bottom of my website, with all menu items and I was wondering if I can do it with Views. I actually need to display each main menu item on a different column and add the submenu items to each column. I realized anyway that Views has not access to Menu items, but only to nodes, or am I wrong...

Drupal webform email field restrict free email

Hi I am using webform in drupal to capture users email address, but I want to restrict the user to enter free emails like gmail, yahoo, rediffmail etc. only corporate email should accepted. Can anybody please let me know how to do that? I got this http://stackoverflow.com/questions/2318214/regular-expression-to-match-free-email-accounts...

jQuery.ajax() reports invalid json - Firebug parses it fine

I have jQuery.ajax() creating a request to a url (cms2/docman/dir/%id) (%id is a numeric unsigned integer). The page requested runs some functions and outputs an array. This array is then run through drupal_json. drupal_json() echo's out the content first setting the header to Content-Type: text/javascript; charset=utf-8 So far, every...

Drupal 6: how to assign more than 1 imagecache to 1 cck field

Hi friends, I create few imagecache for featured slide img standard listing img details page thumb and original img I need to assign all these imagecaches to 1 image that member upload. so It will create all these images from 1 image upload, and I will use them wherever I need. At cck editing part, I can assign only 1 imagecache :/...

How to run drush command from code.

I'd like to trigger a Drush command from a Drupal function, anyone have any suggestions for how best to do it? ...

Drupal - add form element on successful submission

In a Drupal custom module, I want to make $form['link_wrapper'] conditional on a successful submission of the form but this is not a very successful way of doing this. Can anyone suggest better approach. function my_function_my_form($form_state){ //echo "-" . $form_state['post']['op'] ."-"; //die(); global $base_root; ...

problem with drupal when I change some configuration

I am a drupal newbie. Can anyone tell me what is the meaning of such warning. warning: Parameter 1 to profile_load_profile() expected to be a reference, value given in /data/multiserv/users/395147/projects/730411/www/includes/module.inc on line 462. The line on question contains : ** * Invoke a hook in a particular module. * * @pa...

Drupal pathauto usage

I have a node called artists. It has a field called shortname. I want to have it so that when I add an artists with shortname = 'foo' you can navigate to http://bar.com/foo/ and it will show that artist's node. What's the magic configuration in pathauto to make this happen? ...

Drupal: Display only specific NodeReferrer field in Views

I have a content type appointment with a date field that references nodes of the content type person using the Nodereference module. In the content type person I added a Nodereferrer field that shows the reverse of this references (Person -> appointments). I now want to create a view of person nodes that shows the last appointment date...

Drupal 6 Views 2 using Node Path as an argument

Hi, Please consider helping a Drupal noob who is in danger of tearing out what hair I have remaining. I have a view that I want to add an argument to so that it only displays the details of the specified product. Since I'm using URL aliasing the argument is in the form of shop/product1, shop/product2 etc. However, when I go to add an a...

Drupal 6: listing in custom-node.tpl.php what fields are available to use for the current node?

Hi friends, I'm a drupal newbie... Is there any way to list in my custom-node.tpl.php what fields are available to use for my current node? for example, at View, when I write print var_export($data,TRUE); to php customfield, it gives me a list of available fields. is there any equality func. for using in any node.tpl.php? Appreca...

including javascript function in .module file in drupal

on click of button i want hi message to be displayed using javascript in drupal.I have made a .js file and know that to incude that i must use drupal_add_js(drupal_get_path('module', 'document') .'/click.js'); but the problem is to create button i used $form['click'] = array( '#type' => 'button', '#attributes' => array('onclick' =>dr...

Drupal 6: View module generates div mess :/

Hi friends, I created some blocks with View Module. View Module really makes things easy! but it puts so many divs, class-names, etc... to output. and it mess up for some cases. example below: How can I get a CLEAN output from view? without any div, span... Appreciate helps! thanks a lot! ...

Drupal 6: assigning custom Display Output to views_embed_view

Hi friends, $viewName = 'my_view_name'; print views_embed_view($viewName); we have such a cool views_embed_view func. in Drupal to display a view inside another template. But It doesn't get the custom "Display Output" :/ it gets the default. How can I assign my custom Display Output (under Theme: Information) to views_embed_view? A...

Drupal Views Ajax refresh rows

Hi! I have some view (Views 2 - list of invitations, table style) which uses embedded forms to edit records directly in view rows. I am using ahah to change values in records. What I need is to refresh all records dynamically (some calculations) after I change some checkboxes. Is there any way to refresh view using Ajax? To trigger reloa...