boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

quick tags button hack

 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
adamwalker



Joined: 07 Apr 2002
Posts: 125
Location: England

PostPosted: Wed Jun 12, 2002 6:03 pm    Post subject: quick tags button hack Reply with quote

Ok, ive been getting quite a few emails about adding the bbcode to the quicktags.js
(the strip of formatting buttons in b2edit.php.


Well heres the hack to add a more ( <!--more--> ) and a nextpage ( <!--nextpage--> ) button.


1. Open b2-include/b2quicktags.php

and change this...


Code:
<input type="button" class="quicktags" accesskey="w" name="addbbcode16" value="link" title="insert a link" style="text-decoration: underline; width: 40px" onClick="bbstyle(this.form,16)" />
</td><td>
<input type="button" class="quicktags" accesskey="p" name="closetags" value="X" title="Close all tags" style="width: 30px; font-weigh: bolder;"  onClick="bbstyle(document.post,-1)" /></td>
</tr>
</table>


to..

Code:

<input type="button" class="quicktags" accesskey="w" name="addbbcode16" value="link" title="insert a link" style="text-decoration: underline; width: 40px" onClick="bbstyle(this.form,16)" />
</td><td>
<input type="button" class="quicktags" accesskey="x" name="addbbcode18" value="more" title="add more" style="width: 40px; font-weigh: bolder;" onClick="bbstyle(this.form,18)" />
</td><td>
<input type="button" class="quicktags" accesskey="z" name="addbbcode19" value="Next Page" title="Next Page" style="width: 65px; font-weigh: bolder;" onClick="bbstyle(this.form,20)" />
</td><td>
<input type="button" class="quicktags" accesskey="p" name="closetags" value="X" title="Close all tags" style="width: 30px; font-weigh: bolder;"  onClick="bbstyle(document.post,-1)" />
</td></tr>
</table>


2. open b2quicktags.js

and change this...

Code:

bbtags = new Array('<b>','</b>','<i>','</i>','<u>','</u>','<strike>','</strike>','<blockquote>','</blockquote>','<p>','</p>','<li>','</li>','<img src="" border="0" alt="" />','','<a href="">','','<!--more-->','','</a>');


to this..

Code:
bbtags = new Array('<b>','</b>','<i>','</i>','<u>','</u>','<strike>','</strike>','<blockquote>','</blockquote>','<p>','</p>','<li>','</li>','<img src="" border="0" alt="" />','','<a href="">','','<!--more-->','','<!--nextpage-->','','</a>');


now just load b2 and take a look at your pritty buttons!
_________________
Shameless Plug - For all your B2 template and hack needs visit www.adamwalker.34sp.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group