[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/phpbb/textreparser/plugins/ -> user_signature.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  namespace phpbb\textreparser\plugins;
  15  
  16  class user_signature extends \phpbb\textreparser\row_based_plugin
  17  {
  18      /**
  19      * @var array Bit numbers used for user options
  20      * @see \phpbb\user
  21      */
  22      protected $keyoptions;
  23  
  24      /**
  25      * {@inheritdoc}
  26      */
  27  	protected function add_missing_fields(array $row)
  28      {
  29          if (!isset($this->keyoptions))
  30          {
  31              $this->save_keyoptions();
  32          }
  33  
  34          $options = $row['user_options'];
  35          $row += array(
  36              'enable_bbcode'    => phpbb_optionget($this->keyoptions['sig_bbcode'], $options),
  37              'enable_smilies'   => phpbb_optionget($this->keyoptions['sig_smilies'], $options),
  38              'enable_magic_url' => phpbb_optionget($this->keyoptions['sig_links'], $options),
  39          );
  40  
  41          return parent::add_missing_fields($row);
  42      }
  43  
  44      /**
  45      * {@inheritdoc}
  46      */
  47  	public function get_columns()
  48      {
  49          return array(
  50              'id'           => 'user_id',
  51              'text'         => 'user_sig',
  52              'bbcode_uid'   => 'user_sig_bbcode_uid',
  53              'user_options' => 'user_options',
  54          );
  55      }
  56  
  57      /**
  58      * Save the keyoptions var from \phpbb\user
  59      */
  60  	protected function save_keyoptions()
  61      {
  62          $class_vars = get_class_vars('phpbb\\user');
  63          $this->keyoptions = $class_vars['keyoptions'];
  64      }
  65  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1