Modifica Nome: Graphical BBCode buttons (or whatever you may call it)
Autore: Nilanko Halder
Modifica Descrizione: Sostituzione delle impostazioni pulsanti BBCode testuale predefinito
Modifica Versione:: 1.0
Requisiti: phpbb 3.0.11
Caratteristiche:
- Migliore facile da usare pulsanti dell'editor.
- Tasti con sfondi grafici.
- Accattivante!

(Clicca per vedere l'immagine ingrandita)
Esempio snip del mod con bottoni BBCode personalizzati:

(Clicca per vedere l'immagine ingrandita)
Modifica Download: Oppure Note:
- Styling automatico sui pulsanti BBCode personalizzati non è supportato (e non lo sarà).
- Per aggiungere un pulsante personalizzato BBCode in stile, seguire questa guida:
- Aprire la pagina di editor di distacco e visualizzare la sua fonte per trovare il blocco di codice per il tuo pulsante bbcode personalizzato.
- Per esempio, per il tasto "List", dovrebbe essere qualcosa di simile a questo:
Codice: Seleziona tutto
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="List: [list]text[/list]" />
- Si prega di annotare i valori di “nome=” (“addbbcode10” qui) e “onclick=” (“bbstyle(10)” qui) per ogni pulsante personalizzato che hai aggiunto.
- Ora per aggiungere un pulsante personalizzato in stile, aggiungere questo codice in posting_buttons.html allo spazio rilevante:
Codice: Seleziona tutto
<input type="button" class="button2" name="<noted-value>" value=" <Desired button name>" style="background:# f7fafd url(/edit_img/<image-name.ext>) 3px 50% no-repeat;height:24px; border:1px solid #a9b2b9;" onclick="<noted-value>" title="<help-text>" />
- Dopo aver aggiunto tutti i pulsanti personalizzati in questo modo, rimuovi il seguente blocco da posting_buttons.html:
Codice: Seleziona tutto
<!-- BEGIN custom_tags --> <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" /> <!-- END custom_tags -->
- Copia “edit_img” cartella nella root del forum.
- Istruzioni per prosilver template (qualsiasi altro template è supportato e le modifiche dovrebbero essere fatto di conseguenza):
- Trova questo:
Codice: Seleziona tutto
<div id="format-buttons"> <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" /> <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" /> <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" /> <!-- IF S_BBCODE_QUOTE --> <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" /> <!-- ENDIF --> <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" /> <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" /> <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" /> <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" /> <!-- IF S_BBCODE_IMG --> <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" /> <!-- ENDIF --> <!-- IF S_LINKS_ALLOWED --> <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" /> <!-- ENDIF --> <!-- IF S_BBCODE_FLASH --> <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" /> <!-- ENDIF --> <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}"> <option value="50">{L_FONT_TINY}</option> <option value="85">{L_FONT_SMALL}</option> <option value="100" selected="selected">{L_FONT_NORMAL}</option> <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 --> <option value="150">{L_FONT_LARGE}</option> <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 --> <option value="200">{L_FONT_HUGE}</option> <!-- ENDIF --> <!-- ENDIF --> </select> <input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" /> <!-- BEGIN custom_tags --> <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" /> <!-- END custom_tags --> </div>
Sostituire con questo:Codice: Seleziona tutto
<div id="format-buttons" style="width:79.3%;line-height:30px;color:#a8a8a8;padding:3px 5px 10px 1px;border-radius: 3px;-moz-border-radius: 3px;-webkit-border-radius: 3px;margin-bottom:-4px;"> <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" " style="background:#f7fafd url(/edit_img/b.png) 50% 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" /> <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" " style="background:#f7fafd url(/edit_img/i.png) 50% 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" /> <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" " style="background:#f7fafd url(/edit_img/u.png) 50% 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" /> | <select style="height:24px;" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}"> <option value="50">{L_FONT_TINY}</option> <option value="85">{L_FONT_SMALL}</option> <option value="100" selected="selected">{L_FONT_NORMAL}</option> <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 --> <option value="150">{L_FONT_LARGE}</option> <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 --> <option value="200">{L_FONT_HUGE}</option> <!-- ENDIF --> <!-- ENDIF --> </select> <input type="button" class="button2" name="bbpalette" id="bbpalette" value="Font color " onclick="change_palette();" title="{L_BBCODE_S_HELP}" style="background:#f7fafd url(/edit_img/cw.png) 4px 50% no-repeat;height:24px;border:1px solid #a9b2b9;padding-left:23px;" /> | <!-- IF S_BBCODE_QUOTE --> <input type="button" class="button2" accesskey="q" name="addbbcode6" value=" Quote " style="background:#f7fafd url(/edit_img/quote.png) 1px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" /> <!-- ENDIF --> <input type="button" class="button2" accesskey="c" name="addbbcode8" value=" Code " style="background:#f7fafd url(/edit_img/code.gif) 2px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" /> | <input type="button" class="button2" accesskey="l" name="addbbcode10" value=" List " style="background:#f7fafd url(/edit_img/ul.png) 1px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" /> <input type="button" class="button2" accesskey="o" name="addbbcode12" value=" List= " style="background:#f7fafd url(/edit_img/ol.png) 1px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" /> <input type="button" class="button2" accesskey="y" name="addlitsitem" value=" [*] " style="background:#f7fafd url(/edit_img/item.gif) 2px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" /> | <!-- IF S_BBCODE_IMG --> <input type="button" class="button2" accesskey="p" name="addbbcode14" value=" Img " style="background:#f7fafd url(/edit_img/img.png) 1px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" /> <!-- ENDIF --> <!-- IF S_LINKS_ALLOWED --> <input type="button" class="button2" accesskey="w" name="addbbcode16" value=" URL " style="background:#f7fafd url(/edit_img/link.png) 2px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" /> <!-- ENDIF --> <!-- IF S_BBCODE_FLASH --> <input type="button" class="button2" accesskey="d" name="addbbcode18" value=" Flash " onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" style="background:#f7fafd url(/edit_img/flash.gif) 2px 50% no-repeat;height:24px;border:1px solid #a9b2b9;" /> <!-- ENDIF --> <!-- BEGIN custom_tags --> <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" /> <!-- END custom_tags --> </div>
- Trova questo:
Sostituire con:
Codice: Seleziona tutto
'{LA_FONT_COLOR_HIDE}'
Codice: Seleziona tutto
'{LA_FONT_COLOR_HIDE} '
- Trova questo:
Sostituire con:
Codice: Seleziona tutto
'{LA_FONT_COLOR}'
Codice: Seleziona tutto
'{LA_FONT_COLOR} '
- Trova questo:
Aggiungi prima in una nuova riga:
Codice: Seleziona tutto
<div id="format-buttons"
Codice: Seleziona tutto
<style>@-moz-document url-prefix() { a.button1, input.button1, input.button3, a.button2, input.button2 { padding-bottom:4px; } }</style>
grazie.
