
04-18-2006, 04:53 PM
|
 |
|
|
Join Date: Jul 2004
Location: USA
Posts: 425
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by cd1986
Sorry, didn't see that part of the post 1st time round. Have you tried adding $myurl to the front of the re-written paths instead of /f/ ?
EDIT: btw, i think the product file contains two showthread.php? f=xyz&page= url replacements. Once i changed the top one to showthread.php? t=xyz&page= i could access all thread pages, whereas before i got invalid link errors.
PHP Code:
#------------------------------ # Replace showthread.php?t=XYZ&page= #------------------------------ $found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)&page=([0-9]+)"#i', $output, $matches); if($found) { $ids = array(); $test = array(); for($i = 0; $i < $found; $i++) { if(is_numeric($matches[1][$i])) { $ids[] = $matches[1][$i]; $tid =$matches[1][$i]; $test["$tid"]["page$i"] = $matches[2][$i]; } } for ($i = 0; $i < (count($ids)); $i++) { $fname = urlize($GLOBALS[foruminfo][title]); $title = urlize($GLOBALS[vRewrite_thread]["$ids[$i]"][title]); $tid = $ids[$i]; $page = $test["$ids[$i]"]["page$i"]; $parentid = $GLOBALS[foruminfo][forumid]; if (empty($fname)) { $parentid = $GLOBALS[vRewrite_thread]["$ids[$i]"][ownerid]; $fname = urlize($GLOBALS[vRewrite_forum][$parentid][title]); } $new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $fname : 'f-' . $fname . '-' . $parentid); if($vbulletin->options['vRewrite_page'] == "1") { $output = str_replace("<a href=\"showthread.php?t={$tid}&=$page\"", "<a href=\"$new/$title-page$page-t$tid{$vbulletin->options['vRewrite_extension_showthread']}\"", $output); } else { $output = str_replace("<a href=\"showthread.php?t={$tid}&page=$page\"", "<a href=\"$new/$title-t$tid/page$page{$vbulletin->options['vRewrite_extension_showthread']}\"", $output); } } }
|
Are you using 1.5 stable? I haven't seen any problems with thread pages with 1.5 stable; perhaops you can give me the exact links you had a problem with?
|