<?php
/**
 * Example hooks for Mnemo
 *
 * $Horde: mnemo/config/hooks.php.dist,v 1.1.2.1 2008-11-26 21:25:26 chuck Exp $
 */

// if (!function_exists('_mnemo_hook_format_description')) {
//     function _mnemo_hook_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);
//
//         $text = preg_replace_callback('/\[\[note: ?(.*)\]\]/i', create_function('$m', 'return \'<a href="/horde/mnemo/notes/?q=\' . urlencode($m[1]) . \'">\' . htmlspecialchars($m[0]) . \'</a>\';'), $text);
//         $text = preg_replace_callback('/\[\[task: ?(.*)\]\]/i', create_function('$m', 'return \'<a href="/horde/nag/tasks/?q=\' . urlencode($m[1]) . \'">\' . htmlspecialchars($m[0]) . \'</a>\';'), $text);
//
//         return $text;
//     }
// }

// if (!function_exists('_mnemo_hook_description_help')) {
//     function _mnemo_hook_description_help()
//     {
//         return '<p>To create a link to a bug, use #123 where 123 is the bug number. To create a link to a task, use [[task: name]], where name is the beginning of the task name. To create a link to another note, use [[note: title]] where title is the beginning of the note title.</p>';
//     }
// }
