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 |
type_googleplus.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\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