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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

contact_admin_info.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.46 KiB


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 contact_admin_info extends \phpbb\textreparser\base
17  {
18      /**
19      * @var \phpbb\config\db_text
20      */
21      protected $config_text;
22   
23      /**
24      * Constructor
25      *
26      * @param \phpbb\config\db_text $config_text
27      */
28      public function __construct(\phpbb\config\db_text $config_text)
29      {
30          $this->config_text = $config_text;
31      }
32   
33      /**
34      * {@inheritdoc}
35      */
36      public function get_max_id()
37      {
38          return 1;
39      }
40   
41      /**
42      * {@inheritdoc}
43      */
44      protected function get_records_by_range($min_id, $max_id)
45      {
46          $values = $this->config_text->get_array(array(
47              'contact_admin_info',
48              'contact_admin_info_uid',
49              'contact_admin_info_flags',
50          ));
51   
52          return array(array(
53              'id'               => 1,
54              'text'             => $values['contact_admin_info'],
55              'bbcode_uid'       => $values['contact_admin_info_uid'],
56              'enable_bbcode'    => $values['contact_admin_info_flags'] & OPTION_FLAG_BBCODE,
57              'enable_magic_url' => $values['contact_admin_info_flags'] & OPTION_FLAG_LINKS,
58              'enable_smilies'   => $values['contact_admin_info_flags'] & OPTION_FLAG_SMILIES,
59          ));
60      }
61   
62      /**
63      * {@inheritdoc}
64      */
65      protected function save_record(array $record)
66      {
67          $this->config_text->set('contact_admin_info', $record['text']);
68      }
69  }
70