Заходим в:
Админцентр > Внешний вид ˃ Ваш шаблон ˃ Темы ˃ post
Находим:
<li class='report'> <a href="{$this->settings['base_url']}app=core&module=reports§ion=reports&do=show_report&rid={$this->memberData['_cache']['report_temp']['post_marker']['post'][$post['post']['pid']]['info']['id']}" id='post-report-{$post['post']['pid']}' class='ipbmenu'> <span id="rstat-{$this->memberData['_cache']['report_temp']['post_marker']['post'][ $post['post']['pid'] ]['info']['id']}"><img src="{$this->settings['img_url']}/reports/post_alert_{$this->memberData['_cache']['report_temp']['post_marker']['post'][$post['post']['pid']]['gfx']}.png" alt="" /></span> </a> </li> </if> </if>
Ниже добавляем:
<if test="replyButton:|:$post['post']['_canReply']"> <li style='position:absolute;'><a class='ipsButton_secondary' onmouseover="copyQ('{$post['author']['members_display_name']}', '{$post['post']['pid']}');" href="javascript:ins('{$post['author']['members_display_name']}')">Вставить ник или выделенный текст</a></li> </if>
Сохраняем!
Заходим в:
Админцентр > Внешний вид ˃ Ваш шаблон ˃ Темы ˃ topicViewTemplate
Находим:
<script type='text/javascript'> ipb.topic.fastReplyId = '{$this->settings['_lastEditorId']}';
Ниже добавляем:
function copyQ( qinf, pid ) { txt=''; if (window.getSelection) { txt=window.getSelection(); } else if (document.selection) { txt=document.selection.createRange().text; } if (txt != "") { txt='[quote name="'+qinf+'" post="'+pid+'"]'+txt+'; } } function ins( name ) { editor = ipb.textEditor.getEditor( ipb.topic.fastReplyId ) if (txt!= "") { editor.insert( txt, true ); } else { editor.insert( "[member="+name+"],", true ); } }
Сохраняем и наслаждаемся результатом
Автор статьи: Celsoft
Перевод и доработка: Doogle
Recommended Comments
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.