source: tags/build-A01/plugins/add_index/main.normal.inc.php @ 20384

Last change on this file since 20384 was 1704, checked in by rub, 17 years ago

Feature Issue ID 0000496: Integrate MOD add_index on PWG with plugin.lang.php

Change name of news triggers.
Replace & by &
Improve a little add_index plugin implementation.
Add parameters pages (under construction) for add_index plugin

File size: 2.6 KB
Line 
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// | Copyright (C) 2007 Ruben ARNAUD - team@phpwebgallery.net              |
7// +-----------------------------------------------------------------------+
8// | branch        : BSF (Best So Far)
9// | file          : $RCSfile$
10// | last update   : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
11// | last modifier : $Author: rub $
12// | revision      : $Revision: 1481 $
13// +-----------------------------------------------------------------------+
14// | This program is free software; you can redistribute it and/or modify  |
15// | it under the terms of the GNU General Public License as published by  |
16// | the Free Software Foundation                                          |
17// |                                                                       |
18// | This program is distributed in the hope that it will be useful, but   |
19// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
20// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
21// | General Public License for more details.                              |
22// |                                                                       |
23// | You should have received a copy of the GNU General Public License     |
24// | along with this program; if not, write to the Free Software           |
25// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
26// | USA.                                                                  |
27// +-----------------------------------------------------------------------+
28
29if (!defined('PHPWG_ROOT_PATH'))
30{
31  die('Hacking attempt!');
32}
33
34class NormalAddIndex extends AddIndex
35{
36  function get_popup_help_content($popup_help_content, $page)
37  {
38    if (in_array($page, array('advanced_feature', 'site_manager')))
39    {
40      $help_content =
41        @file_get_contents(get_language_filepath('help/'.$page.'.html', $this->path));
42    }
43    else
44    {
45      $help_content = false;
46    }
47
48    if ($help_content == false)
49    {
50      return $popup_help_content;
51    }
52    else
53    {
54      return $popup_help_content.$help_content;
55    }
56  }
57}
58
59// Create object
60$add_index = new NormalAddIndex();
61
62// Add events
63add_event_handler('get_popup_help_content', array(&$add_index, 'get_popup_help_content'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
64
65?>
Note: See TracBrowser for help on using the repository browser.