Sometimes we may want to restrict the access of node field on role level. This could be done by installing the Field Permissions.
Let’s install the module first.

Continue reading Drupal 7 – Set field permission by role using Field Permissions
Sometimes we may want to restrict the access of node field on role level. This could be done by installing the Field Permissions.
Let’s install the module first.

Continue reading Drupal 7 – Set field permission by role using Field Permissions
Recently i start working on BeansTag again as some users request to add the meta robots and canonical options.
This time, the update involves a change in the module schema. In this case, we need to implement the hook_update_N() in .install.
The following piece of code is added to beanstag.install. Continue reading Drupal 7 – Update the module schema by hook_update_N()
If you want to customize the block.tpl.php for different blocks. The Block Theme module could serve this purpose well.
1. Download and enable the module.

Continue reading Drupal 7 – Create block.tpl.php by Block Theme module
For developers, the Flippy module which i mentioned might be not flexible enough.
Drupal 7 – Display Previous and Next node links on node view using Flippy module
Then you could consider another module called Previous/Next API. With this module, you can add the previous and next node links in any preprocess functions, template.php or module files using the API functions provided by this module.
Another advantage is that it caches all the links in its own database table which could speed up the query and this also reduces the database loading. Let’s see how this module work.
Continue reading Drupal 7 – Get the prev and next node ID using Previous/Next API
We talked about how to add previous and next node links in Drupal 6.
Drupal – Add Previous and Next Links for Node Navigation
In Drupal 7, there is a module called Flippy which could implement this feature without any coding.
Continue reading Drupal 7 – Display Previous and Next node links on node view using Flippy module
Add the following form element in hook_form_alter() to add your own HTML markup.
$form['html_markup'] = array('#markup' => t('<a href="http://eureka.ykyuen.info">Eureka!</a>'));
For Drupal 6, please refer to the following post instead.
Drupal – Add HTML Markup in Form
Done =)
Reference: Drupal 7 Form API Reference
We can create a page which will clear the cache when it is loaded, and then add a new menu item linking to that page.
1. Create a new page with the following PHP code.
<?php
drupal_flush_all_caches();
drupal_set_message('cache flushed.');
?>
One day after i migrated a Drupal 7 website to a client’s server, the core drag and drop feature did not work. In addition, i could not edit the Context because nothing was shown when i select the condition. The Show row weights link was also missing.
Finally i found that i was not the only one who came across this problem. The following post is a similar scenario and probably the failure was caused by the PHP 5.3 on the client’s server.
Drupal Core – Drag and drop not working
Anyway, after i have enabled the Aggregate JavaScript files in Administration » Configuration » Development » Performance, the problem was gone.
Done =)
If you enable the Multilingual content of i18n module, a Translate tab will 
Continue reading Drupal 7 – Translate the title field label of content types
We can make the section-footer sticky in Omega theme by adding the following piece of code in <your-theme>-alpha-default.css.
/* sticky footer */
html, body {height: 100%; margin: 0;}
#page {display: table; width: 100%;}
html>/**/body #page {height: 100%;}
*:first-child+html #page {height: auto;}
.section {display: table-row;}
html>/**/body .section-content {height: 100%;}
*:first-child+html body .section-content {height: auto;}
Kudos to Karl Kasischke.
Done =)
Reference: Has anyone tried to get a sticky footer to work with Omega?