View Full Version : Quote tags in non-forum-root page?
boozehound
02-22-2005, 01:39 PM
Currently doing a page which involves showing posts in a modcp page. Having a bit of bother with quote tags though (I think this applies to any page that isn't in the forum root dir). If I use parse_bbcode on a string it strips the quote tags and the text between them entirely; if I use parse_bbcode2 the quote tags aren't changed at all.
This is probably a schoolboy error as I haven't delved into the functions_bbcodeparse code very deeply yet, so I was wondering if anyone had an ideas as to how to get the parse_bbcode functionality working correctly in such a page?
sabret00the
02-22-2005, 01:49 PM
ok parse_bbcode2 is primarily used for previews to my understanding
and parse_bbcode is used for most things and should parse quote tags even outside of the forum directory.
if you're trying to strip quote tags theirs a function for that though :)
boozehound
02-22-2005, 02:14 PM
Ok given the following php page:
<?php
require_once('./global.php');
require_once('./includes/functions_bbcodeparse.php');
$text = "Some quoted text";
$text = parse_bbcode($text);
echo "<html><body>";
echo $text;
echo "</body></html>";
?>
Why does this produce a nested quote when ran in the forum root, but not when ran from the modcp dir?
sabret00the
02-22-2005, 03:36 PM
the globals are very different.
<?php
require_once('./global.php');
require_once('../forums/global.php');
require_once('../forums/includes/functions_bbcodeparse.php');
$text = "Some quoted text";
$text = parse_bbcode($text);
echo "<html><body>";
echo $text;
echo "</body></html>";
?>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.