Archive for category Tips

World of Warcraft admin features

This CodeLet is from one of the live project. This is specific to one site built with Drupal 5.x. You can learn the code and can know how to achieve certain features at admin side. This CodeLet displays an interface to admin to update data per user. This data will then be displayed to end user which is not editable.

Read More: World of Warcraft admin features.

Automatically moderated Drupal comments

This CodeLets alllow anonymous users to post comments withough approval if his/her previous comment has been approved by the moderator. Thus this CodeLet makes it easy for moderators to moderate only those comments which are posted by users who has posted the comment for first time.
This module works out of the box and presents a list of white listed anaomyous users with email id. The moderator can remove emails from the list and those will have to be moderated next time.

Read more: Automatically moderated Drupal comments

Drupal hook: hook_comment

hook_comment lets you operate on comments that is being operated upon. You can perform actions on comments by using this hook. For example, after certain number of commnets reached, you want to hide certain number of comments just like the way facebook does. You can use hook_commentk and theme the output as per your requirements.

Read more: Drupal hook: hook_comment.

Drupal profile picture

This CodeLet allows you to set any image that you have uploaded on your Drupal website as your profile picture. However, you need to modify this CodeLet according to your requirements.

Read more: Drupal profile picture.

Affinity views field & filter

This CodeLet lets you add a field and a filter in views. You can use this field to display data and filter the data.

Read More: Affinity views field & filter.

Programmatically create nodes: node_save

Drupal’s node_save() function lets you create a node of certain type programatically. This is useful when you are importing the data from a backup file like a csv file. To import the data and create nodes using those data you need to fist create the content type of desired type and also have to create all the fields to which the data will be imported to. You have to make sure that while saving data, the format of the data matches that of field type, otherwise you will have a failed import, not to forget the typo while creating the node programatically.

Read more: Programmatically create nodes: node_save.

Upcoming Events

This CodeLet displays a user’s upcoming events. A visitor, visiting a user’s profile would be able to see those events that user has subscribed to. In this CodeLet, for subscription, “Attendance” flag is used. You can alter the code to meet your requirements.

Read more: Upcoming Events.

Auto create blocks from nodes

This CodeLet creates Block for individual nodes. The CodeLet is very customized displaying only one field of the node but it can be altered to display any or all of the fields in the block.

Read more: Auto create blocks from nodes.

Drupal Module Development tool

To develop drupal modules and any kind of customization of a drupal site, we use different tools. Lets discuss which combination is perfect for Drupal Development. My combination is as follow:

OS: windows
Server: WAMP
Editer: Eclipse
browser(s):
FF with Firebug & web development toolbar
IE, Opera & Chrome: for check the cross browser compatibility only.

Read: Drupal Module Development tool.

Automatic redirection to node translation form

This code will redirect you to the translation form of a node after you have created a node. Make sure you have selected a language and not “Language neutral” when saving the node.

Read: Automatic redirection to node translation form.

Rss Feed Tweeter button Facebook button Technorati button Reddit button Myspace button Linkedin button Webonews button Delicious button Digg button Flickr button Stumbleupon button Newsvine button Youtube button