Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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

ext.php

Zuletzt modifiziert: 02.04.2025, 15:02 - Dateigröße: 1.59 KiB


01  <?php
02  /**
03   *
04   * VigLink extension for the phpBB Forum Software package.
05   *
06   * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
07   * @license GNU General Public License, version 2 (GPL-2.0)
08   *
09   */
10   
11  namespace phpbb\viglink;
12   
13  /**
14   * Extension class for custom enable/disable/purge actions
15   */
16  class ext extends \phpbb\extension\base
17  {
18      /**
19       * Check whether the extension can be enabled.
20       * The current phpBB version should meet or exceed
21       * the minimum version required by this extension:
22       *
23       * Requires phpBB 3.2.0-b1 or greater
24       *
25       * @return bool
26       */
27      public function is_enableable()
28      {
29          return phpbb_version_compare(PHPBB_VERSION, '3.2.0-b1', '>=');
30      }
31   
32      /**
33       * Check phpBB's VigLink switches and set them during install
34       *
35       * @param    mixed    $old_state    The return value of the previous call
36       *                                of this method, or false on the first call
37       *
38       * @return    mixed                Returns false after last step, otherwise
39       *                                temporary state which is passed as an
40       *                                argument to the next step
41       */
42      public function enable_step($old_state)
43      {
44          if ($old_state === false)
45          {
46              $viglink_helper = new \phpbb\viglink\acp\viglink_helper(
47                  $this->container->get('cache.driver'),
48                  $this->container->get('config'),
49                  $this->container->get('file_downloader'),
50                  $this->container->get('language'),
51                  $this->container->get('log'),
52                  $this->container->get('user')
53              );
54   
55              try
56              {
57                  $viglink_helper->set_viglink_services();
58              }
59              catch (\RuntimeException $e)
60              {
61                  $viglink_helper->log_viglink_error($e->getMessage());
62              }
63   
64              return 'viglink';
65          }
66   
67          return parent::enable_step($old_state);
68      }
69  }
70