aboutsummaryrefslogtreecommitdiffstats
path: root/popuphelp.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-01-08 00:16:10 +0000
committerrub <rub@piwigo.org>2007-01-08 00:16:10 +0000
commit4489066c982c1044028295164ec2f2e840c16881 (patch)
tree9dbe71687d9ac6743b7137b45c943d15eb28e045 /popuphelp.php
parentf992150313a63d30aeda6e5f3dcd64fc62a06adb (diff)
Feature Issue ID 0000496: Integrate MOD add_index on PWG with plugin.lang.php
Add some plugin triggers: o for help o for language o for site manager o for advanced features Allow to launch directly plugin page (without section key) Add add_index plugin, available on site manager and advanced features Configuration page and best help must be coming soon. git-svn-id: http://piwigo.org/svn/trunk@1699 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'popuphelp.php')
-rw-r--r--popuphelp.php33
1 files changed, 27 insertions, 6 deletions
diff --git a/popuphelp.php b/popuphelp.php
index a66ded4a7..39abd3596 100644
--- a/popuphelp.php
+++ b/popuphelp.php
@@ -42,15 +42,35 @@ $title = l10n('PhpWebGallery Help');
$page['page_banner'] = '<h1>'.$title.'</h1>';
include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->set_filenames(
- array(
- 'help_content' => get_language_filepath('help/'.$_GET['page'].'.html')
- )
- );
+if
+ (
+ isset($_GET['page'])
+ and preg_match('/^[a-z_]*$/', $_GET['page'])
+ )
+{
+ $help_content =
+ @file_get_contents(get_language_filepath('help/'.$_GET['page'].'.html'));
+
+ if ($help_content == false)
+ {
+ $help_content = '';
+ }
+
+ $help_content = trigger_event(
+ 'get_popup_help_content', $help_content, $_GET['page']);
+}
+else
+{
+ die('Hacking attempt!');
+}
$template->set_filenames(array('popuphelp' => 'popuphelp.tpl'));
-$template->assign_var_from_handle('HELP_CONTENT', 'help_content');
+$template->assign_vars(
+ array
+ (
+ 'HELP_CONTENT' => $help_content
+ ));
// +-----------------------------------------------------------------------+
// | html code display |
@@ -59,4 +79,5 @@ $template->assign_var_from_handle('HELP_CONTENT', 'help_content');
$template->parse('popuphelp');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
+
?> \ No newline at end of file