Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • I wanna ask
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
I wanna ask
Tweet Topic Started: Aug 18 2008, 02:08 AM (344 Views)
farkingdom Aug 18 2008, 02:08 AM Post #1
Member

Posts:
6
Group:
Member
Member
#460
Joined:
Aug 5, 2008
Coding language
HTML/CSS
This is what I want to ask:

I know Viral has created this code which adds Extra Tags
But, I want to ask is there a possible way to make an extra tags of Fonts.
That people can use fonts easily by clicking the tags.

This is her code:
Code: HTML
 

<script>

/****************************************************
Add new BBCode Tags by Viral of http://www.zetaresources.com
Not to be redistributed or re-hosted without Viral's permission
****************************************************/

extraTags=[];n=0
extraTags[n++]=["Marquee","yes","[marquee]","[/marquee]","<marquee onmouseover='this.stop()' onmouseout='this.start()'>","</marquee>"]
extraTags[n++]=["Marquee Right","Yes","[marquee=right]","[/marquee]","<marquee onmouseover='this.stop()' onmouseout='this.start()' direction='right'>","</marquee>"]
extraTags[n++]=["P","","[p]","[/p]","<p>","</p>"]
extraTags[n++]=["Reverse","yes","[reverse]","[/reverse]","<bdo dir='rtl'>","</bdo>"]
extraTags[n++]=["Block Quote","","[blockquote]","[/blockquote]","<blockquote>","</blockquote>"]

if(location.href.match('topic') || location.href.match('single')){
td=document.getElementsByTagName('td');
for(i=0;i<td.length;i++){
if(td[i].className=="c_post"){
thepost=td[i].innerHTML;
for(j=0;j<extraTags.length;j++){
thepost=thepost.split(extraTags[j][2]).join(extraTags[j][4]).split(extraTags[j][3]).join(extraTags[j][5]);
}
td[i].innerHTML=thepost;
}}}

if(location.href.match('post')){
td=document.getElementsByTagName('td');
for(k=0;k<td.length;k++){
lots=td[k].innerHTML;
for(u=0;u<extraTags.length;u++){
lots=lots.split(extraTags[u][2]).join(extraTags[u][4]).split(extraTags[u][3]).join(extraTags[u][5]);
td[k].innerHTML=lots;
}}}

function addExtraTag(open,close){
texty=document.getElementsByTagName('textarea')[0];
texty.innerHTML+=open+close+" ";
}

if(location.href.match('post')){
bbc=document.getElementById('c_bbcode');
for(f=0;f<extraTags.length;f++){
if(extraTags[f][1]=="yes" || extraTags[f][1]=="Yes"){
bbc.innerHTML="<button type=\"button\" name=\""+extraTags[f][0]+"\" onmouseover=\"ZetaHelp('"+extraTags[f][0]+"')\" onclick=\"addExtraTag('"+extraTags[f][2]+"','"+extraTags[f][3]+"')\">"+extraTags[f][0]+"</button> "+bbc.innerHTML;
}}}

if(location.href.match('post')){
texty=document.getElementsByTagName('textarea');
for(y=0;y<texty.length;y++){
post=texty[y].value;
for(r=0;r<extraTags.length;r++){
post=post.split(extraTags[r][4]).join(extraTags[r][2]).split(extraTags[r][5]).join(extraTags[r][3]);
texty[y].value=post;
}}}

</script>


I want it to be like selecting multiple fonts (just like the Color tags)
But it seems Viral code doesn't have multiple choices
Offline Profile Goto Top
 
Reid Aug 19 2008, 08:11 AM Post #2
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
That code seems to add differing BBTags, i.e. [something].

That being said...

I'm not entirely sure what you're asking is possible. If you mean a drop-down box to select which, I don't think that can be done with this code.
The Resource Board
Offline Profile Goto Top
 
Viral Aug 22 2008, 09:31 AM Post #3


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
Quote:
 
Not to be redistributed or re-hosted without Viral's permission


also means not to post anywhere else. (+ I'm male)

Posted Image
Offline Profile Goto Top
 
HolySavior Aug 22 2008, 11:19 AM Post #4
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
you are better off getting a seperate code for that.
there already is a [ font=SOMETHING ] [ / font ]tag
just not on the list. its totally possible to add alittle select thing in there for fonts

IF you want something like this just request it, it wouldnt take that long to make.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Join the millions that use us for their forum communities. Create your own forum today.
Learn More · Sign-up Now
« Previous Topic · Code University · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 7:45 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy