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

Drupal hook: hook_mail_alter

Drupal hook: hook_mail_alter.

When sending e-mails or newsletters from your website, you might want to inject some information like website name, disclaimer, copy right information, unsubscribe link and such. Just like hook_form_alter, you can use hook_mail_alter to virtually alter anything in the mail just before Drupal sends the e-mail. You can even change the mime type of the email, for example, from plain text to HTML and vice versa.

Grid of terms in a block

Grid of terms in a block.

This CodeLet show how to display terms in a vocabulary as block. The CodeLet will display the terms, along with term icon, if taxonomy image module is installed, in a grid of 4X4. The block is configurable. You can select which vocabulary to show the terms from. Its quite attractive and can be used on front page.

Node Visitors

Node Visitors.

This CodeLet adds a local task on node page which lists all the unique visitors of the node. You can configure the profile fields to be shown list.

Drupal hook: hook_view

Drupal hook: hook_view.

The full view of a node including all the information associated with the nodes like author, node posted date, file attached to the node and any other data that are associated by other custom modules is managed by hook_view. The main goal and use of the hook_view is to allow the node modules to add extra information and manage those extra information to display when viewing the node. Nodes can have tease view as well as page view. On teaser view, only some of the information associated with the node is displayed; we can say its an overview of the node. On page view, all the information associated with the node is displayed.

Project codes

Project codes.

This CodeBook contains CodeLets from different projects that are allowed to publish to community. All the CodeLets under this CodeBook are published under GNU/GPL license. You can use, share, modify and publish it under GNU/GPL license.

Image menu

Image menu.

This CodeLet will allow you to add an image to a menu by overriding the menu in the template.php file of you theme. Also, the module offer admin side control to select and put the image to a menu item.

Node information

Node information.

This CodeLet shows a link on nodes to request more information for a node. By clicking the link, the user will be redirected to the site wide contact page and the subject field of the contact form is filled with the node title. Also, the link to the node will be added just before the mail will be sent. Thus preventing the user from modifying the link.

Developer’s Network: Drupal Developer updated!

Its our pleasure to announce the new Drupal Developer with new look and feel and features. Users now have quick access bar at the bottom of the page to quickly access some of the most common site operation for creating content, updating profile and accessing content.
Register on Drupal Developer to access a rich collection of Drupal codes.

Tags:

Setting up resources

I could not able to post for a while (about 80 days!). Yes, now a days, I’m very much busy. But spare some time to set up some really good WordPress development resources. You will see some of them very soo.

 

Thank you

Wordpress: For Dummies

Developer’s Network has taken the pledge to help Wordpress pluging and theme developers with providing guidance and help with coding and theming. Developer’s Network will provide assistance with Wordpress loops and of course! theme customization.

Writing a Wordpress Plugin:

The ultimate and only goal of a Wordpress plugin is to provide a specfic piece of  functionality to the Wordpress blog which enhances and makes easy to access wordpress content as well as automating some the pre-requisites. Wordpress plugin can also alter/enhance existing features and functionality.

To write a Wordpress pluging, we need to use plugin Api, which is a pre-defined collection of methods which can be used by the custom plugin. These APIs generally provides and interface to interact with Wordpress core features and makes it easy to re-use the code and thus less coding to do.

Wordpress is developed with PHP scripting language, so the foremost requriment in making of a Wordpress plugin is that one should be aware of PHP scripting language. Also, if one is aware of Wordpress workflow, it will be an added anvantage.

So, we gonna write an advanced plugin just to start with Wordpress. It is assumed that you have already developed few Wordpress plugings and looking for some big-big bang!!

So, we will develop a plugin which can add a dynamic (a changeable at admin’s will) footer content. The footer section of  any website contains links to important pages and this can also help for better page rank in popular search engines.

Requirements:

  1. Develop a plugin with which, the content of the footer can be changed at will.
  2. There should be an admin side interface from where the admin can set the content for footer.

This should be very straight forward.  Just adding/pasting some text or creating some links with provided interface. The text goes before the link in the footer. The ideal candidate links can be ‘terms & conditions’, ‘contact us’ and else such.

So, the very first step is to create a function which injects the content to footer

function footer_content($ss__text = NULL, $ss__links = NULL) {

if ($ss__text)  {

// $ss__text is the string text which is added from admin side

$output .= $ss__text;

}

if ($ss__links) {

$output .= $ss__links;

}

if  (empty($ss__text) && empty($ss__links))  {

//set some default content or leave it as it is.

}

}

Tags: