Skip to content

Commit 3937c9c

Browse files
committed
Remove messaging section from profile
May be replaced later with a « social » plugin, with more recent informations
1 parent d37ecf5 commit 3937c9c

File tree

13 files changed

+5
-219
lines changed

13 files changed

+5
-219
lines changed

featherbb/Controller/Profile.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,6 @@ public function display($req, $res, $args)
140140

141141
View::addTemplate('profile/menu.php', 5)->addTemplate('profile/section_personal.php')->display();
142142

143-
} elseif ($args['section'] == 'messaging') {
144-
145-
View::setPageInfo(array(
146-
'title' => array(Utils::escape(ForumSettings::get('o_board_title')), __('Profile'), __('Section messaging')),
147-
'active_page' => 'profile',
148-
'page' => 'messaging',
149-
'user' => $user,
150-
'id' => $args['id']
151-
));
152-
153-
View::addTemplate('profile/menu.php', 5)->addTemplate('profile/section_messaging.php')->display();
154-
155143
} elseif ($args['section'] == 'personality') {
156144
if (ForumSettings::get('o_avatars') == '0' && ForumSettings::get('o_signatures') == '0') {
157145
throw new Error(__('Bad request'), 404);

featherbb/Model/Admin/Users.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ public function get_user_search()
623623

624624
$like_command = (ForumSettings::get('db_type') == 'pgsql') ? 'ILIKE' : 'LIKE';
625625
foreach ($form as $key => $input) {
626-
if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note'))) {
626+
if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'location', 'signature', 'admin_note'))) {
627627
$search['conditions'][] = 'u.'.str_replace("'","''",$key).' '.$like_command.' \''.str_replace("'","''",str_replace('*', '%', $input)).'\'';
628628
$search['query_str'][] = 'form%5B'.$key.'%5D='.urlencode($input);
629629
}

featherbb/Model/Api/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function display($id)
2020
// Remove sensitive fields for regular users
2121
if (!$this->isAdMod) {
2222
Container::get('hooks')->bind('model.profile.get_user_info', function ($user) {
23-
$user = $user->select_delete_many(array('u.email', 'u.jabber', 'u.icq', 'u.msn', 'u.aim', 'u.yahoo', 'u.registration_ip', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit'));
23+
$user = $user->select_delete_many(array('u.email', 'u.registration_ip', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit'));
2424
return $user;
2525
});
2626
}
@@ -35,4 +35,4 @@ public function display($id)
3535

3636
return $data;
3737
}
38-
}
38+
}

featherbb/Model/Install.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,6 @@ class Install
225225
`title` varchar(50) DEFAULT NULL,
226226
`realname` varchar(40) DEFAULT NULL,
227227
`url` varchar(100) DEFAULT NULL,
228-
`jabber` varchar(80) DEFAULT NULL,
229-
`icq` varchar(12) DEFAULT NULL,
230-
`msn` varchar(80) DEFAULT NULL,
231-
`aim` varchar(30) DEFAULT NULL,
232-
`yahoo` varchar(30) DEFAULT NULL,
233228
`location` varchar(30) DEFAULT NULL,
234229
`signature` text,
235230
`disp_topics` tinyint(3) unsigned DEFAULT NULL,

featherbb/Model/Profile.php

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -790,24 +790,6 @@ public function update_profile($id, $info, $section)
790790
break;
791791
}
792792

