| 1 |
<?php |
<?php |
| 2 |
// $Id: bookmarks2.module,v 1.2 2006/08/08 17:37:05 dnorman Exp $ |
// $Id: bookmarks2.module,v 1.7 2006/08/08 17:41:48 deekayen Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 6 |
* Lets users keep bookmarks |
* Lets users keep bookmarks |
| 7 |
* |
* |
| 8 |
* @author David Kent Norman <deekayen {at} deekayen -dot= net> |
* @author David Kent Norman |
| 9 |
* @link http://deekayen.net/ |
* @link http://deekayen.net/ |
| 10 |
* @todo There's some code/functionality duplication to eliminate |
* @todo There's some code/functionality duplication to eliminate |
| 11 |
* Callbacks are underutilized |
* Callbacks are underutilized |
| 43 |
*/ |
*/ |
| 44 |
function bookmarks2_help($section) { |
function bookmarks2_help($section) { |
| 45 |
switch ($section) { |
switch ($section) { |
|
case 'admin/modules#description': |
|
|
return t('Enables users to bookmark any page on the site.'); |
|
|
|
|
| 46 |
case 'user/bookmarks2': |
case 'user/bookmarks2': |
| 47 |
return t('A bookmark is a link to an address (URL) on the internet.'); |
return t('A bookmark is a link to an address (URL) on the internet.'); |
| 48 |
break; |
break; |
| 86 |
$items[] = array('path' => "bookmarks2/$user->uid/rss.xml", 'title' => t('feed'), |
$items[] = array('path' => "bookmarks2/$user->uid/rss.xml", 'title' => t('feed'), |
| 87 |
'callback' => 'bookmarks2_feed', 'access' => $access, |
'callback' => 'bookmarks2_feed', 'access' => $access, |
| 88 |
'type' => MENU_CALLBACK); |
'type' => MENU_CALLBACK); |
| 89 |
|
$items[] = array( |
| 90 |
|
'path' => 'admin/settings/bookmarks2', |
| 91 |
|
'title' => t('Bookmarks2'), |
| 92 |
|
'description' => t('Configure link cropping and login reminder encryption.'), |
| 93 |
|
'callback' => 'drupal_get_form', |
| 94 |
|
'callback arguments' => 'bookmarks2_admin_settings', |
| 95 |
|
'access' => user_access('administer site configuration'), |
| 96 |
|
'type' => MENU_NORMAL_ITEM |
| 97 |
|
); |
| 98 |
return $items; |
return $items; |
| 99 |
} |
} |
| 100 |
|
|
| 960 |
* |
* |
| 961 |
* @return array |
* @return array |
| 962 |
*/ |
*/ |
| 963 |
function bookmarks2_settings() { |
function bookmarks2_admin_settings() { |
| 964 |
$form = array(); |
$form = array(); |
| 965 |
$form['bookmarks2_link_crop_size'] = array( |
$form['bookmarks2_link_crop_size'] = array( |
| 966 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 982 |
$form['bookmarks2_login_reminder'] = array('#type' => 'markup', '#value' => t('The mcrypt extension of PHP must be installed on this server for login reminders to work.')); |
$form['bookmarks2_login_reminder'] = array('#type' => 'markup', '#value' => t('The mcrypt extension of PHP must be installed on this server for login reminders to work.')); |
| 983 |
$form['bookmarks2_login_reminder_enabled'] = array('#type' => 'hidden', '#value' => '0'); |
$form['bookmarks2_login_reminder_enabled'] = array('#type' => 'hidden', '#value' => '0'); |
| 984 |
} |
} |
| 985 |
return $form; |
return system_settings_form($form); |
| 986 |
} |
} |
| 987 |
|
|
| 988 |
/** |
/** |