For for node body field use below code: /**
* Override or insert variables into the node template.
*/
function template_preprocess_node(&$variables) { /* Add nofollow */ Continue reading
Tag: drupal
Adding new variable for the Author Pane (Follow Links)
Here's how to adding new variable for the Author Pane (Follow links). The demo is on Bersosial.com. function template_preprocess_author_pane(&$variables) { $variables['user_follow'] = '';
Continue reading
Latest Reform commit: Exclude UID 1
Here is the latest commit for one of my Drupal module, Reform. But first, what is Reform module? Perhaps sometimes you want something simple, such as limiting the minimum length and maximum length of Continue reading
Comment Fragment: Rewrite and Redirect Comment Permalink
A few days ago I releasing new module to rewrite and redirect the comment permalink to use a fragment for SEO purposes. The default Drupal 7 comment permalink has the following format, Continue reading
Check if checkbox field is checked (Drupal 7 theming)
Recently, I need the following features for one of client Drupal 7 site: There is one content type that requires option to change the layout just by using checkbox, what is needed is an inline CSS Continue reading
Embed a view inside a node in Drupal 7
We can embed a view created by Views module inside a node in Drupal 7 with just some short code. Here is the code: <?php
$view = views_get_view('your_view_name');
Continue reading
Top Ten Free Professional Drupal Themes
Drupal has an amazing and clean code. Support of social networking, multimedia, SSL, event calenders, document management, blogging, forums, internationalization, user management and permission Continue reading
Creating custom user login page in Drupal 7
Maybe sometimes we want a custom style for our Drupal login page, different with the existing default login page in Drupal 7, whether it's for a personal project or client requests. Here is the Continue reading
Creating responsive Drupal theme (Simplified)
There are various ways to create a responsive Drupal theme, one of them is using template_preprocess_html() function in template.php. First create template.php if your theme do not already have it. Continue reading
Releasing simple Drupal module: Reform
At least now I do not need to creating custom module to get this simple feature. Reform: sometimes we want something simple, such as setting up the minimum length and maximum length of a username. Continue reading