/[drupal]/contributions/modules/countdown/countdown.module
ViewVC logotype

Diff of /contributions/modules/countdown/countdown.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5, Mon May 12 13:36:55 2008 UTC revision 1.6, Fri May 8 21:57:19 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: countdown.module,v 1.4 2007/01/15 23:34:37 deekayen Exp $  // $Id: countdown.module,v 1.5.2.1 2008/07/25 16:12:52 deekayen Exp $
3    
4  /**  /**
5     * @file
6   * Count to, or from, a specified date and display the output in a block   * Count to, or from, a specified date and display the output in a block
7   */   */
8    
# Line 43  function countdown_block($op = 'list', $ Line 44  function countdown_block($op = 'list', $
44        '#size' => 30,        '#size' => 30,
45        '#maxlength' => 200,        '#maxlength' => 200,
46        '#description' => t("Event name you're counting to or from."),        '#description' => t("Event name you're counting to or from."),
47        '#required' => true        '#required' => TRUE
48        );
49        $form['countdown_url'] = array(
50          '#type' => 'textfield',
51          '#title' => t('Event URL'),
52          '#default_value' => variable_get('countdown_url', ''),
53          '#size' => 30,
54          '#maxlength' => 200,
55          '#description' => t("Turn the event description into a link to more information about the event."),
56          '#required' => FALSE
57      );      );
58    
59      $form['countdown_accuracy'] = array(      $form['countdown_accuracy'] = array(
# Line 120  function countdown_block($op = 'list', $ Line 130  function countdown_block($op = 'list', $
130    
131    case 'save':    case 'save':
132      variable_set('countdown_event_name', $edit['countdown_event_name']);      variable_set('countdown_event_name', $edit['countdown_event_name']);
133        variable_set('countdown_url', $edit['countdown_url']);
134      variable_set('countdown_accuracy', $edit['countdown_accuracy']);      variable_set('countdown_accuracy', $edit['countdown_accuracy']);
135      variable_set('countdown_timestamp', mktime((int)$edit['hour'], (int)$edit['min'], (int)$edit['sec'], (int)$edit['month'], (int)$edit['day'], (int)$edit['year']));      variable_set('countdown_timestamp', mktime((int)$edit['hour'], (int)$edit['min'], (int)$edit['sec'], (int)$edit['month'], (int)$edit['day'], (int)$edit['year']));
136    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2