793-
case 'messaging':
794-
{
795-
$form = array(
796-
'jabber' => Utils::trim(Input::post('form_jabber')),
797-
'icq' => Utils::trim(Input::post('form_icq')),
798-
'msn' => Utils::trim(Input::post('form_msn')),
799-
'aim' => Utils::trim(Input::post('form_aim')),
800-
'yahoo' => Utils::trim(Input::post('form_yahoo')),
801-
);
802-
803-
// If the ICQ UIN contains anything other than digits it's invalid
804-
if (preg_match('%[^0-9]%', $form['icq'])) {
805-
throw new Error(__('Bad ICQ'));
806-
}
807-
808-
break;
809-
}
810-
811793
case 'personality':
812794
{
813795
$form = array();
@@ -1012,7 +994,7 @@ public function update_profile($id, $info, $section)
1012994

1013995
public function get_user_info($id)
1014996
{
1015-
$user['select'] = array('u.id', 'u.username', 'u.email', 'u.title', 'u.realname', 'u.url', 'u.jabber', 'u.icq', 'u.msn', 'u.aim', 'u.yahoo', 'u.location', 'u.signature', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.num_posts', 'u.last_post', 'u.registered', 'u.registration_ip', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit', 'g.g_id', 'g.g_user_title', 'g.g_moderator');
997+
$user['select'] = array('u.id', 'u.username', 'u.email', 'u.title', 'u.realname', 'u.url', 'u.location', 'u.signature', 'u.disp_topics', 'u.disp_posts', 'u.email_setting', 'u.notify_with_post', 'u.auto_notify', 'u.show_smilies', 'u.show_img', 'u.show_img_sig', 'u.show_avatars', 'u.show_sig', 'u.timezone', 'u.dst', 'u.language', 'u.style', 'u.num_posts', 'u.last_post', 'u.registered', 'u.registration_ip', 'u.admin_note', 'u.date_format', 'u.time_format', 'u.last_visit', 'g.g_id', 'g.g_user_title', 'g.g_moderator');
1016998

1017999
$user = DB::for_table('users')
10181000
->table_alias('u')
@@ -1070,31 +1052,6 @@ public function parse_user_info($user)
10701052
$user_info['personal'][] = '<dd><span class="email">'.$user['email_field'].'</span></dd>';
10711053
}
10721054

1073-
if ($user['jabber'] != '') {
1074-
$user_info['messaging'][] = '<dt>'.__('Jabber').'</dt>';
1075-
$user_info['messaging'][] = '<dd>'.Utils::escape((ForumSettings::get('o_censoring') == '1') ? Utils::censor($user['jabber']) : $user['jabber']).'</dd>';
1076-
}
1077-
1078-
if ($user['icq'] != '') {
1079-
$user_info['messaging'][] = '<dt>'.__('ICQ').'</dt>';
1080-
$user_info['messaging'][] = '<dd>'.$user['icq'].'</dd>';
1081-
}
1082-
1083-
if ($user['msn'] != '') {
1084-
$user_info['messaging'][] = '<dt>'.__('MSN').'</dt>';
1085-
$user_info['messaging'][] = '<dd>'.Utils::escape((ForumSettings::get('o_censoring') == '1') ? Utils::censor($user['msn']) : $user['msn']).'</dd>';
1086-
}
1087-
1088-
if ($user['aim'] != '') {
1089-
$user_info['messaging'][] = '<dt>'.__('AOL IM').'</dt>';
1090-
$user_info['messaging'][] = '<dd>'.Utils::escape((ForumSettings::get('o_censoring') == '1') ? Utils::censor($user['aim']) : $user['aim']).'</dd>';
1091-
}
1092-
1093-
if ($user['yahoo'] != '') {
1094-
$user_info['messaging'][] = '<dt>'.__('Yahoo').'</dt>';
1095-
$user_info['messaging'][] = '<dd>'.Utils::escape((ForumSettings::get('o_censoring') == '1') ? Utils::censor($user['yahoo']) : $user['yahoo']).'</dd>';
1096-
}
1097-
10981055
if (ForumSettings::get('o_avatars') == '1') {
10991056
$avatar_field = Utils::generate_avatar_markup($user['id']);
11001057
if ($avatar_field != '') {

featherbb/View/admin/users/admin_users.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,6 @@
4646
<th scope="row"><?php _e('Website label') ?></th>
4747
<td><input type="text" name="form[url]" size="35" maxlength="100" tabindex="6" /></td>
4848
</tr>
49-
<tr>
50-
<th scope="row"><?php _e('Jabber label') ?></th>
51-
<td><input type="text" name="form[jabber]" size="30" maxlength="75" tabindex="7" /></td>
52-
</tr>
53-
<tr>
54-
<th scope="row"><?php _e('ICQ label') ?></th>
55-
<td><input type="text" name="form[icq]" size="12" maxlength="12" tabindex="8" /></td>
56-
</tr>
57-
<tr>
58-
<th scope="row"><?php _e('MSN label') ?></th>
59-
<td><input type="text" name="form[msn]" size="30" maxlength="50" tabindex="9" /></td>
60-
</tr>
61-
<tr>
62-
<th scope="row"><?php _e('AOL label') ?></th>
63-
<td><input type="text" name="form[aim]" size="20" maxlength="20" tabindex="10" /></td>
64-
</tr>
65-
<tr>
66-
<th scope="row"><?php _e('Yahoo label') ?></th>
67-
<td><input type="text" name="form[yahoo]" size="20" maxlength="20" tabindex="11" /></td>
68-
</tr>
6949
<tr>
7050
<th scope="row"><?php _e('Location label') ?></th>
7151
<td><input type="text" name="form[location]" size="30" maxlength="30" tabindex="12" /></td>

featherbb/View/profile/menu.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
echo ' class="isactive"';
2929
}
3030
?>><a href="<?= Router::pathFor('profileSection', ['id' => $id, 'section' => 'personal']) ?>"><?php _e('Section personal') ?></a></li>
31-
<li<?php if ($page == 'messaging') {
32-
echo ' class="isactive"';
33-
}
34-
?>><a href="<?= Router::pathFor('profileSection', ['id' => $id, 'section' => 'messaging']) ?>"><?php _e('Section messaging') ?></a></li>
3531
<?php if (ForumSettings::get('o_avatars') == '1' || ForumSettings::get('o_signatures') == '1'): ?> <li<?php if ($page == 'personality') {
3632
echo ' class="isactive"';
3733
}

featherbb/View/profile/section_messaging.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

featherbb/View/profile/view_profile.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,7 @@
3030
</div>
3131
</fieldset>
3232
</div>
33-
<?php if (!empty($user_info['messaging'])): ?> <div class="inform">
34-
<fieldset>
35-
<legend><?php _e('Section messaging') ?></legend>
36-
<div class="infldset">
37-
<dl>
38-
<?= implode("\n\t\t\t\t\t\t\t", $user_info['messaging'])."\n" ?>
39-
</dl>
40-
<div class="clearer"></div>
41-
</div>
42-
</fieldset>
43-
</div>
44-
<?php endif; if (!empty($user_info['personality'])): ?> <div class="inform">
33+
<?php if (!empty($user_info['personality'])): ?> <div class="inform">
4534
<fieldset>
4635
<legend><?php _e('Section personality') ?></legend>
4736
<div class="infldset">

featherbb/lang/English/admin/users.po

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,6 @@ msgstr "Real name"
131131
msgid "Website label"
132132
msgstr "Website"
133133

134-
msgid "Jabber label"
135-
msgstr "Jabber"
136-
137-
msgid "ICQ label"
138-
msgstr "ICQ"
139-
140-
msgid "MSN label"
141-
msgstr "Microsoft Account"
142-
143-
msgid "AOL label"
144-
msgstr "AOL IM"
145-
146-
msgid "Yahoo label"
147-
msgstr "Yahoo Messenger"
148-
149134
msgid "Location label"
150135
msgstr "Location"
151136

0 commit comments

Comments
 (0)