Drupal7

Drupal core 7.x

DrupalD's picture

Drupal : Send Ubercart PayPal payment to node author

This CodeLet alter the 'uc_paypal_wps_email' variable when PayPal payment is enabled with Ubercart & sets to node author's PayPal account email address.
This requires creating a field on user's account with name 'PayPal Email' (field_paypal_email).

DrupalD's picture

Drupal: Integrate A-frame & enable VR features

This CodeLet integrates Aframe libray & displays images using Aframe. With a VR enabled device, you can then view it in VR. It first displays a wall of images. When user clicks on one of them, on a new page, it displays the image using aframe library.

DrupalD's picture

Drupal: Create Drupal7 node Programmatically

This CodeLet will read data from an external API, parse the JSON response & build a node of specific type. It imports taxonomies & images as well.
The fascinating thing about this CodeLet is, it can import data to multi - value node fields, including multi widget fields & different field types.

DrupalD's picture

Drupal7: JSON, hook_form_alter & hook_menu

This CodeLet demonstrates the use of hook_form_alter & hook_menu.
Using hook_form_alter, a text field is added to site information page. Once a API key is saved, the button has value 'Update configuration'
Using JSON menu, one can pull a node of type page, as JSON string.

Magento: Display related products block on the Onepage checkout

This CodeLet display related products of cart items on the Onepage Checkout at the bottom.

Follow steps to add related products on the Onepage checkout page.

1.) Edit the onepage.phtml file located at /app/design/frontend/default/your_template/template/checkout

2.) Add the following code end of the file:

Set user password using RULES

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.

Drupal: Import Vebra Property using Vebra API

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.

Drupal: Programmatically manage members of sub groups

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,
Ex. yourdomain/subgroups/$gid.

CodeLet Dependencies:
1-Organic groups ( og )
2-Subgroups for Organic groups ( og_subgroups )
3-OG Invite People ( og_invite_people ).

DrupalD's picture

Drupal: Change User account title

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.

Profile2 Registration Path

Hi, I am new to Drupal. I have installed and gone through the steps to create multiple profiles types using Drupal 7.
How do I enable these as links or drop-downs on the main login/registration page so it redirects new users to the appropriate registration profile. For example, example.com/profile1/registration and similarly for profile2, profile 3

Thanks in advance

DrupalD's picture

Drupal: Set content in a region programmatically

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.

DrupalD's picture

Drupal : Login / register with Facebook connect button

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.

Drupal Example of Ajax on Field group multiple using hook_form_alter

This CodeLet let you konw how to implement ajax on field group multiple module.
"fgm_node_YOURNODE_form_group_YOURGROUPNAME" where "YOURNODE" will be the name of your content type and "YOURGROUPNAME" will be the name of your field group,
Given example is for text field, ajax call on blur event.

DrupalD's picture

Drupal download files: Add confirmation to downloads

This CodeLet adds a confirmation form when a user tries to dowload a file from a Drupal site. The data then saved in the db and also mailed to the administrator. Once the form is submitted, file dowload starts. File download start with Jquery after 3 seconds. Administrator can also view all the form submissions.

DrupalD's picture

Drupal: Instagram integration

This CodeLet pulls results for search string fron instagram by using Instagram API. The result is displayed in tile. Befor you use the code, you have to register your app at instagram and obtain a client id which should be used in application.js file used with current code.

DrupalD's picture

Drupal: Award badges to users for Achievements

This CodeLet will create achievements using Achievements API provided by Achievements module. The CodeLet describes how to use the API and build the custom Achievements badges for different activities on the site by the users. Based on these activities, a user will be awarded with an achievement badge. The CodeLet uses different Drupal API hooks in order to check whether the user has peformed an activity and is eligible to get the respective achievement badge.

DrupalD's picture

Drupal: Reset admin password

This CodeLet will create hash for your admin password. You can provide the string for password and the CodeLet will generate the hash. You can then copy this hash and add in password field in the users table. The code has to be put in index.php of your Drupal installation and the order of the code is important.

DrupalD's picture

Drupal: Generate unique invoice number for unbercart order

This CodeLet generate a unique invoice number for every order placed with ubercart. The unique invice number is stored in a custom table and a function is provided to fetch the invoice number for respective order number. You can use this function in order template to display the inovice number

Pages

QR code for this page URL This page URL
Feedback