We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
[CODE] PD-[BB]Tags; Add a couple more BB tags ;); By Duveaux
Topic Started: Jan 25 2010, 10:58 AM (221 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: Duveaux
[CODE
 
PD-[BB]Tags; Add a couple more BB tags ;)]I decided to write some BB tags myself..

contains:

=>Google tag (adds what's between it as a google search)
=>Spoiler Tag <- hides what's between it
=>You tag <- inserts member reading
=>Browser tag <- inserts details about the browser
=>StrikeThrough <- adds strikethrough
=>Marguee <- marguee in any direction
=>Bounce <- makes text bounce

This was an easy code to write, but it's quite fun..

PREVIEW
Add Reply
Footers:
Code:
 
<script type='text/javascript'>
/*PD-BB tags, code by Duveaux. Find this code and more usefull codes @ http://www.phantom-designs.net */
pID=0

TD=document.getElementsByTagName('TD')
for (i=0;i<TD.length;i++){
if (TD[i].innerHTML.match("THE POST")){
//Google Tag
firstpos=TD[i].innerHTML.lastIndexOf("[google]")
lastpos=TD[i].innerHTML.lastIndexOf("[/google]")
term2=TD[i].innerHTML.substring(firstpos,lastpos).split("[google]").join("")
term=term2.split("'").join("").split('"').join("")
TD[i].innerHTML=TD[i].innerHTML.split("[google]").join("<a href='http://www.google.com/search?q="+term+"'>"+term+"</a>").split(term2+"[/google]").join("")
//YOU tag
you=userlinks.innerHTML.split('">')[1].split(" (")[0]
TD[i].innerHTML=TD[i].innerHTML.split("[you]").join("<B>*</B>"+you)
//Spoiler Tag
spoil=false
firstpos=TD[i].innerHTML.lastIndexOf("[spoiler]")
lastpos=TD[i].innerHTML.lastIndexOf("[/spoiler]")
term=TD[i].innerHTML.substring(firstpos,lastpos).split("[/spoiler]").join("").split("[spoiler]").join("")
TD[i].innerHTML=TD[i].innerHTML.split("[spoiler]").join("<B>Spoiler:</B><a href='javascript:spoilerShow("+pID+")'>[Show]</a><div style='display:none' id='tehSpoilz_"+pID+"'><table border=1>"+term+"</table></div>").split(term+"[/spoiler]").join("")
TD[i].innerHTML=TD[i].innerHTML.split("[browser]").join(navigator.appName+" "+navigator.userAgent)
//Strike Tag
TD[i].innerHTML=TD[i].innerHTML.split("[strike]").join("<S>").split("[/strike]").join("</S>")
//Marguee Tag
if (TD[i].innerHTML.match("marguee=")){
direction=TD[i].innerHTML.split("[marguee=")[1].split("]")[0]
text=TD[i].innerHTML.split(direction+"]")[1].split("[/marguee]")[0]
TD[i].innerHTML=TD[i].innerHTML.split("[marguee="+direction+"]"+text+"[/marguee]").join("<marquee height='30' direction='"+direction+"' behavior='scroll' scroll='continuous' scrollamount='2'>"+text+"</marguee>")
}
TD[i].innerHTML=TD[i].innerHTML.split("[bounce]").join("<marquee height='50' direction='up' behavior='alternate' scroll='continuous' scrollamount='5' vspace='15'>").split("[/bounce]").join("</marguee>")
pID++
}}

function spoilerShow(ID){
t=document.getElementById("tehSpoilz_"+ID)
if (t.style.display!=''){
t.style.display=''}else{
t.style.display='none'}
}

td=document.getElementsByTagName("TD")
for (i=0;i<td.length;i++){
if (td[i].innerHTML.match('Open Tags:')){
td[i].innerHTML+="<BR><B>Phantom-Designs Tags: </B><input onmouseover=helpbox('goog') type=button value='Google' acceskey=G onClick=inTag('google')> <input type=button value='Spoiler' acceskey='s' onClick=inTag('spoiler')><input type=button value='you' acceskey=y onClick=inTag('you')> <input type=button value='browser' acceskey=b onClick=inTag('browser')> <input type=button value='StrikeThrough' acceskey=s onClick=inTag('strike')> <input type=button value='Marguee' acceskey=m onClick=inTag('marq')> <input type=button value='Bounce' acceskey=b onClick=inTag('bounce')>"
document.write("<center><B><a href='http://www.phantom-designs.net'>[BB]Tag extension is written by Duveax. Find this code @ Phantom-Designs.net</a></b></center>")}}

function inTag(ins){
if (ins=='google'){
var googtag=prompt("The PD-Google tag. Everthing that's between these tags will be the search term.. Enter the term.")
if (googtag!='' && googtag!=null){
document.REPLIER.Post.value+="[google]"+googtag+"[/google]"}}
if (ins=='spoiler'){
var spoiltag=prompt("The Phantom-Designs spoiler tag hides everything what's between it, unless the user presses a button. Usefull for spoilers for game or story plots that need no ruining. Enter the spoiler")
if (spoiltag!='' && spoiltag!=null){
document.REPLIER.Post.value+="[spoiler]"+spoiltag+"[/spoiler]"}}
if (ins=='marq'){
var dir=prompt("The PD-marguee tag generates a luxurary Marguee for you. Enter the direction","Up")
var txt=prompt("Enter your text","Text")
if (txt!='' && txt!=null){
document.REPLIER.Post.value+="[marguee="+dir+"]"+txt+"[/marguee]"}}
if (ins=='you'){
document.REPLIER.Post.value+="[you]"}
if (ins=='browser'){
document.REPLIER.Post.value+="[browser]"}
if (ins=='strike'){
var striketag=prompt("The PD-strike tag strikes through your text.")
if (striketag!='' && striketag!=null){
document.REPLIER.Post.value+="[strike]"+striketag+"[/strike]"}}
if (ins=='bounce'){
var bouncetag=prompt("The PD-bounce tag will create a funny bouncing effect over your text; enter your text")
if (bouncetag!='' && bouncetag!=null){
document.REPLIER.Post.value+="[bounce]"+bouncetag+"[/bounce]"}}
}
</script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply