SMF For Free Support Forum
Signup For Free Forum
October 14, 2008, 02:32:12 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code] Custom BBC v2  (Read 293 times)
0 Members and 1 Guest are viewing this topic.
Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 787


Previously known as Omikron


View Profile WWW
« on: May 08, 2008, 12:37:12 pm »

Code:
<script>
// Created by Omikron 9861 of Aetus Designs (aetus.net)
function custombbc(BBC,HTML,CLOSING_BBC,CLOSING_HTML){var b=document.getElementsByTagName("div");for(x=0;x<b.length;x++){if(b[x].className=="post"&&b[x].innerHTML.match(BBC+"(.*)+"+CLOSING_BBC)){b[x].innerHTML=b[x].innerHTML.split(BBC+RegExp.$1+CLOSING_BBC).join(HTML+RegExp.$1+CLOSING_HTML);}}}
custom_bbc('[bbc]','html','[/bbc]','close html');
</script>

To add more BBC, at the end add more lines like the one above. For example, if I wanted a [bold] BBC, I'd put
Code:
custom_bbc('[bold]','<b>','[/bold]','</b>');

Just before the </script> line.

This is like v1 except for the fact that, thanks to slayer, there is no more limitation of being able to use only one per post.
« Last Edit: May 08, 2008, 11:50:00 pm by simply sibyl » Logged

mrthunder23
SMF For Free Member
*
Offline Offline

Posts: 42


View Profile
« Reply #1 on: May 19, 2008, 04:11:55 pm »

Question. Is that in the future, will the be the chance of creating a button?
Logged
Alex P.
SMF For Free Sponsors
*
Offline Offline

Posts: 594


AKA Sub Zero


View Profile WWW
« Reply #2 on: May 19, 2008, 04:14:05 pm »

Like new images for your button? You can add these in the Customized images area.
Logged

Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 787


Previously known as Omikron


View Profile WWW
« Reply #3 on: May 19, 2008, 08:45:44 pm »

I think I could try to do that some time later on.
Logged



Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.563 seconds with 17 queries.