PDA

View Full Version : How can I parse this easily? (vb 2.3)


SpeedStreet
12-04-2003, 03:16 PM
I have this code:

echo $row_rsNewsForum['pagetext'];



As you can tell, its my pagetext. This appears on a non-vb page.



What is the best way for this echo to adhere to vB codes, smilies, etc?



Is there a function I should include from elsewhere?



I'm already including global.php in this code, so any help additionally would be greatly appreciated and shared.



Thanks in advance!

Dean C
12-04-2003, 03:40 PM
I believe you need to look into the bbcodeparse and bbcodeparse2 functions :)

Lesane
12-04-2003, 04:01 PM
Using the bbcodeparse2 function directly works fine.

SpeedStreet
12-04-2003, 04:01 PM
I believe you need to look into the bbcodeparse and bbcodeparse2 functions :)
Ok, I've located the functions (in functions.php) and written the include into my page.

Now, how would I edit the echo to parse it?

Thanks Mist, you seem to answer everyones' issues in this section! :)

SpeedStreet
12-04-2003, 04:07 PM
Using the bbcodeparse2 function directly works fine.
Focusing now on bbcodeparse2...

SpeedStreet
12-04-2003, 04:38 PM
I've altered my code as such;

bbcodeparse2 ($row_rsNewsForum['pagetext']);

Along with trying a number of other different options...nothing is working.

Can anyone throw me a bone so that I can work this out? I think we should post this as a hack as well, since there seem to be alot of people who have requested this, but nobody ever finishes it up.

assassingod
12-04-2003, 04:40 PM
$row_rsNewsForum['pagetext'] = bbcodeparse2($row_rsNewsForum['pagetext'],0,1,1,1);
The numbers after the variable is, allowhtml,allowsmilies,allowimages and allowbbcode :)

SpeedStreet
12-04-2003, 06:42 PM
$row_rsNewsForum['pagetext'] = bbcodeparse2($row_rsNewsForum['pagetext'],0,1,1,1);
The numbers after the variable is, allowhtml,allowsmilies,allowimages and allowbbcode :)
YOU ROCK.

Now, I got bbcode parsing (I had to add an echo to the beginning, but that is neither here nor there).

The only problem I am having now, is that my htmlcode within posts is not registering now...is there a way to fix this issue, or am I going to have make due with just vbcode only?

SpeedStreet
12-04-2003, 06:46 PM
Here is what my HTML is outputting as:

<H3 class=title>A Letter<

My code outputting this is:

<?php

echo $row_rsNewsForum['pagetext'] = bbcodeparse($row_rsNewsForum['pagetext'],0,1,1,1);
?>

SpeedStreet
12-04-2003, 08:49 PM
Here is what my HTML is outputting as:

&lt;H3 class=title&gt;A Letter&lt;

My code outputting this is:

<?php

echo $row_rsNewsForum['pagetext'] = bbcodeparse($row_rsNewsForum['pagetext'],0,1,1,1);
?>
I'm digging through showthread, but I can't find how they parse both vbcode and htmlcode at the same time...

grr.

Lesane
12-05-2003, 11:58 AM
the first number was parsing html, to enable html make them all 1's like: 1,1,1,1