|
Ok thanks.
|
Further Solutions :: Hosting :: Scripts :: Templates furthersolutions.com
v4 Studios - Coming soon
|
|
|
|
You should make one for the [ code ][ /code ] tags that allows php and html to be displayed. I've been baffled on how to do that for weeks.
Last Edit: Nov 19, 2005 16:03:46 GMT by egbakaet
|
|
|
|
EG, its something like this. preg_replace("/\[code\](.+?)\[\/code\]/i","<table border='1'><tr><td>\\1</td></tr></table>"); And before that, you did the replace for < and > to their entities. I dunno how exactly.
|
|
|
|
|
I got that, it's the part with the <code> and <pre> tag that I'm not sure about. They show the code, but they also show the <br>'s that come from the nl2br() function I use on it. I'm trying to figure out how to hide the <br>'s from the <code></code> tags, but at the same time, utilize it's function as a line break.
|
|
|
|
Do you know about the <xmp> tag? Its quite handy. Its deprecated however. What you could do is check to see if its inside a tag, and then don't replace if it is. I don't know how to however.
|
|
|
|
|
i made one using a function .. arrays and foreach.. simple.. lol
function uBBC($iString) { $iArray = array('/\[b\](.*)\[\/b\]/iU' => '<b>$1</b>', '/\[i\](.*)\[\/i\]/iU' => '<i>$1</i>', '/\[url=(http:\/\/.*)\](.*)\[\/url\]/iU' => '<a href="$1">$2</a>', '/\[img\](.*)\[\/img\]/iU' => '<img src="$1" border="0" />', '/\[u\](.*)\[\/u\]/iU' => '<u>$1</u>')); foreach ($iArray as $iKey => $iValue) { $iString = preg_replace($iKey, $iValue, $iString); } }
basc i know.. whether it works on not is another matter i ain't actually tested it
|
|
|
|
|
That doesn't have [ code ][/ code ] tags in it though. Which is my problem.
|
|
|
|
add them then
|
|
|
|
|
He means do it so that they don't parse inside of [co de][/code] tags.
|
|
|
|
|
add an echo then
|
|
|
|
|
$str = preg_replace("#\[code\](.*?)\[/code]#si", "<div class=\"codetop\"><u><b>Code:</b></u></div><div class=\"codemain\">\\1</div>", $str);
|
|
|
|
|
With a long and tedious code, I've solved it: Look.
|
|
|
|
you've gone over your bandwidth... again lol
|
|
|
|
|
How'd you manage that?
|
|
|
|
|
he has 5gig of bandwidth now... he has 2.2gig to start with... the b/w reset at 12:00am 1st Dec... he had used it all up again by the 4th Dec 1:43pm XD
|
|
|
|