Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > vRewrite - SEOed URLs for vBulletin
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Multiple-level forum corrupt rewrite Details »»
Multiple-level forum corrupt rewrite
Version: , by tomzx tomzx is offline
Developer Last Online: Sep 2009 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-05-2007 Last Update: Never Installs: 0
 
No support by the author.

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


Quote:
//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++) {
if(is_numeric($matches[1][$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

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

Thanks

Quote:
1) What version of vRewrite are you running (please look at the plugin version)
1.5.1
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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Reply


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

Forum Jump


All times are GMT. The time now is 04:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03504 seconds
  • Memory Usage 2,190KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete