Авторизация
Подписчики
0
[IPB] Фикс панели модератора 3.x.x
Описание
В данном мануале расскажу как вам зафиксить ошибку с отображением панели модератора, в основном это возникает если вы берете старый шаблон и устанавливаете на новый движок!
Если у вас возникла такая проблема, я вам подскажу как исправить.
Переходим во вкладку > Внешний вид > Темы > topicviewtemplate
ищем здесь такую строку:
ipb.templates['post_moderation'] = new Template("<div id='comment_moderate_box' class='ipsFloatingAction' style='display: none'><span class='desc'>{$this->lang->words['comment_action_count']} </span><select id='tactInPopup' class='input_select'><option value='approve'>{$this->lang->words['cpt_approve']}</option><option value='delete'>{$this->lang->words['cpt_hide']}</option><option value='sundelete'>{$this->lang->words['cpt_undelete']}</option><option value='deletedo'>{$this->lang->words['cpt_delete']}</option><option value='merge'>{$this->lang->words['cpt_merge']}</option><option value='split'>{$this->lang->words['cpt_split']}</option><option value='move'>{$this->lang->words['cpt_move']}</option></select> <input type='button' class='input_submit' id='submitModAction' value='{$this->lang->words['comments_act_go']}' /></div>");
заменяем её на:
ipb.topic.modPerms = []; <if test="$this->memberData['g_is_supmod']"> ipb.topic.modPerms['approve'] = 1; ipb.topic.modPerms['delete'] = 1; ipb.topic.modPerms['hide'] = 1; ipb.topic.modPerms['unhide'] = 1; ipb.topic.modPerms['merge'] = 1; ipb.topic.modPerms['split'] = 1; ipb.topic.modPerms['move'] = 1; <else /> <if test="isset( $this->memberData['forumsModeratorData'][ $forum['id'] ] )"> ipb.topic.modPerms['approve'] = {$this->memberData['forumsModeratorData'][ $forum['id'] ]['post_q']}; ipb.topic.modPerms['delete'] = {$this->memberData['forumsModeratorData'][ $forum['id'] ]['delete_post']}; ipb.topic.modPerms['hide'] = {$this->memberData['forumsModeratorData'][ $forum['id'] ]['bw_mod_soft_delete']}; ipb.topic.modPerms['unhide'] = {$this->memberData['forumsModeratorData'][ $forum['id'] ]['bw_mod_un_soft_delete']}; ipb.topic.modPerms['merge'] = {$this->memberData['forumsModeratorData'][ $forum['id'] ]['split_merge']}; ipb.topic.modPerms['split'] = {$this->memberData['forumsModeratorData'][ $forum['id'] ]['split_merge']}; ipb.topic.modPerms['move'] = {$this->memberData['forumsModeratorData'][ $forum['id'] ]['split_merge']}; </if> </if> ipb.templates['post_moderation'] = new Template("<div id='comment_moderate_box' class='ipsFloatingAction' style='display: none'><span class='desc'>{$this->lang->words['comment_action_count']} </span><select id='tactInPopup' class='input_select'><option value='approve'>{$this->lang->words['cpt_approve']}</option><option value='delete'>{$this->lang->words['cpt_hide']}</option><option value='sundelete'>{$this->lang->words['cpt_undelete']}</option><option value='deletedo'>{$this->lang->words['cpt_delete']}</option><option value='merge'>{$this->lang->words['cpt_merge']}</option><option value='split'>{$this->lang->words['cpt_split']}</option><option value='move'>{$this->lang->words['cpt_move']}</option></select> <input type='button' class='input_submit' id='submitModAction' value='{$this->lang->words['comments_act_go']}' /></div>");
Дальше ищем следующую вкладку > Внешний вид > Темы > forumIndexTemplate
ищем такую строчку:
ipb.templates['topic_moderation'] = new Template("<div id='comment_moderate_box' class='ipsFloatingAction' style='display: none'><span class='desc'>{$this->lang->words['f_comment_action_count']} </span><select id='tactInPopup' class='input_select'></select> <input type='button' class='input_submit' id='submitModAction' value='{$this->lang->words['comments_act_go']}' /></div>");
заменяем её на:
ipb.forums.modPerms = []; <if test="$this->memberData['g_is_supmod']"> ipb.forums.modPerms['approve'] = 1; ipb.forums.modPerms['delete'] = 1; ipb.forums.modPerms['hide'] = 1; ipb.forums.modPerms['unhide'] = 1; ipb.forums.modPerms['pin'] = 1; ipb.forums.modPerms['unpin'] = 1; ipb.forums.modPerms['open'] = 1; ipb.forums.modPerms['close'] = 1; ipb.forums.modPerms['move'] = 1; ipb.forums.modPerms['merge'] = 1; <else /> <if test="isset( $this->memberData['forumsModeratorData'][ $forum_data['id'] ] )"> ipb.forums.modPerms['approve'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['topic_q']}; ipb.forums.modPerms['delete'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['delete_topic']}; ipb.forums.modPerms['hide'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['bw_mod_soft_delete']}; ipb.forums.modPerms['unhide'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['bw_mod_un_soft_delete']}; ipb.forums.modPerms['pin'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['pin_topic']}; ipb.forums.modPerms['unpin'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['unpin_topic']}; ipb.forums.modPerms['open'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['open_topic']}; ipb.forums.modPerms['close'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['close_topic']}; ipb.forums.modPerms['move'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['move_topic']}; ipb.forums.modPerms['merge'] = {$this->memberData['forumsModeratorData'][ $forum_data['id'] ]['split_merge']}; </if> </if> ipb.templates['topic_moderation'] = new Template("<div id='comment_moderate_box' class='ipsFloatingAction' style='display: none'><span class='desc'>{$this->lang->words['f_comment_action_count']} </span><select id='tactInPopup' class='input_select'></select> <input type='button' class='input_submit' id='submitModAction' value='{$this->lang->words['comments_act_go']}' /></div>");
Результат что же вы видим? о БОЖЕ ОНО РАБОАТЕТ!1!111!111!!!!
СТАВЬ ПЛЮСИК ЕСЛИ ПОМОГЛО, ЕСЛИ НЕ ПОМОГЛО ЖМИ НА КОЛОКОЛЬЧИК ПОДПИСЫВАЙСЯ НА МОЕ СООБЩЕСТВО
- 2
Рекомендуемые комментарии
Комментариев нет