BBcode knop bijmaken
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

BBcode knop bijmaken
Voor ons forum hebben we een extra BBcode functionaliteit gemaakt zodat bij het typen van de code [boek]isbnnummer[/boek] of [boek=isbnnummer] automatisch een plaatje van de omslag verschijnt en gelinkt wordt naar het betreffende boek bij Bol.com (en wij daar iets commissie voor krijgen). maar goed. De functionaliteit is er, alleen willen we nu nog even een mooi knopje erbij net als voor de andere bbcode aanwezig is. Hoe moeten we dat doen?
Ik denk het niet, hierin geef je de functies van de code aan, zoals
Het gaat me echter niet om de functie, die heb ik al in includes/bbcode.php staan. Ik heb alleen nog een knop nodig waarmee de tag ingevoerd wordt in het berichtvenster.
Code: Selecteer alles
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
Bedankt, ik heb het inmiddels gevonden, en ook waar ik de rest moet aanpassen (helptekst). Voor mensen die nog geïnteresseerd zijn, hieronder de complete MOD die ik gemaakt heb. Deze is alleen voor het specifieke forum bedoelt ivm de andere MODS, maar het geeft wel een idee. Misschien zal ik hem eens herschrijven voor de "HOW TO", als daar interesse voor is?
','
#
#-----[ REPLACE WITH ]--------------------------------------
#
bbtags = new Array('','','','','','','[quote]','[/quote]','','
#
#-----[ FIND ]---------------------------------------------
#
<input type="text" name="subject" size="45" maxlength="60" style="width:500px" tabindex="2" class="post" value="{SUBJECT}" />
#
#-----[ REPLACE WITH ]--------------------------------------
#
<input type="text" name="subject" size="45" maxlength="60" style="width:550px" tabindex="3" class="post" value="{SUBJECT}" />
#
#-----[ FIND ]---------------------------------------------
#
<td><span class="genmed">
<input type="button" class="button" accesskey="x" name="addbbcode18" value="TeX" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('x')" />
</span></td>
</tr>
<tr>
<td colspan="10">
#
#-----[ REPLACE WITH ]---------------------------------------
#
<td><span class="genmed">
<input type="button" class="button" accesskey="x" name="addbbcode18" value="TeX" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('x')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="y" name="addbbcode20" value="Boek" style="width: 40px" onClick="bbstyle(20)" onMouseOver="helpline('y')" />
</span></td>
</tr>
<tr>
<td colspan="11">
#
#-----[ FIND ]---------------------------------------------
#
<td colspan="10"> <span class="gensmall">
<input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
</span></td>
</tr>
<tr><td colspan="10">
#
#-----[ REPLACE WITH ]--------------------------------------
#
<td colspan="11"> <span class="gensmall">
<input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
</span></td>
</tr>
<tr><td colspan="11">
#
#-----[ FIND ]---------------------------------------------
#
<td colspan="10"><span class="gen">
<textarea name="message" rows="15" cols="35" wrap="virtual" style="width:550px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
#
#-----[ REPLACE WITH ]--------------------------------------
#
<td colspan="11"><span class="gen">
<textarea name="message" rows="15" cols="35" wrap="virtual" style="width:550px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM[/code]
Code: Selecteer alles
#################################################################
## Mod Title: Boekenknopje
## Mod Version: 1.0
## Copyright (C) 2006 Ger Bruinsma
##
## Description: knopje toevoegen voor boeken BBcode, alleen voor WSF ivm andere MODS.
##
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
##
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_dutch/lang_main.php
#
#-----[ FIND ]---------------------------------------------
#
$lang['bbcode_x_help'] = 'Formula: [tex]formule[/tex] (alt+x)';
#
#-----[ AFTER, ADD ]---------------------------------------
#
$lang['bbcode_y_help'] = 'Link naar boek: [boek]ISBN nummer[/boek] (alt+y)';
#
#-----[ OPEN ]---------------------------------------------
#
posting.php
#
#-----[ FIND ]---------------------------------------------
#
'L_BBCODE_X_HELP' => $lang['bbcode_x_help'],
#
#-----[ AFTER, ADD ]---------------------------------------
#
'L_BBCODE_Y_HELP' => $lang['bbcode_y_help'],
#
#-----[ OPEN ]---------------------------------------------
#
templates/Appalachia/posting_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
x_help = "{L_BBCODE_X_HELP}";
#
#-----[ AFTER, ADD ]---------------------------------------
#
y_help = "{L_BBCODE_Y_HELP}";
#
#-----[ FIND ]---------------------------------------------
#
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
- ','
- ','
#
#-----[ REPLACE WITH ]--------------------------------------
#
bbtags = new Array('','','','','','','[quote]','[/quote]','
Code: Selecteer alles
','
- ','
- ','
#
#-----[ FIND ]---------------------------------------------
#
<input type="text" name="subject" size="45" maxlength="60" style="width:500px" tabindex="2" class="post" value="{SUBJECT}" />
#
#-----[ REPLACE WITH ]--------------------------------------
#
<input type="text" name="subject" size="45" maxlength="60" style="width:550px" tabindex="3" class="post" value="{SUBJECT}" />
#
#-----[ FIND ]---------------------------------------------
#
<td><span class="genmed">
<input type="button" class="button" accesskey="x" name="addbbcode18" value="TeX" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('x')" />
</span></td>
</tr>
<tr>
<td colspan="10">
#
#-----[ REPLACE WITH ]---------------------------------------
#
<td><span class="genmed">
<input type="button" class="button" accesskey="x" name="addbbcode18" value="TeX" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('x')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="y" name="addbbcode20" value="Boek" style="width: 40px" onClick="bbstyle(20)" onMouseOver="helpline('y')" />
</span></td>
</tr>
<tr>
<td colspan="11">
#
#-----[ FIND ]---------------------------------------------
#
<td colspan="10"> <span class="gensmall">
<input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
</span></td>
</tr>
<tr><td colspan="10">
#
#-----[ REPLACE WITH ]--------------------------------------
#
<td colspan="11"> <span class="gensmall">
<input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
</span></td>
</tr>
<tr><td colspan="11">
#
#-----[ FIND ]---------------------------------------------
#
<td colspan="10"><span class="gen">
<textarea name="message" rows="15" cols="35" wrap="virtual" style="width:550px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
#
#-----[ REPLACE WITH ]--------------------------------------
#
<td colspan="11"><span class="gen">
<textarea name="message" rows="15" cols="35" wrap="virtual" style="width:550px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM[/code]