mOba Posted September 27, 2015 Report Share Posted September 27, 2015 Кто-нибудь видел плагин который добавляет кнопку для вставки ника в форму быстрого ответа? по аналогии с http://ipbmafia.ru/topic/213-name-or-quote-in-fast-reply-101/ Quote Link to comment Share on other sites More sharing options...
sk0r Posted October 30, 2015 Report Share Posted October 30, 2015 Друзья подскажите как реализовать такой плюсик как на мафии.. ? Quote Link to comment Share on other sites More sharing options...
Insider Posted October 30, 2015 Report Share Posted October 30, 2015 могу дать на скорую руку это: function() { $(document).trigger('replyToTopic'); var replyArea = $('div[data-role="replyArea"]'); var editor = replyArea.find('[data-role="contentEditor"]'); var editorID = editor.attr('name'); CKEDITOR.instances[editorID].insertHtml($(this).attr("author-title") + ', '); } думаю разберетесь. sk0r 1 Quote Link to comment Share on other sites More sharing options...
sk0r Posted October 30, 2015 Report Share Posted October 30, 2015 Попробовал по разному ( не хочет.. не силен в этом.. Quote Link to comment Share on other sites More sharing options...
alexis Posted November 5, 2015 Report Share Posted November 5, 2015 Insider, спасибо конечно, но знать бы ещё, куда вставлять этот код... :) :( Quote Link to comment Share on other sites More sharing options...
AxelGTR Posted November 7, 2015 Report Share Posted November 7, 2015 Присоединюсь к вопросу выше - куда вставлять? =))) Quote Link to comment Share on other sites More sharing options...
Respected Posted November 7, 2015 Report Share Posted November 7, 2015 Никуда, это не рабочий код Quote Link to comment Share on other sites More sharing options...
Sufiy Posted November 7, 2015 Report Share Posted November 7, 2015 Так через собачку же можно указывать ник, как в твиттере. alexis 1 Quote Link to comment Share on other sites More sharing options...
AxelGTR Posted November 7, 2015 Report Share Posted November 7, 2015 Через собачку долго и неудобно. А так плюсик нажал и все. =) Quote Link to comment Share on other sites More sharing options...
LvsF Posted November 8, 2015 Report Share Posted November 8, 2015 Товарищ Insider придет и корректно скопирует код, порывшись в исходном коде страницы, например этой темы. Quote Link to comment Share on other sites More sharing options...
Septimus Posted November 20, 2015 Report Share Posted November 20, 2015 Вроде, код такой должен быть. <script> jQuery(document).ready(function($){ $(".toAuthor").click(function(){ $(document).trigger('replyToTopic'); var replyArea=$('div[data-role="replyArea"]'); var editor=replyArea.find('[data-role="contentEditor"]'); var editorID=editor.attr('name'); CKEDITOR.instances[editorID].insertHtml($(this).attr("author-title")+', '); }); }); </script> Вот только куда его ставить? Quote Link to comment Share on other sites More sharing options...
Septimus Posted November 20, 2015 Report Share Posted November 20, 2015 Вот код для вставки в постКонтейнер после ника до закрывающего тега </h3> <a class="toAuthor" style="position: relative; top: -1px;" href="javascript:;" author-title="Имя юзера" title="Обратиться по имени"><img title="Обратиться по имени" src="http://ipbmafia.ru/uploads/set_resources_2/insert_name.png"></a> Скрипт срабатывает, но я не знаю как должен выглядеть код вместо Имя юзера. Подскажите, пожалуйста. Quote Link to comment Share on other sites More sharing options...
Septimus Posted November 20, 2015 Report Share Posted November 20, 2015 Уря, разобрался методом тыка Пошаговая инструкция В postContainer копируем код после <span class='ipsResponsive_showPhone ipsResponsive_inline'> {template="reputationBadge" group="global" app="core" params="$comment->author()"}</span> Вставляем <a class="toAuthor" style="position: relative; top: -1px;" href="javascript:;" author-title='{$comment->author_name}' title="Обратиться по имени"><img title="Обратиться по имени" src="http://ipbmafia.ru/uploads/set_resources_2/insert_name.png"></a> В topic перед {{if !$topic->container()->disable_sharelinks}} вставляем скрипт <script> jQuery(document).ready(function($){ $(".toAuthor").click(function(){ $(document).trigger('replyToTopic'); var replyArea=$('div[data-role="replyArea"]'); var editor=replyArea.find('[data-role="contentEditor"]'); var editorID=editor.attr('name'); CKEDITOR.instances[editorID].insertHtml($(this).attr("author-title")+', '); }); }); </script> Вуаля! alexis, Эдгар, Сергей Ананасов and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Yos Posted November 20, 2015 Report Share Posted November 20, 2015 Septimus, странно, вроде не делает через собаку Quote Link to comment Share on other sites More sharing options...
alexis Posted November 21, 2015 Report Share Posted November 21, 2015 Septimus, огромное спасибо! всё работает, как ваш код, так и собака по-прежнему пашет. Единственное, крест я поправил, чтоб ник не сдвигал: style="position: absolute; margin: 6px; margin-top: -3px;" Quote Link to comment Share on other sites More sharing options...
Sanshalay Posted November 21, 2015 Report Share Posted November 21, 2015 https://community.invisionpower.com/files/file/7810-insert Даже уведомления отправляет при вставке ника т.е. работает как упоминание, а не просто текст. Quote Link to comment Share on other sites More sharing options...
alexis Posted November 21, 2015 Report Share Posted November 21, 2015 Для встроенного по умолчанию чата (того, что бесплатен на пятерых) найти бы ещё форму вставки ника... Там даже @ не действует. Quote Link to comment Share on other sites More sharing options...
LvsF Posted November 27, 2015 Report Share Posted November 27, 2015 В 21.11.2015, 10:22:08, alexxis сказал: Для встроенного по умолчанию чата (того, что бесплатен на пятерых) найти бы ещё форму вставки ника... Там даже @ не действует. Там вообще ничего не действует. Да и собаки не наблюдаю. Quote Link to comment Share on other sites More sharing options...
instrumentariy Posted February 20, 2016 Report Share Posted February 20, 2016 Друзья, подскажите что нужно изменить в коде... <a class="toAuthor" style="position: absolute;" href="javascript:;" author-title='{$comment->author_name}' title="Вставить ник"><img title="Вставить ник"></a> Что бы ник в сообщение вставлялся выделенным(полужирным) ? Quote Link to comment Share on other sites More sharing options...
Respected Posted February 20, 2016 Report Share Posted February 20, 2016 Так будет жирным: <strong>{$comment->author_name}</strong> instrumentariy 1 Quote Link to comment Share on other sites More sharing options...
instrumentariy Posted February 20, 2016 Report Share Posted February 20, 2016 Спасибо друг ! Respected 1 Quote Link to comment Share on other sites More sharing options...
(Work of Art) Posted February 29, 2016 Report Share Posted February 29, 2016 alexxis, А почему у меня собака не пашет?((( Quote Link to comment Share on other sites More sharing options...
alexis Posted February 29, 2016 Report Share Posted February 29, 2016 должна работать... жмёте "собаку", набираете одну-две первых буквы ника нужно вам человека, и оно высветится в течение секунды-другой: @(Work of Art) Quote Link to comment Share on other sites More sharing options...
(Work of Art) Posted February 29, 2016 Report Share Posted February 29, 2016 @alexxis Да, точно работает) а можно как-то его сделать кнопкой? Даже чтобы при нажатии на крестик, оно подставляло собаку? Quote Link to comment Share on other sites More sharing options...
alexis Posted February 29, 2016 Report Share Posted February 29, 2016 (Work of Art), да, конечно, вот просто установите себе этот плагин и наслаждайтесь https://community.invisionpower.com/files/file/7810-cv01-insert-nick/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.