Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ник в форму быстрого ответа

Featured Replies

Posted

Кто-нибудь видел плагин который добавляет кнопку для вставки ника в форму быстрого ответа? по аналогии с http://ipbmafia.ru/topic/213-name-or-quote-in-fast-reply-101/

  • 1 месяц спустя...

могу дать на скорую руку это:

 

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") + ', ');
}

думаю разберетесь.

  • 2 недели спустя...

Вроде, код такой должен быть.

<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>

Вот только куда его ставить?

Вот код для вставки в постКонтейнер после ника до закрывающего тега </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>

Скрипт срабатывает, но я не знаю как должен выглядеть код вместо Имя юзера. Подскажите, пожалуйста.

Уря, разобрался методом тыка 

Пошаговая инструкция

В postContainer копируем код после 

<span class='ipsResponsive_showPhone ipsResponsive_inline'>&nbsp;&nbsp;{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>

 

Вуаля! :) 

Septimus, огромное спасибо! всё работает, как ваш код, так и собака по-прежнему пашет.

Единственное, крест я поправил, чтоб ник не сдвигал:

style="position: absolute; margin: 6px; margin-top: -3px;"

Для встроенного по умолчанию чата (того, что бесплатен на пятерых) найти бы ещё форму вставки ника... Там даже @ не действует. :( 

В 21.11.2015, 10:22:08, alexxis сказал:

Для встроенного по умолчанию чата (того, что бесплатен на пятерых) найти бы ещё форму вставки ника... Там даже @ не действует. :( 

Там вообще ничего не действует. Да и собаки не наблюдаю.

  • 2 месяца спустя...

Друзья, подскажите что нужно изменить в коде...

<a class="toAuthor" style="position: absolute;" href="javascript:;" author-title='{$comment->author_name}' title="Вставить ник"><img title="Вставить ник"></a>

Что бы ник в сообщение вставлялся выделенным(полужирным) ?

  • 2 недели спустя...

должна работать...

жмёте "собаку", набираете одну-две первых буквы ника нужно вам человека, и оно высветится в течение секунды-другой: @(Work of Art)

(Work of Art), да, конечно, вот просто установите себе этот плагин и наслаждайтесь :) 

https://community.invisionpower.com/files/file/7810-cv01-insert-nick/

 

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.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.