andaril 4 04/16/2007 08:41 PM (edited) Имя файла: Мод "Закрепленное сообщение"Владелец файла: andarilФайл размещен: 16 апр 2007Файл обновлен: 14 фев 2011Категория файла: Mods/Моды Эта модификация позволяет добавлять способность модераторов закреплять и откреплять первое сообщение темы, чтобы оно показавалось на каждой странице темы.+---------------------------------------------------------------------| Invision Power Board v2.2.x| =================================================================| При поддержке ipbskins.ru| =================================================================+---------------------------------------------------------------------|| > Мод "Закрепленное сообщение"| > Автор fr0z3n aka andar!l|| > Автор оригинального мода для версий 2.1.х Alex| > Версия: 1.1| > Дата: 26.05.2007|+---------------------------------------------------------------------|| > Эта модификация позволяет добавлять способность модераторов | > закреплять и откреплять первое сообщение темы, чтобы оно | > показавалось на каждой странице темы.|| > This mod adds moderators possibility to pin and unpin| > first post in any thread they have open/close rights.|+---------------------------------------------------------------------|| > Автор не несет ответственности за проблемы в связи с | > использованием этой модификации| > Используйте мод на свой страх и риск.|| > Author is not responsible for any consequences of using this| > forum modification, including those caused by this module| > Use at your own risk|+---------------------------------------------------------------------Закрепить и открепить сообщение могут модераторы имеющие права закреплять и откреплять темы, соответственно. Нажмите сюда, чтобы скачать этот файл Edited February 14, 2011 by andaril Share this post Link to post
andaril 4 04/21/2007 09:48 AM http://www.ibrportal.net/board/index.php?showtopic=497 Share this post Link to post
GeoLik 42 05/26/2007 09:44 AM Уважаемый Автор!Установил мод. Но возникли проблемы при отображении топиков:- опрос начал дублироваться в шапке, вот пример- также дублируется правила раздела, вот тоже примерПроверил несколько раз согласно инструкции, отличий от написанного Вами не нашел.Не подскажете, как быть в данном случае?Версия 2.2.2 русская Share this post Link to post
andaril 4 05/26/2007 10:10 AM обновил. Выбрал простой вариант. ---------------------------------------------------------------------- ./sources/lib/func_topic_linear.php ---------------------------------------------------------------------- НАЙТИ ---------------------------------------------------------------------- // [bEGIN] PIN Mod: Pinning first post in the topics if ( $this->lib->topic_view_mode == 'linear' and $this->first_printed == 0 and $row['pid'] == $this->topic['topic_firstpost'] and $first > 0) { $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_end_outline( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ) ); $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 1 ); } // [END] PIN Mod: Pinning first post in the topics ---------------------------------------------------------------------- ЗАМЕНИТЬ НА ---------------------------------------------------------------------- // [bEGIN] PIN Mod: Pinning first post in the topics if ( $this->lib->topic_view_mode == 'linear' and $this->first_printed == 0 and $row['pid'] == $this->topic['topic_firstpost'] and $first > 0) { $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_end_first_post( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ) ); } // [END] PIN Mod: Pinning first post in the topicsИли более сложный вариант---------------------------------------------------------------------- ./sources/lib/func_topic_linear.php ---------------------------------------------------------------------- НАЙТИ ---------------------------------------------------------------------- // [bEGIN] PIN Mod: Pinning first post in the topics if ( $this->lib->topic_view_mode == 'linear' and $this->first_printed == 0 and $row['pid'] == $this->topic['topic_firstpost'] and $first > 0) { $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_end_outline( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ) ); $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 1 ); } // [END] PIN Mod: Pinning first post in the topics ---------------------------------------------------------------------- ЗАМЕНИТЬ НА ---------------------------------------------------------------------- // [bEGIN] PIN Mod: Pinning first post in the topics if ( $this->lib->topic_view_mode == 'linear' and $this->first_printed == 0 and $row['pid'] == $this->topic['topic_firstpost'] and $first > 0) { $this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_end_pinned_post( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ) ); } // [END] PIN Mod: Pinning first post in the topics ###################################################################### ACP Home > Style Manager Home > Edit Template HTML > Topic view (skin_topic) Редактирование HTML фрагментов ====================================================================== Add Template Bit (Создаем новый HTML фрагмент) -----------------------------------------+---------------------------- New Template Bit Name: | topic_end_pinned_post -----------------------------------------+---------------------------- New Template Bit Incoming Data Variables:| $data="" -----------------------------------------+---------------------------- New Template Bit Group... | skin_topic -----------------------------------------+---------------------------- Тело шаблона: ---------------------------------------------------------------------- </div> <table class='ipbtable' cellspacing="0"> <tr> <td style='padding-left:0px' width="40%" valign="middle" nowrap="nowrap"><div>{$data['TOPIC']['SHOW_PAGES']} {$data['TOPIC']['go_new']}</div></td> <td class='nopad' style='padding:5px 0px 5px 0px' align="right" width="60%" valign="middle">{$data['TOPIC']['REPLY_BUTTON']}<a href="{$this->ipsclass->base_url}act=post&do=new_post&f={$data['FORUM']['id']}" title="{$this->ipsclass->lang['start_new_topic']}"><{A_POST}></a></td> </tr> </table> <a name="firstpost"></a> <div class="borderwrap"> <div class="maintitle">{$this->ipsclass->lang['tom_replies']} </div> ====================================================================== Share this post Link to post
GeoLik 42 05/26/2007 10:12 AM (edited) Благодарю, сейчас попробую! пока дал ошибку:Fatal error: Call to undefined method skin_topic_4::topic_end_pinned_post() in ...... /forum/sources/lib/func_topic_linear.php on line 432Это было без "Редактирование HTML фрагментов" - "более сложный вариант"по ссылке. Продолжаю После создания "topic_end_pinned_post" все заработало как надо (никаких видимых глюков не обнаружил) а ошибка вылезла, из-за того, что невнимательно сравнил фрагменты кода для простого и сложного вариантов, там разные html фрагменты используются. в первом существующий "topic_end_first_post", а во втором, создаваемый вновь "topic_end_pinned_post".Переживаю, что кто-то еще может из-за невнимательно начать задавать вопросы. Благодарю за очень полезный скрипт и оперативную помощь!!! Edited May 26, 2007 by Валерий Викторович Share this post Link to post
andaril 4 05/26/2007 10:42 AM Так в шаблон фрагмент вставить обязательно надо сейчас вижу что все в порядке Share this post Link to post
ruber 0 09/24/2007 02:15 PM http://www.ibrportal.net/board/index.php?showtopic=497Сайт переехал, хотелось бы новую ссылочку. Share this post Link to post
Ultramoto.org 0 03/13/2008 01:26 PM Не хотел рисковать, но попробую всё-таки, потом отпишу. Share this post Link to post
Ultramoto.org 0 05/21/2008 01:07 PM (edited) Забыл отписать, 2.3.3 работает, только есть нюанс: при закреплении сообщения в теме с 2 и более страниц, в закреплённом сообщении не отображаются прикреплённые через форму ответа файлы, вместо них обычные коды. Edited May 21, 2008 by Ultramoto.org Share this post Link to post