Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

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

type_googleplus.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.14 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\profilefields\type;
15   
16  class type_googleplus extends type_string
17  {
18      /**
19      * {@inheritDoc}
20      */
21      public function get_name()
22      {
23          return $this->user->lang('FIELD_GOOGLEPLUS');
24      }
25   
26      /**
27      * {@inheritDoc}
28      */
29      public function get_service_name()
30      {
31          return 'profilefields.type.googleplus';
32      }
33   
34      /**
35      * {@inheritDoc}
36      */
37      public function get_default_option_values()
38      {
39          return array(
40              'field_length'            => 20,
41              'field_minlen'            => 3,
42              'field_maxlen'            => 255,
43              'field_validation'        => '(?:(?!\.{2,})([^<>=+]))+',
44              'field_novalue'            => '',
45              'field_default_value'    => '',
46          );
47      }
48   
49      /**
50      * {@inheritDoc}
51      */
52      public function get_profile_contact_value($field_value, $field_data)
53      {
54          if (!$field_value && !$field_data['field_show_novalue'])
55          {
56              return null;
57          }
58   
59          if (!is_numeric($field_value))
60          {
61              $field_value = '+' . $field_value;
62          }
63   
64          return $field_value;
65      }
66  }
67