Changeset 1699 for trunk/popuphelp.php


Ignore:
Timestamp:
Jan 8, 2007, 1:16:10 AM (17 years ago)
Author:
rub
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/popuphelp.php

    r1072 r1699  
    4343include(PHPWG_ROOT_PATH.'include/page_header.php');
    4444
    45 $template->set_filenames(
    46   array(
    47     'help_content' => get_language_filepath('help/'.$_GET['page'].'.html')
    48     )
    49   );
     45if
     46  (
     47    isset($_GET['page'])
     48    and preg_match('/^[a-z_]*$/', $_GET['page'])
     49  )
     50{
     51  $help_content =
     52    @file_get_contents(get_language_filepath('help/'.$_GET['page'].'.html'));
     53
     54  if ($help_content == false)
     55  {
     56    $help_content = '';
     57  }
     58
     59  $help_content = trigger_event(
     60    'get_popup_help_content', $help_content, $_GET['page']);
     61}
     62else
     63{
     64  die('Hacking attempt!');
     65}
    5066
    5167$template->set_filenames(array('popuphelp' => 'popuphelp.tpl'));
    5268
    53 $template->assign_var_from_handle('HELP_CONTENT', 'help_content');
     69$template->assign_vars(
     70  array
     71  (
     72    'HELP_CONTENT' => $help_content
     73  ));
    5474
    5575// +-----------------------------------------------------------------------+
     
    6080
    6181include(PHPWG_ROOT_PATH.'include/page_tail.php');
     82
    6283?>
Note: See TracChangeset for help on using the changeset viewer.