| 1 | <?php |
|---|
| 2 | // +-----------------------------------------------------------------------+ |
|---|
| 3 | // | PhpWebGallery - a PHP based picture gallery | |
|---|
| 4 | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | |
|---|
| 5 | // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | |
|---|
| 6 | // +-----------------------------------------------------------------------+ |
|---|
| 7 | // | file : $Id$ |
|---|
| 8 | // | last update : $Date$ |
|---|
| 9 | // | last modifier : $Author$ |
|---|
| 10 | // | revision : $Revision$ |
|---|
| 11 | // +-----------------------------------------------------------------------+ |
|---|
| 12 | // | This program is free software; you can redistribute it and/or modify | |
|---|
| 13 | // | it under the terms of the GNU General Public License as published by | |
|---|
| 14 | // | the Free Software Foundation | |
|---|
| 15 | // | | |
|---|
| 16 | // | This program is distributed in the hope that it will be useful, but | |
|---|
| 17 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
|---|
| 18 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
|---|
| 19 | // | General Public License for more details. | |
|---|
| 20 | // | | |
|---|
| 21 | // | You should have received a copy of the GNU General Public License | |
|---|
| 22 | // | along with this program; if not, write to the Free Software | |
|---|
| 23 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
|---|
| 24 | // | USA. | |
|---|
| 25 | // +-----------------------------------------------------------------------+ |
|---|
| 26 | |
|---|
| 27 | if (!defined('PHPWG_ROOT_PATH')) |
|---|
| 28 | { |
|---|
| 29 | die('Hacking attempt!'); |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | class NormalAddIndex extends AddIndex |
|---|
| 33 | { |
|---|
| 34 | function get_popup_help_content($popup_help_content, $page) |
|---|
| 35 | { |
|---|
| 36 | if (in_array($page, array('advanced_feature', 'site_manager'))) |
|---|
| 37 | { |
|---|
| 38 | $help_content = |
|---|
| 39 | load_language('help/'.$page.'.html', $this->path, '', true); |
|---|
| 40 | } |
|---|
| 41 | else |
|---|
| 42 | { |
|---|
| 43 | $help_content = false; |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | if ($help_content == false) |
|---|
| 47 | { |
|---|
| 48 | return $popup_help_content; |
|---|
| 49 | } |
|---|
| 50 | else |
|---|
| 51 | { |
|---|
| 52 | return $popup_help_content.$help_content; |
|---|
| 53 | } |
|---|
| 54 | } |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | // Create object |
|---|
| 58 | $add_index = new NormalAddIndex(); |
|---|
| 59 | |
|---|
| 60 | // Add events |
|---|
| 61 | add_event_handler('get_popup_help_content', array(&$add_index, 'get_popup_help_content'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
|---|
| 62 | |
|---|
| 63 | ?> |
|---|