From 4489066c982c1044028295164ec2f2e840c16881 Mon Sep 17 00:00:00 2001 From: rub Date: Mon, 8 Jan 2007 00:16:10 +0000 Subject: 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 --- popuphelp.php | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'popuphelp.php') 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'] = '

'.$title.'

'; 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 -- cgit v1.2.3