| 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 |
|
|
| 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( |
| 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 |
|
|