Register Members List Search Today's Posts Mark Forums Read

Mod Options
Old 05 Apr 2007, 14:43
tomzx's Avatar
tomzx tomzx is offline
Join Date: Jun 2004
Multiple-level forum corrupt rewrite

I have, in my forums, one category which contains others subcategories. When that category newpost url is being rewritten, the output becomes something like
So, I've lost the board url during the process and the category in which the post belongs (which is generally just before the t-thethreadtitle-63-new.html

How would you fix that?

Note: I'm currently on 3.6.5

I've done a bit of work and here's what I found

code that is being executed

//forumdisplay / index
# showthread.php?goto=newpost
$found = preg_match_all('#<a href="showthread\.php\?goto=newpost&amp;t=([0-9]+)"#i', $output, $matches);

if($found) {

$ids = array();

for($i = 0; $i < $found; $i++) {
$ids[] = $matches[1][$i];

for ($x = 0; $x < (count($ids)); $x++) {
$title = urlize($GLOBALS[vRewrite_thread]["$ids[$x]"][title]);
$forumid = $GLOBALS[vRewrite_thread]["$ids[$x]"][ownerid];

$fname = urlize($GLOBALS[vRewrite_forum]["$forumid"][title]);

$tid = $ids[$x];
$new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $fname : 'f-' . $fname . '-' . $forumid);
$output = str_replace("<a href=\"showthread.php?goto=newpost&amp;t=$tid\"", "<a href=\"$myurl/$new/t-$title-$tid-new{$vbulletin->options['vRewrite_extension_showthread']}\"", $output);
What I also found is that the $GLOBALS[vRewrite_forum] for that specific category will output 2 arrays, one with the main category title and another one with the lasttitle and lastthread but no title.

The actual problem is that the $fname doesn't exist for the subforum thus not outputting a value which corrupts the $output.

I can temporarly fix it with

if (empty($fname))
$fname = "subforum";
but I'd like to know how you can actually show up the forum title.


1) What version of vRewrite are you running (please look at the plugin version)
2) Version informatioN: (a) vBulletin, (b) MySQL, (c) PHP
vBulletin 3.6.5, MySQL 4, PHP 4
3) Exact error you are receiving; please provide details on how you reproduce the error. Pictures are always nice
See above

Last edited by tomzx; 10 Apr 2007 at 04:37.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 03:14.

Layout Options | Width: Wide Color: