[Snippet] Only some Custom BBCodes to native QR

Little Mods and Snips 1

[Snippet] Only some Custom BBCodes to native QR

Postby Sekuro » 17 Nov 2011, 20:01

Only some Custom BBCodes to native QR

Instruction

open

styles/prosilver/template/quickreply_editor.html

find

Code: Select all
    onload_functions.push('init_qr();');
    // ]]>
</script>


after add

Code: Select all
<script type="text/javascript">
// <![CDATA[
var form_name = 'qr';
var text_name = 'message';    
// ]]>
</script>

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>


find (the second find)

Code: Select all
<form method="post" action="{U_QR_ACTION}">


replace with

Code: Select all
<form name="qr" method="post" action="{U_QR_ACTION}">


find

Code: Select all
<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>


replace with

Code: Select all
<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" />
            <input type="button" class="button2" value="youtube" onclick="bbfontstyle('[youtube]', '[/youtube]');" /></dd>

clear all caches



This example you can expand with more bbcode.

Just follow the syntax in the last replace with and duplicate this part:

Code: Select all
<input type="button" class="button2" value="youtube" onclick="bbfontstyle('[youtube]', '[/youtube]');" /> 

and change bbcode name here

Code: Select all
value="youtube"

Code: Select all
'[youtube]', '[/youtube]'
Mod-Bot / Service-Team
User avatar
Sekuro

Tiptop

Tiptop
 
Posts: 241
Joined: 11 Feb 2008, 11:49
 
Resolution: 1440x900


Return to Snip Cl@ss I

Who is online

Users browsing this forum: No registered users and 1 guest

cron