The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How can I get the threadid?
I'm trying to change the URL's for forums and threads in an effort to make them more friendly to search engines like Google. I know there are several hacks with a rather different way of doing this, but I'm giving this method a shot. Right now I'm working on displaying threads by changing the normal URL (http://www.domain.com/forum/showthread.php?s=&threadid=123) to the new one (http://www.domain.com/forum/thread/123). I've almost got it working - here's what I've done so far:
- - - - - - - - - - 1. Created a copy of showthread.php and named the new file simply "thread" without any extension. 2. I then uploaded a .htaccess file in my forum directory containing the following (which will cause Apache to read the new "thread" file as a PHP script). Code:
<Files thread> ForceType application/x-httpd-php </Files> Code:
<?php error_reporting(7); $url_array=explode("/",$PATH_INFO); $threadid=$url_array; $action = $HTTP_GET_VARS['action']; $goto = $HTTP_GET_VARS['goto']; if ( isset($goto) and ($goto=='lastpost' or $goto=='newpost')) { $noheader=1; } After I perform the modifications above, I am able view a thread by using the new URL (http://www.domain.com/forum/thread/123). However, it will *only* show me the first thread on the forum (with a threadid of 1). I know the problem lies in the $threadid=$url_array; line, but I don't know what to change it to to fix it so that it will display whatever threadid number I specify in the URL. How should I change that line to achieve the desired effect? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|