Skip to content

Commit 5e05277

Browse files
committed
Migrate o_smilies_sig
1 parent f684dc1 commit 5e05277

7 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎featherbb/Controller/Install.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ public function create_db(array $data)
226226
'email.min_interval' => 60,
227227
'report.min_interval' => 60,
228228
'timezone' => 0,
229+
'dst' => 0,
229230
'time_format' => 'H:i:s',
230231
'date_format' => 'Y-m-d',
231232
'language' => $data['language'],
@@ -299,7 +300,7 @@ public function load_default_config(array $data)
299300
'o_show_post_count' => 1,
300301
'o_signatures' => 1,
301302
// 'o_smilies' => 1,
302-
'o_smilies_sig' => 1,
303+
// 'o_smilies_sig' => 1,
303304
'o_make_links' => 1,
304305
// 'o_default_lang' => $data['default_lang'],
305306
// 'o_default_style' => $data['default_style'],

‎featherbb/Core/Parser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function parse_bbcode(&$text, $hide_smilies = 0)
7777
// Set $smile_on flag depending on global flags and whether or not this is a signature.
7878
if ($this->pd['in_signature'])
7979
{
80-
$smile_on = (ForumSettings::get('o_smilies_sig') && User::getPref('smilies') && !$hide_smilies) ? 1 : 0;
80+
$smile_on = (ForumSettings::get('smilies.sig') && User::getPref('smilies') && !$hide_smilies) ? 1 : 0;
8181
}
8282
else
8383
{

‎featherbb/Model/Admin/Options.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function update_options()
3535
'show_user_info' => Input::post('form_show_user_info') != '1' ? '0' : '1',
3636
'show_post_count' => Input::post('form_show_post_count') != '1' ? '0' : '1',
3737
// 'smilies' => Input::post('form_smilies') != '1' ? '0' : '1',
38-
'smilies_sig' => Input::post('form_smilies_sig') != '1' ? '0' : '1',
38+
// 'smilies_sig' => Input::post('form_smilies_sig') != '1' ? '0' : '1',
3939
'make_links' => Input::post('form_make_links') != '1' ? '0' : '1',
4040
'topic_review' => (intval(Input::post('form_topic_review')) >= 0) ? intval(Input::post('form_topic_review')) : 0,
4141
'disp_topics_default' => intval(Input::post('form_disp_topics_default')),
@@ -86,6 +86,7 @@ public function update_options()
8686
'time_format' => Utils::trim(Input::post('form_time_format')),
8787
'date_format' => Utils::trim(Input::post('form_date_format')),
8888
'smilies' => Input::post('form_smilies') != '1' ? '0' : '1',
89+
'smilies.sig' => Input::post('form_smilies_sig') != '1' ? '0' : '1',
8990
);
9091

9192
$form = Container::get('hooks')->fire('model.admin.options.update_options.form', $form);

‎featherbb/View/admin/options.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@
312312
<tr>
313313
<th scope="row"><?php _e('Smilies sigs label') ?></th>
314314
<td>
315-
<label class="conl"><input type="radio" name="form_smilies_sig" value="1"<?php if (ForumSettings::get('o_smilies_sig') == '1') {
315+
<label class="conl"><input type="radio" name="form_smilies_sig" value="1"<?php if (ForumSettings::get('smilies.sig') == '1') {
316316
echo ' checked="checked"';
317317
} ?> />&#160;<strong><?php _e('Yes') ?></strong></label>
318-
<label class="conl"><input type="radio" name="form_smilies_sig" value="0"<?php if (ForumSettings::get('o_smilies_sig') == '0') {
318+
<label class="conl"><input type="radio" name="form_smilies_sig" value="0"<?php if (ForumSettings::get('smilies.sig') == '0') {
319319
echo ' checked="checked"';
320320
} ?> />&#160;<strong><?php _e('No') ?></strong></label>
321321
<span class="clearb"><?php _e('Smilies sigs help') ?></span>

‎featherbb/View/profile/section_display.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@
5959
}
6060

6161
?>
62-
<?php if (ForumSettings::get('smilies') == '1' || ForumSettings::get('o_smilies_sig') == '1' || ForumSettings::get('o_signatures') == '1' || ForumSettings::get('o_avatars') == '1' || (ForumSettings::get('p_message_bbcode') == '1' && ForumSettings::get('p_message_img_tag') == '1')): ?>
62+
<?php if (ForumSettings::get('smilies') == '1' || ForumSettings::get('smilies.sig') == '1' || ForumSettings::get('o_signatures') == '1' || ForumSettings::get('o_avatars') == '1' || (ForumSettings::get('p_message_bbcode') == '1' && ForumSettings::get('p_message_img_tag') == '1')): ?>
6363
<div class="inform">
6464
<fieldset>
6565
<legend><?php _e('Post display legend') ?></legend>
6666
<div class="infldset">
6767
<p><?php _e('Post display info') ?></p>
6868
<div class="rbox">
69-
<?php if (ForumSettings::get('smilies') == '1' || ForumSettings::get('o_smilies_sig') == '1'): ?> <label><input type="checkbox" name="form_show_smilies" value="1"<?php if (User::getPref('smilies', $user['id']) == '1') {
69+
<?php if (ForumSettings::get('smilies') == '1' || ForumSettings::get('smilies.sig') == '1'): ?> <label><input type="checkbox" name="form_show_smilies" value="1"<?php if (User::getPref('smilies', $user['id']) == '1') {
7070
echo ' checked="checked"';
7171
} ?> /><?php _e('Show smilies') ?><br /></label>
7272
<?php endif; if (ForumSettings::get('o_signatures') == '1'): ?> <label><input type="checkbox" name="form_show_sig" value="1"<?php if ($user['show_sig'] == '1') {

‎featherbb/View/profile/section_essentials.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
<?php
225225

226226
foreach ($languages as $temp) {
227-
if ($user['language'] == $temp) {
227+
if (User::getPref('language', $user['id']) == $temp) {
228228
echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>';
229229
} else {
230230
echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>';

‎featherbb/View/profile/section_personality.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<li><span><a href="<?= Router::pathFor('help').'#bbcode' ?>" onclick="window.open(this.href); return false;"><?php _e('BBCode') ?></a> <?= (ForumSettings::get('p_sig_bbcode') == '1') ? __('on') : __('off'); ?></span></li>
4646
<li><span><a href="<?= Router::pathFor('help').'#url' ?>" onclick="window.open(this.href); return false;"><?php _e('url tag') ?></a> <?= (ForumSettings::get('p_sig_bbcode') == '1' && User::can('post.links')) ? __('on') : __('off'); ?></span></li>
4747
<li><span><a href="<?= Router::pathFor('help').'#img' ?>" onclick="window.open(this.href); return false;"><?php _e('img tag') ?></a> <?= (ForumSettings::get('p_sig_bbcode') == '1' && ForumSettings::get('p_sig_img_tag') == '1') ? __('on') : __('off'); ?></span></li>
48-
<li><span><a href="<?= Router::pathFor('help').'#smilies' ?>" onclick="window.open(this.href); return false;"><?php _e('Smilies') ?></a> <?= (ForumSettings::get('o_smilies_sig') == '1') ? __('on') : __('off'); ?></span></li>
48+
<li><span><a href="<?= Router::pathFor('help').'#smilies' ?>" onclick="window.open(this.href); return false;"><?php _e('Smilies') ?></a> <?= (ForumSettings::get('smilies.sig') == '1') ? __('on') : __('off'); ?></span></li>
4949
</ul>
5050
<?= $signature_preview ?>
5151
</div>

0 commit comments

Comments
 (0)