Instruction: how to insert nickname and name in SMF 2.1 in Sceditor

Started by Helgi, March 04, 2019, 05:31:11 PM

Previous topic - Next topic

Helgi

In the Display.template.php file:

Find: echo '
', $message['member']['link'];

Replace With:echo '

<a href="javascript:void(0)" onClick="$(function(){$(\'.editor\').sceditor(\'instance\').insert(\'[b]', $message['member']['name'], '[/b], \');});">', $message['member']['name'] , '</a>';


And find: echo '
<li class="title">', $message['member']['title'], '</li>';


Replace With: echo '
<li class="title"><a href="javascript:void(0)" onClick="$(function(){$(\'.editor\').sceditor(\'instance\').insert(\'[b]', $message['member']['title'], '[/b], \');});">', $message['member']['title'] , '</a></li>';

Arantor

Interesting idea, though honestly if this were to be done, it should be done if the editor is available on the page (if not, this will error out in the console) - and a better method would be to insert an @ first because 2.1 supports mentions.

vbgamer45

Nice I think this would be best moved to the tip's and tricks forum.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: