diff options
| author | Shitiz Garg <mail@dragooon.net> | 2014-06-17 17:51:07 +0530 |
|---|---|---|
| committer | Shitiz Garg <mail@dragooon.net> | 2014-06-20 18:10:08 +0530 |
| commit | 310b8af1482021cf8ab6fbe839a4150ff281c4e1 (patch) | |
| tree | 76aa3351c8724e7c29171c7690a5b129db200b22 /phpBB/phpbb | |
| parent | 70d4ede9b204ba9d2c3e1ae14258cd8c879db403 (diff) | |
| download | forums-310b8af1482021cf8ab6fbe839a4150ff281c4e1.tar forums-310b8af1482021cf8ab6fbe839a4150ff281c4e1.tar.gz forums-310b8af1482021cf8ab6fbe839a4150ff281c4e1.tar.bz2 forums-310b8af1482021cf8ab6fbe839a4150ff281c4e1.tar.xz forums-310b8af1482021cf8ab6fbe839a4150ff281c4e1.zip | |
[ticket/12729] Add Facebook custom profile field
PHPBB3-12729
Diffstat (limited to 'phpBB/phpbb')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php | 62 | ||||
| -rw-r--r-- | phpBB/phpbb/profilefields/type/type_string_common.php | 1 |
2 files changed, 63 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php b/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php new file mode 100644 index 0000000000..1bbf6f2068 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php @@ -0,0 +1,62 @@ +<?php +/** + * + * This file is part of the phpBB Forum Software package. + * + * @copyright (c) phpBB Limited <https://www.phpbb.com> + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\db\migration\data\v310; + +class profilefield_facebook extends \phpbb\db\migration\profilefield_base_migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_types', + '\phpbb\db\migration\data\v310\profilefield_show_novalue', + ); + } + + public function update_data() + { + return array( + array('custom', array(array($this, 'create_custom_field'))), + ); + } + + protected $profilefield_name = 'phpbb_facebook'; + + protected $profilefield_database_type = array('VCHAR', ''); + + protected $profilefield_data = array( + 'field_name' => 'phpbb_facebook', + 'field_type' => 'profilefields.type.string', + 'field_ident' => 'phpbb_facebook', + 'field_length' => '20', + 'field_minlen' => '5', + 'field_maxlen' => '50', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '[\w.]+', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => 'VIEW_FACEBOOK_PROFILE', + 'field_contact_url' => 'http://facebook.com/%s/', + ); + + +} diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php index 7d0cb04d7c..014950c15f 100644 --- a/phpBB/phpbb/profilefields/type/type_string_common.php +++ b/phpBB/phpbb/profilefields/type/type_string_common.php @@ -21,6 +21,7 @@ abstract class type_string_common extends type_base 'ALPHA_ONLY' => '[\w]+', 'ALPHA_UNDERSCORE' => '[\w_]+', 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+', + 'ALPHA_DOTS' => '[\w.]+', ); /** |
