module

Publication Date Update: module for Drupal 7 to add last update date to a node

Publication Date Update is a simple module for Drupal 7 that adds the "last update" date to a node, to be installed it needs the module Publication Date , because it works with the published_at variable. Publication Date Update is simply this function: function publication_date_update_preprocess_node(&$vars) { $time_unit = 86400; // number of seconds in 1 day => 24 hours * 60 minutes * 60 seconds $threshold = 10; // --- Create revision data // Check if node was revised if (($vars['status']) && $vars['changed'] && (round(($vars['changed'] - $vars['published_at']) / $time_unit) > $threshold)){ $vars['submitted'] = t('Published: !publishtime | Updated: !updatetime | Author: !username', array( '!publishtime' => format_date($vars['published_at'],'custom','d M Y...

Flush Cache Cron: module for Drupal 7 to flush the cache

Flush Cache Cron is a module for Drupal 7 to manually flush the cache and for set the cache flushing during the cron, this module only flushes the cache without rebuilding the system bootstrap. The module empties the tables: cache cache_block cache_filter cache_form cache_menu cache_page cache_path cache_views cache_views_data

Boost Expire for Drupal 7: a revision of the module

This is a revision of Boost Expire for Drupal 7 thanks to which the Boost's cache is flushed only when a node or a comments goes from unpublished to published or viceversa and when editing a node or a comment that is already published. Here there is the code: <?php /** * @file * * Expires Boost caches automatically when certain Drupal actions are taken. */ /** * Implements hook_menu(). */ function boost_expire_menu() { $items['admin/config/system/boost_expire'] = array( 'title' => 'Boost Expire', 'description' => 'Configuration for Boost Expire.', 'page callback' => 'drupal_get_form', 'page arguments' => array('boost_expire_admin_settings'), 'access arguments' => array('administer site configuration'), 'type' => MENU_NORMAL_ITEM, ); return $items; } /** * Implements...

Easy subscription for Drupal 7: a revision of the module

This is a little revision of Easy subscription for Drupal 7 thanks to which the notifications are sent only when the node is published and in the outgoing email are now present the title, a small preview of the contents and the link of the new node. Here there is the code: <?php /** * @file * This is an easy subscription module */ /** * DB management. */ function easy_subscription_form($form, &$form_state) { $form = array(); // Add a title to help baffled users $form['description'] = array( '#type' => 'item', '#title' => t(''Subscribe to receive updates''), ); $form['email'] = array( '#type' => 'textfield', '#title' => t('email'), '#size' => 20, '#required' => TRUE, '#validate' => array('filter_form_validate' => array('email_validation')), ); $form['...
Subscribe to RSS - module