The current way of doing things is where the links to newpostinthreadXXX.html and lastpostinthreadXXX.html redirect to their showthread.php? counterparts. The following mini-tutorial will fix that:
STEP ONE
Add the following line to your .htaccess file:
RewriteRule ^post([0-9]+).html$ showthread.php?p=$1 [L]
STEP TWO
All of the following changes need to be made to the showthread.php file:
exec_header_redirect("showthread.php?$session[sessionurl_js]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");
should be replaced with
exec_header_redirect("post$getlastpost[postid].html#post$getlastpost[postid]");
exec_header_redirect("showthread.php?$session[sessionurl_js]p=$posts[postid]$highlightwords#post$posts[postid]");
should be replaced with
exec_header_redirect("post$posts[postid].html#post$posts[postid]");
exec_header_redirect("showthread.php?$session[sessionurl_js]t=$threadinfo[threadid]&goto=lastpost$highlightwords");
should be replaced with
exec_header_redirect("lastpostinthread$threadinfo[threadid].html");
exec_header_redirect("showthread.php?$session[sessionurl_js]t=$thread[pollid]");
should be replaced with
exec_header_redirect("thread$thread[pollid].html");
$firstunread = 'showthread.php?' . $session['sessionurl'] . 't=' . $threadid . '&goto=newpost';
should be replaced with
$firstunread = 'newpostinthread' . $threadid . '.html';
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
Thank you so so much for your kind words. And thank you for your generous donation to DaniWeb, as well!
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
You're very welcome ToOnZ! I hope you got it all straightened out. Darmak, what you're asking seems that it can be accomplished by editing the includes/functions_online.php file. There is actually an existing vB.org hack that might be helpful - please let us know if it worked for you:
http://www.vbulletin.org/forum/showthread.php?t=66569
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
Are you sure? I was under the impression it will work for all files - php and html. In any case, the file that you would need to edit is the includes/functions_online.php file. When I have more time, I'll investigate it further.
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
Board names are rewritten due to Step 1, editing the includes/functions_forumlist.php file - nothing to do with the editing of the .htaccess file.
Your sub-forums showing a bad link looks like you made a typo in the forumhome_subforumbit_nopost or forumhome_subforumbit_post templates. Just revert those two templates and try again - it looks like you have an added '/' symbol somewhere.
As far as why newpostinthread links don't work - that doesn't make sense. By looking at your .htaccess file they should. But let's take care of one problem at a time. And when everything else is fixed, then we'll look at this problem.
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
Here's what to do. Create an .htaccess file and put everything from Step 5 only into it. Upload it to your forum's root directory. Then, manually type into your browser: www.yourdomain.com/forum/forum1.html or whatever your directory structure just happens to me. Then let me know what happened.
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
I'm really glad you got it working Brian :) Very cool! I just went back and double-checked my original tutorial thinking maybe I left out about how the .htaccess has to go in your forum directory, but nope, it said that all along ;)
Also, the file includes/functions_forumlist.php creates forum URLs by taking the forum title, converting all letters to lowercase, replacing all slash characters with the dash character, and replacing all spaces with the dash character. So a forum called "Me and You" will be translated to "me-and-you" given those rules.
With a bit of tweaking to Step One of the tutorial, you can remove the word "and" from your rewritten URLs ... or basically remove / tweak / edit any combination of letters to be translated into how you want. I could even tweak it so that a forum called "Dani and vBulletin" could be translated to the URL "dani-and-vB" by replacing all instances of vBulletin with vB ... or translated to "dani-vBulletin" by replacing all instances of " and" with the empty/null string. As you can see, this is the same logic that is used to replace a space " " character with a "-" dash character.
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229