- Drupal Developer helps you to learn Drupal by Live code examples!
- Learn to develop custom Drupal modules and themes for Drupal5, Drupal6, Drupal7 and Drupal8
- Post your Drupal questions and get solutions.
- Its free to join and post!
This CodeLet will Dispaly poll choice radio as a Button and view result on click of button.
This CodeLet allows to set the user password during Rule execution, the following process can be used.
a) create user entity ($newuser)
b) set a rules variable $password (use PHP code to generate a random string)
c) execute custom PHP which looks like
This way, you can also use the variable $password in say, an email to the user letting them know what their automatically generated password is.
This CodeLet allows you programatically import property to content type:
1. Install module.
2. Create content type with the fields to which you want to import.
3. you have to update KEY/PASSWORD for Vebra API and URL of property on Vebra.
This CodeLet let you Programmatically manage members of sub groups. also you can add sub group.
you can inviter/remove peoples of sub groups. Invitation will be sent by email.
after installation of this CodeLet you must have to pass the group gid on query string,
1-Organic groups ( og )
2-Subgroups for Organic groups ( og_subgroups )
3-OG Invite People ( og_invite_people ).
This CodeLet will change the title of the User account page. It will consider and set user's 'username' as the titlte of the account page. Drupal offers this by default. But this can be used when some other modules have already modified the title.
This CodeLet will store user's login history and creates a block. Admin can place this block on user pages or on pages. Future ammendments to this code will allow to use the stored login details to be displayed using a theme function.
This CodeLet will be submitted to Drupal.org community soon.
We have discussed about the hooks to be used in .install file in Drupal module hooks: install file and in this discussion we will look at the hooks to be used in .module file. Remember, a Drupal module can have multiple .module files and each .module file has one accompanying .info file providing information about the module.
This CodeLet let you display product field on cart page.
This CodeLet will allow you to set some text in a region you specify from configuration page. The regions are from the current theme. The desired content will be displayed in the region when the page is rendered.
This CodeLet let you allow Remove tax line item from order.
Install module and make changes as per instruction on CodeLet.
This CodeLet will add a facbook connect button to your login / registration form. Using the CSS, you can change the appearnce of the login block/page. This CodeLet also uses Ajax login/register module. Please make sure you have all the require modules and libraries installed before you using this CodeLet.
In some situation, you module is required to create a taxonomy which the module use to perform other tasks/features it offers. This is when you can write a code to craete the require vocabulary in the module and make it availabel as soon as the module is installed. You can also add terms programatically to that vocabulary!
Using taxonomy_save_vocabulary for Drupal 5.x & 6.x and taxonomy_vocabulary_save for 7.x, you can create the vocabulary programmatically in your module.
Here is a Drupal 6.x example:
This codelet demonstrate different features required by a crowdsourcing site
Requires two roles 'requester' and 'bidder'.
This already include two Content types 'Request' and 'Bidder content',
This CodeLet let you allow a download file and track of that file.
This CodeLet redirects the user to translate the node in the specified lanaguge. This will reduce the efforts to click on the translation tab and can enhance to transalte the nodes in all the enabled langauges, one-by-one.