Good custom BBCode resource?

Fearghal

Member
Messages
286
Reaction score
0
Points
16
Does anyone have any good resources for custom BBCode?

Ive been looking around and can't find any.

By good I mean like typing [coolbox]Hi[/coolbox] and then that Hi is suddenly in a box with flashing lights kinda code, not spoiler or marquee **** :happysad:.

Suggestions appreciated ;)
-Fearghal

Forgot to mention, sorry about posting in this section. Its not exactly graphics and web design so I dunno where else to put it.

Mods - feel free to move if you can think of somewhere better.
Thanks
 
Last edited by a moderator:

tittat

Active Member
Messages
2,478
Reaction score
1
Points
38
*******Thread Moved to Scripts & 3rd Party Apps********
 

Mitch

New Member
Messages
908
Reaction score
0
Points
0
Something like this?

bbcode:
Code:
[think]{TEXT}[/think]

html replacement
Code:
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="margin: 0;padding: 0;border: 0;"><div style=" background-color: #FFEBD5;color: #000000; -moz-border-radius: 16px; -webkit-border-radius: 16px; border: 1px solid #FFFFFF; padding: 4px;font-size: 1em;" >&nbsp; {TEXT} &nbsp;</div><img src="./images/think.gif"></td></tr></table>
* note: save this image (http://startrekguide.com/community/images/think.gif) and upload it to your sites ./images/ direction *
(from: http://startrekguide.com/community/viewtopic.php?f=82&t=4490 )

If you want more, or need more you can find them here:
http://startrekguide.com/community/viewforum.php?f=82
 

Fearghal

Member
Messages
286
Reaction score
0
Points
16
Something like this?

bbcode:
Code:
[think]{TEXT}[/think]

html replacement
Code:
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="margin: 0;padding: 0;border: 0;"><div style=" background-color: #FFEBD5;color: #000000; -moz-border-radius: 16px; -webkit-border-radius: 16px; border: 1px solid #FFFFFF; padding: 4px;font-size: 1em;" >&nbsp; {TEXT} &nbsp;</div><img src="./images/think.gif"></td></tr></table>
* note: save this image (http://startrekguide.com/community/images/think.gif) and upload it to your sites ./images/ direction *
(from: http://startrekguide.com/community/viewtopic.php?f=82&t=4490 )

If you want more, or need more you can find them here:
http://startrekguide.com/community/viewforum.php?f=82

Yes! Cool thanks :)
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
well, if you know preg_replace, then you can make your own.
PHP:
function bbcode($message)
{
	$bbcode = array(
		"/\[img\]http:\/\/(.*?).(gif|jpg|jpeg|png)\[\/img\]/i" => "<img src='http://\\1.\\2' alt='User Posted Image' />",
		"/\[img\](.*?).(gif|jpg|jpeg|png)\[\/img\]/i" => "<img src='http://\\1.\\2' alt='User Posted Image' />",
		"/\[i\](.*?)\[\/i\]/i" => "<i>\\1</i>",
		"/\[b\](.*?)\[\/b\]/i" => "<b>\\1</b>",
		"/\[u\](.*?)\[\/u\]/i" => "<span style='text-decoration:underline'>\\1</span>",
		"/\\n/i" => "<br />",
	);
	return preg_replace(array_keys($bbcode), array_values($bbcode), $message);
}
 
Last edited:
Top