* when he/she tries to view an age limited content. This function must
* return an integer value of user age
*/
-// function user_age()
+// public function user_age()
// {
// $query = 'SELECT age FROM user WHERE user_uid = ' . $GLOBALS['ansel_db']->quote(Horde_Auth::getAuth());
// $result = $GLOBALS['ansel_db']->queryOne($query);
* uploads images to Ansel. This will likely go away, being replaced by
* by an remote image import/export functionality.
*/
-// function postupload($image_ids)
+// public function postupload($image_ids)
// {
// $context = array('http_client' => new Horde_Http_Client(),
// 'http_request' => new Horde_Controller_Request_Http(),);
// // like the currently logged in user, global variables, server config,
// // etc. It isn't, however, something you probably want to actually use
// // in production, by virtue of demonstrating all those. :)
-// function prefs_hook_theme($username = null)
+// public function prefs_hook_theme($username = null)
// {
// if (Horde_Auth::getAuth() != 'chuck') {
// return 'mozilla';
// // Example preferences change hook.
-// function prefs_change_hook_theme()
+// public function prefs_change_hook_theme()
// {
// $GLOBALS['notification']->push('You changed your theme to ' . $GLOBALS['prefs']->getValue('theme') . '.');
// }
// // any information you need. You can "global" anything else you need.
// // Return an address - either just the user@ side or a full address -
// // and it will be used.
-// function prefs_hook_from_addr($name = null)
+// public function prefs_hook_from_addr($name = null)
// {
// // Example #1
// if (is_null($name)) {
// // Examples on how to set the fullname.
-// function prefs_hook_fullname($user = null)
+// public function prefs_hook_fullname($user = null)
// {
// // Example #1: Set the fullname from the GECOS information in the
// // passwd file.
// // Preauthenticate hook. See above for description of format.
-// function preauthenticate($userId, $credentials)
+// public function preauthenticate($userId, $credentials)
// {
// // Example #1: Make Horde respect the Unix convention of not
// // allowing login when a file named /etc/nologin exist.
// // Postauthenticate hook. See above for description of format.
-// function postauthenticate($userId, $credentials)
+// public function postauthenticate($userId, $credentials)
// {
// // Example #1: Validating the user's right to login to Horde by
// // by consulting group membership in an LDAP directory. That
// Username conversion hook. See above for description of format.
-// function authusername($userId, $toHorde)
+// public function authusername($userId, $toHorde)
// {
// // Example #1: Append the virtual domain to the username.
// // ex. $HTTP_HOST = 'mail.mydomain.com', $userId = 'myname' returns:
// Post-push hook. See above for format.
-// function pushapp()
+// public function pushapp()
// {
// // Code to run if the app is switched to horde
// }
// Add CSS files hook. See above for description of format.
-// function cssfiles($theme)
+// public function cssfiles($theme)
// {
// return array(
// '/file/path/to/css' => 'uri/to/css'
*
* @return array TODO
*/
-// function signup_preprocess($info)
+// public function signup_preprocess($info)
// {
// $info['user_name'] = Horde_String::lower($info['user_name']);
// return $info;
* @param string $userId The username.
* @param array $data TODO
*/
-// function signup_queued($userId, $data)
+// public function signup_queued($userId, $data)
// {
// // Example #1: Send a notification message to the web server
// // administrator's e-mail address.
// }
//
// // Helper function for signup_queued Example #1
-// function _signup_queued_walkdata($fields, $data)
+// private function _signup_queued_walkdata($fields, $data)
// {
// $msg = '';
// foreach ($data as $field => $value) {
* type - Any allowed Horde_Form field type
* </pre>
*/
-// function signup_getextra()
+// public function signup_getextra()
// {
// // Example #1: A hypothetical case where we would want to store
// // extra information about a user into a turba sql address book. All
* the signup_getextra hook.
* @param string $password The password.
*/
-// function signup_addextra($userId, $extra, $password)
+// public function signup_addextra($userId, $extra, $password)
// {
// // Example #1: Continuation of Example #1 from signup_getextra().
// // Here we connect to the database using the sql parameters
*
* @return array The altered share list.
*/
-// function share_list($userId, $perm, $owner, $share_list)
+// public function share_list($userId, $perm, $owner, $share_list)
// {
// return $share_list;
// }
*
* @return string An error message.
*/
-// function perms_denied($permission)
+// public function perms_denied($permission)
// {
// // Example #1: Provide link to upgrade script.
// $app = (($pos = strpos($permission, ':')) === false)
*
* @return TODO
*/
-// function group_driver($groupName, $userName)
+// public function group_driver($groupName, $userName)
// {
// // Example #1: Look up whether or not this user is part of the
// // "IT_department" group using an external database.
* @param TODO $share_obj TODO
* @param string $app TODO
*/
-// function share_init($share_obj, $app)
+// public function share_init($share_obj, $app)
// {
// // TODO: Move to turba?
// if (($app == 'turba') &&
*
* @param TODO $share TODO
*/
-// function share_modify($share)
+// public function share_modify($share)
// {
// $params = unserialize($share->get('params'));
// if (is_array($params) && !empty($params['source']) &&
* preauthentication hook, this must be true. If false,
* IMP will try to authenticate using hordeauth.
*/
-// function preauthenticate($userId, $credentials)
+// public function preauthenticate($userId, $credentials)
// {
// return true;
// }
*
* See horde/config/hooks.php.dist for more information.
*/
-// function postauthenticate($userId, $credentials)
+// public function postauthenticate($userId, $credentials)
// {
// return true;
// }
*
* @return string The signature text to use.
*/
-// function prefs_hook_signature($username = null)
+// public function prefs_hook_signature($username = null)
// {
// // Example #1: Set the signature from the system taglines file; the
// // string "%TAG%" (if present in a user's signature) will be replaced
*
* @return string The add_source value.
*/
-// function prefs_hook_add_source($username = null)
+// public function prefs_hook_add_source($username = null)
// {
// if (!$username) {
// return;
*
* @return string The search_sources value.
*/
-// function prefs_hook_search_sources($username = null)
+// public function prefs_hook_search_sources($username = null)
// {
// if (!$username) {
// return;
* @return mixed The data to send to the browser (will be JSON encoded).
* @throws Horde_Ajax_Exception
*/
-// function ajaxaction($action, $vars)
+// public function ajaxaction($action, $vars)
// {
// switch ($action) {
// case 'Foo':
*
* @return string The MIME type of the file.
*/
- function attachmimetype($filename, $tempfile, $type)
+ public function attachmimetype($filename, $tempfile, $type)
{
/* By default, we trust the MIME type reported by the browser if it is
* something other than the generic octet-stream type. */
* @param Horde_Mime_Part $message The message content object.
* @param Horde_Mime_Headers $headers The message headers object.
*/
-// function pre_sent($message, $headers)
+// public function pre_sent($message, $headers)
// {
// // Do action here -- no return value from this hook.
// }
* @param Horde_Mime_Part $message The message content object.
* @param Horde_Mime_Headers $headers The message headers object.
*/
-// function post_sent($message, $headers)
+// public function post_sent($message, $headers)
// {
// // Do action here -- no return value from this hook.
// }
*
* @return string The trailer text to be used.
*/
-// function trailer($trailer)
+// public function trailer($trailer)
// {
// // Example #1: Set the trailer from the system taglines file; the
// // string "%TAG%" (if present in a user's signature) will be replaced
* defined in the 'msgflags' preference. On error, return
* an empty array.
*/
-// function msglist_flags($data, $mode)
+// public function msglist_flags($data, $mode)
// {
// // Example #1: Add a icon if the message was sent from a user within
// // the same domain.
* Return an empty string if the user is not to be
* redirected.
*/
-// function mbox_redirect($mailbox)
+// public function mbox_redirect($mailbox)
// {
// // Example #1: Redirect to various Horde apps based on the mailbox
// // name.
* If a mailbox name doesn't appear in the list, the default
* mailbox icon is displayed.
*/
-// function mbox_icons()
+// public function mbox_icons()
// {
// // Example #1: Redirection scheme for Kolab_Cyrus
// static $newmailboxes;
*
* @return string The display label for $mbox.
*/
-// function mbox_label($mbox, $label)
+// public function mbox_label($mbox, $label)
// {
// // Example #1: Show 'foo' as 'bar'
// return ($mbox == 'foo')
*
* @return boolean Is the mailbox read-only?
*/
-// function mbox_readonly($mailbox)
+// public function mbox_readonly($mailbox)
// {
// // Example #1: Make messages in the 'foo' mailbox readonly.
// return ($mailbox == 'foo');
* @param string $view Either 'imp' or 'dimp'.
*
* @return array The altered array to use in the template.
-// function mailboxarray($msgs, $view)
+// public function mailboxarray($msgs, $view)
// {
// // Example #1: Adds a 'foo' entry to each message element.
// switch ($view) {
*
* @return boolean Is composing disabled?
*/
-// function disable_compose()
+// public function disable_compose()
// {
// // Example #1: Entirely disable composition.
// return false;
*
* @return boolean If false, do not display the mailbox.
*/
-// function display_folder($mailbox)
+// public function display_folder($mailbox)
// {
// // Example #1: Do not display the mailbox 'Foo'.
// return ($mailbox != 'Foo');
*
* @return string An e-mail address.
*/
-// function spam_email($action)
+// public function spam_email($action)
// {
// // Example #1: Create e-mail for DSPAM setup.
// $prefix = ($action == 'spam') ? 'spam-' : 'fp-';
* second: maximum disk space (in bytes)
* </pre>
*/
-// function quota($params = null)
+// public function quota($params = null)
// {
// // Example #1: Sample function for returning the quota.
// // Uses the PECL ssh2 extension.
*
* @return array The altered array to use in the template.
*/
-// function dimp_messageview($msg)
+// public function dimp_messageview($msg)
// {
// // Example #1: Add a new foo variable
// $msg['foo'] = '<div class="foo">BAR</div>';
* second element is an array of javascript commands, one
* command per array value.
*/
-// function dimp_previewview($msg) {
+// public function dimp_previewview($msg) {
// // Example #1: Alter the subject
// $msg['subject'] .= 'test';
//
* must be properly escaped (i.e. htmlspecialchars() used
* on the portions of the string where appropriate).
*/
-// function dimp_addressformatting($ob)
+// public function dimp_addressformatting($ob)
// {
// // Example #1: Display only the raw text of the personal name
// // or, if not set, the e-mail address.
* @return boolean If true, activates the feature. By default, these
* advanced features are NOT active.
*/
-// function mimp_advanced($feature)
+// public function mimp_advanced($feature)
// {
// switch ($feature) {
// case 'checkbox':
*
* @return array A list of vacation addresses.
*/
-// function vacation_addresses($user = null)
+// public function vacation_addresses($user = null)
// {
// // Example #1: User has 2 vacation addresses.
// return array($user . '@example.com', $user . '@foobar.com');
* @return mixed The data to send to the browser (will be JSON encoded).
* @throws Horde_Ajax_Exception
*/
-// function ajaxaction($action, $vars)
+// public function ajaxaction($action, $vars)
// {
// switch ($action) {
// case 'Foo':
/**
* TODO
*/
-// function format_description($text)
+// public function format_description($text)
// {
// $text = preg_replace('/#(\d+)/', '<a href="http://bugs.horde.org/ticket/\1">\0</a>', $text);
// $text = preg_replace('/(bug|ticket|request|enhancement|issue):\s*#?(\d+)/i', '<a href="http://bugs.horde.org/ticket/\1">\0</a>', $text);
/**
* TODO
*/
-// function description_help()
+// public function description_help()
// {
// return '<p>To create a link to a bug, use #123 where 123 is the bug number. To create a link to another task, use [[task: name]], where name is the beginning of the task name. To create a link to a note, use [[note: title]] where title is the beginning of the note title.</p>';
// }
/**
* TODO
*/
-// function format_description($text)
+// public function format_description($text)
// {
// $text = preg_replace('/#(\d+)/', '<a href="http://bugs.horde.org/ticket/\1">\0</a>', $text);
// $text = preg_replace('/(bug|ticket|request|enhancement|issue):\s*#?(\d+)/i', '<a href="http://bugs.horde.org/ticket/\1">\0</a>', $text);
/**
* TODO
*/
-// function description_help()
+// public function description_help()
// {
// return '<p>To create a link to a bug, use #123 where 123 is the bug number. To create a link to another task, use [[task: name]], where name is the beginning of the task name. To create a link to a note, use [[note: title]] where title is the beginning of the note title.</p>';
// }
+++ /dev/null
-<?php
-/**
- * Shout Hooks configuration file.
- *
- * THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY. DO NOT ENABLE THEM
- * BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING. YOU HAVE TO CUSTOMIZE THEM
- * TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
- *
- * For more information please see the horde/config/hooks.php.dist file.
- *
- * $Id$
- */
-
-class Kronolith_Hooks
-{
- /**
- * AJAX HOOK: Add user-defined AJAX action handlers.
- *
- * @param string $action The AJAX action.
- * @param Horde_Variables $vars The URL parameters.
- *
- * @return mixed The data to send to the browser (will be JSON encoded).
- * @throws Horde_Ajax_Exception
- */
-// function ajaxaction($action, $vars)
-// {
-// switch ($action) {
-// case 'Foo':
-// return 'bar';
-// }
-//
-// throw new Horde_Ajax_Exception('Unknown action');
-// }
-
-}