[ Index ]

PHP Cross Reference of phpBB-3.1.10-deutsch

title

Body

[close]

/ -> faq.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  /**
  15  * @ignore
  16  */
  17  define('IN_PHPBB', true);
  18  $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
  19  $phpEx = substr(strrchr(__FILE__, '.'), 1);
  20  include($phpbb_root_path . 'common.' . $phpEx);
  21  
  22  // Start session management
  23  $user->session_begin();
  24  $auth->acl($user->data);
  25  $user->setup();
  26  
  27  $mode = request_var('mode', '');
  28  
  29  // Load the appropriate faq file
  30  switch ($mode)
  31  {
  32      case 'bbcode':
  33          $l_title = $user->lang['BBCODE_GUIDE'];
  34          $user->add_lang('bbcode', false, true);
  35      break;
  36  
  37      default:
  38          $page_title = $user->lang['FAQ_EXPLAIN'];
  39          $ext_name = $lang_file = '';
  40  
  41          /**
  42           * You can use this event display a custom help page
  43           *
  44           * @event core.faq_mode_validation
  45           * @var    string    page_title        Title of the page
  46           * @var    string    mode            FAQ that is going to be displayed
  47           * @var    string    lang_file        Language file containing the help data
  48           * @var    string    ext_name        Vendor and extension name where the help
  49           *                                language file can be loaded from
  50           * @since 3.1.4-RC1
  51           */
  52          $vars = array(
  53              'page_title',
  54              'mode',
  55              'lang_file',
  56              'ext_name',
  57          );
  58          extract($phpbb_dispatcher->trigger_event('core.faq_mode_validation', compact($vars)));
  59  
  60          $l_title = $page_title;
  61          $user->add_lang(($lang_file) ? $lang_file : 'faq', false, true, $ext_name);
  62      break;
  63  }
  64  
  65  // Pull the array data from the lang pack
  66  $switch_column = $found_switch = false;
  67  $help_blocks = array();
  68  foreach ($user->help as $help_ary)
  69  {
  70      if ($help_ary[0] == '--')
  71      {
  72          if ($help_ary[1] == '--')
  73          {
  74              $switch_column = true;
  75              $found_switch = true;
  76              continue;
  77          }
  78  
  79          $template->assign_block_vars('faq_block', array(
  80              'BLOCK_TITLE'        => $help_ary[1],
  81              'SWITCH_COLUMN'        => $switch_column,
  82          ));
  83  
  84          if ($switch_column)
  85          {
  86              $switch_column = false;
  87          }
  88          continue;
  89      }
  90  
  91      $template->assign_block_vars('faq_block.faq_row', array(
  92          'FAQ_QUESTION'        => $help_ary[0],
  93          'FAQ_ANSWER'        => $help_ary[1])
  94      );
  95  }
  96  
  97  // Lets build a page ...
  98  $template->assign_vars(array(
  99      'L_FAQ_TITLE'                => $l_title,
 100      'L_BACK_TO_TOP'                => $user->lang['BACK_TO_TOP'],
 101  
 102      'SWITCH_COLUMN_MANUALLY'    => (!$found_switch) ? true : false,
 103      'S_IN_FAQ'                    => true,
 104  ));
 105  
 106  page_header($l_title);
 107  
 108  $template->set_filenames(array(
 109      'body' => 'faq_body.html')
 110  );
 111  make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
 112  
 113  page_footer();


Generated: Sun Feb 19 19:52:41 2017 Cross-referenced by PHPXref 0.7.1