Blessed
Members-
Content Count
143 -
Joined
-
Last visited
Everything posted by Blessed
-
i like the tutorialbut could you plz add some photos to it next timei'm new at photoshop :lol:tnxx
-
where are the graphics at??? :S
-
where are the graphics at??? :S
-
New Site! Review It Please! ...once again... TheMusicOnly
Blessed replied to MusicOnly's topic in Websites and Web Designing
wow i like the lookand the color match nice done -
Can i get Wordpress for free ??
-
The Extract() Function Something I just found out
Blessed replied to ghostrider's topic in Programming
wow thanx for the tip -
nice site manreally good basic tutorialshellps a lot
-
i this the bcode class is the siplest wayfor the beginnersjust include the file
-
A simple BBcode class <?php // Filename: bbcode.php// Version: 0.1//class bbcode { function code_box($text) { $output = "<div class=\"code\"><h6>Code</h6>\\1</div>"; return $output; } function quote($text) { $output = "<blockquote><h6>Quote:</h6>\\1</blockquote>"; return $output; } function htmlout($text) { $text = stripslashes($text); $text = htmlspecialchars($text); $text = nl2br($text); return $text; } function parse($text) { // First: If there isn't a "[" and a "]" in the message, don't bother. $text = " " . $text; if (! (strpos($text, "[") && strpos($text, "]")) ) { return $text; } else { // de uiteindelijke code $text = $this->htmlout($text); $text = preg_replace("/\\[b\\](.+?)\[\/b\]/is",'<b>\1</b>', $text); $text = preg_replace("/\\[i\\](.+?)\[\/i\]/is",'<i>\1</i>', $text); $text = preg_replace("/\\[u\\](.+?)\[\/u\]/is",'<u>\1</u>', $text); $text = preg_replace("/\[s\](.+?)\[\/s\]/is",'<s>\1</s>', $text); $text = preg_replace("/\[code\](.+?)\[\/code\]/is","".$this->code_box('\\1')."", $text); $text = preg_replace("/\[quote\](.+?)\[\/quote\]/is","".$this->quote('\\1')."", $text); $text = eregi_replace("\\[img]([^\\[]*)\\[/img\\]","<img src=\"\\1\">",$text); $text = eregi_replace("\\[size([^\\[]*)\\]([^\\[]*)\\[/size\\]","<font size=\"\\1px\">\\2</font>",$text); $text = eregi_replace("\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]","<font color=\"\\1\">\\2</font>",$text); return $text; } } }?>Example <?phpinclude('bbcode.php');$bbcode = new bbcode;$my_content = '[b]This is Bold[/b], [s]Strike[/s]';$bbcode->parse($my_content);?> Have fun if you want me to add more options feel free to ask
-
nice tutorialallot of comments i like it
-
Nice tutorialis there a way to add a bbcode function to this script
-
totally agree with you
-
fifa is the best
-
mine was Nintendo
-
thanks for nice information m8