Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
user_signature.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * 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 }
66