User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 403,031 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,883 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 35346 | Replies: 131
Reply
Join Date: Jan 2005
Posts: 2
Reputation: Sajjid is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Sajjid Sajjid is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #51  
Jan 25th, 2005
anyone providing support for this mod ? it seems the are many un answred questions.
thnaks
Reply With Quote  
Join Date: Sep 2004
Posts: 7
Reputation: nkisberg2000 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nkisberg2000 nkisberg2000 is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #52  
Jan 26th, 2005
One minor addon I'd still like,i've got a category for "tutorials" I want just that section to use tutorial[tid]-<name>-<name> instead of thread[tid]-name-name any ideas?

Also,

Did anyone fix the problem of the nav bar (thread tree) following ted s' style of links instead of just the default.
Reply With Quote  
Join Date: Feb 2005
Posts: 3
Reputation: oil is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
oil oil is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #53  
Feb 10th, 2005
I am quite a newbie to vB, but this is mod is very sweet,

I rember that I read somewhere it better to use "_" for spaces than spaces itself, but cant find it anymore can anyone say something to this ?

also the archives are not rewritten, its probablly not needed at, all just would be nice to know

and while I am at the archive issue, may its only a setting I did wrong, my arviches neve shows the links clickable, it this a special mod I need therefor or only a setting
Reply With Quote  
Join Date: Feb 2005
Posts: 3
Reputation: nolnet is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nolnet nolnet is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #54  
Feb 12th, 2005
I am getting duplicate forum titles also. How did you resolve this issue?

You can see the results here:www.okctalk.com other than that it seems to be working great.

Cheers!

Originally Posted by infiniterb
Got a problem. The rewite works fine, except that I'm seeing duplicate forum names. Any idea what I need to edit to fix this?

www.clantt.com/vb/ is the url in question.

Thanks in advance. Nice work.
Reply With Quote  
Join Date: Feb 2005
Posts: 3
Reputation: oil is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
oil oil is offline Offline
Newbie Poster

Re: [Revised] FIXED

  #55  
Feb 12th, 2005
I realized a bug, in this thingie, just stupid guys like me may trap into this but just wanted to correct for the guys with less html knowledge:

Originally Posted by KeithMcL

Step 2 - Template Edits
This step covers all the template edits needed. Within the Forum Home Templates group the following templates all require the modification below.

forumhome_forumbit_level1_nopost
forumhome_forumbit_level1_post
forumhome_forumbit_level2_nopost
forumhome_forumbit_level2_post
forumhome_subforumbit_nopost
forumhome_subforumbit_post


In each of the templates above find:
[php]<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">[/php]

And Keith said: replace with: wich is WRONG
[php]<a href="f$forum[forumid]-$forum[url].html">$forum[title]</a>[/php]

the correct version of above replacement is:
Find:
[php]<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">[/php]
replace:
[php]<a href="f$forum[forumid]-$forum[url].html">[/php]
otherwise you got 2 forum titles, in your forum home, and I am sure you will not like to seen this,

except this little bug, great post, thx keith
Reply With Quote  
Join Date: Dec 2004
Location: California
Posts: 50
Reputation: BigBlueBall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
BigBlueBall's Avatar
BigBlueBall BigBlueBall is offline Offline
Junior Poster in Training

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #56  
Feb 16th, 2005
Would it be fairly easy to modify this a bit so that the URL for topics also included the forum title, but make it look like a directory?

Basically, something like this:

http://www.bigblueball.com/forums/t2...mber_2004.html

Would be modified to look like this:

http://www.bigblueball.com/forums/announcements/t28559_member_of_the_month_-december_2004.html

... where announcements is the forum title.

Similarly, why not translate

http://www.bigblueball.com/forums/f1...uncements.html to
http://www.bigblueball.com/forums/f120_announcements/ or
http://www.bigblueball.com/forums/f1...nts/index.html ?

This mimics the structure of the forum, is logical to visitors AND opens up the possibility of improving SEO (by combining forum title + thread title in the URL).
BigBlueBall - Everything about instant messaging
MessengerMods - Customize MSN with display pictures and emoticons
HisBuddyIcons - AIM buddy icons for dudes
BigBlueTemplates - 1,000s of professional website templates

Reply With Quote  
Join Date: Dec 2004
Location: California
Posts: 50
Reputation: BigBlueBall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
BigBlueBall's Avatar
BigBlueBall BigBlueBall is offline Offline
Junior Poster in Training

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #57  
Feb 17th, 2005
I found a bug. If the forum name has a ? in it, the resulting URL fails. For example:

http://www.bigblueball.com/forums/f1...ou-laugh?.html doesn't work.

I'm also getting complaints from my admin that there are too many redirects:
# wget http://www.bigblueball.com/forums/newpostinthread28848.html
  --00:54:48--  http://www.bigblueball.com/forums/newpostinthread28848.html
  		   => `newpostinthread28848.html'
  Resolving www.bigblueball.com... done.
  Connecting to www.bigblueball.com[70.84.84.106]:80... connected.
  HTTP request sent, awaiting response... 302 Found
  Location: http://www.bigblueball.com/forums/showthread.php?t=28848&goto=lastpost [following]
  --00:54:48--  http://www.bigblueball.com/forums/showthread.php?t=28848&goto=lastpost
  		   => `showthread.php?t=28848&goto=lastpost'
  Connecting to www.bigblueball.com[70.84.84.106]:80... connected.
  HTTP request sent, awaiting response... 302 Found
  Location: http://www.bigblueball.com/forums/showthread.php?p=159143#post159143 [following]
  --00:54:48--  http://www.bigblueball.com/forums/showthread.php?p=159143
  		   => `showthread.php?p=159143'
  Connecting to www.bigblueball.com[70.84.84.106]:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 37,924 [text/html]
  
 100%[================================================== ==================>] 37,924	 36.17M/s	ETA 00:00
  
  00:54:48 (36.17 MB/s) - `showthread.php?p=159143' saved [37924/37924]
Is this something to be concerned about?
BigBlueBall - Everything about instant messaging
MessengerMods - Customize MSN with display pictures and emoticons
HisBuddyIcons - AIM buddy icons for dudes
BigBlueTemplates - 1,000s of professional website templates

Reply With Quote  
Join Date: Dec 2004
Location: California
Posts: 50
Reputation: BigBlueBall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
BigBlueBall's Avatar
BigBlueBall BigBlueBall is offline Offline
Junior Poster in Training

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #58  
Feb 17th, 2005
I fixed the problem with question marks in the forum title. I had to make the following changes:

forumdisplay.php - Added regular expression to strip out special characters
[PHP]// ################ MOD_REWRITE HACK ######################
foreach ($parentlist AS $forumID)
{
$forumTitle = $forumcache["$forumID"]['title'];
$forumURL = strtolower(str_replace(" ", "-",str_replace("/", "-", $forumTitle)));
$forumURL = ereg_replace("[\/!£$%^&*«»,.;:'#@~{}|=+`¬<>?]+", "", $forumURL);
$navbits["f$forumID-$forumURL.html"] = $forumTitle;
}
// ################ MOD_REWRITE HACK ###################### [/PHP]
includes/functions_forumlist.php - Replace in both sections
[PHP]// ################ MOD_REWRITE HACK ######################
$forum['url'] = strtolower(str_replace(" ", "-",str_replace("/", "-", $forum['title'])));
$forum['url'] = ereg_replace("[\/!£$%^&*«»,.;:'#@~{}|=+`¬<>?]+", "", $forum['url']);
// ################ MOD_REWRITE HACK ###################### [/PHP]Now, questions marks and other special characters that might be in your forum titles won't mess up your URLs.
BigBlueBall - Everything about instant messaging
MessengerMods - Customize MSN with display pictures and emoticons
HisBuddyIcons - AIM buddy icons for dudes
BigBlueTemplates - 1,000s of professional website templates

Reply With Quote  
Join Date: Feb 2005
Posts: 3
Reputation: oil is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
oil oil is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #59  
Feb 17th, 2005
can you post a test url ?

cause on the url you given there is still the 404 error
I also heard that":" could cause problems is this with your replacement fixed also ?

I always wanted to ask when I use a new template / style all the stuff hast to be redone, I tried to load the template inherited from my master template with all the changed I made here, the the rewirte does work, but the button / pathes arent correct anymore, can this be fixed within the xml file ?
Reply With Quote  
Join Date: Dec 2004
Location: California
Posts: 50
Reputation: BigBlueBall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
BigBlueBall's Avatar
BigBlueBall BigBlueBall is offline Offline
Junior Poster in Training

Re: [Revised] vBulletin Mod_rewrite Tutorial

  #60  
Feb 17th, 2005
Originally Posted by oil
can you post a test url?
The fix I posted above strips out question marks, so the resulting URL now looks like:

http://www.bigblueball.com/forums/f1...ou-laugh?.html (no more question mark).

Originally Posted by oil
I also heard that":" could cause problems is this with your replacement fixed also?
Yes, it will strip out all of the following characters: \/!£$%^&*«»,.;:'#@~{}|=+`¬<>?

Originally Posted by oil
I always wanted to ask when I use a new template / style all the stuff hast to be redone, I tried to load the template inherited from my master template with all the changed I made here, the the rewirte does work, but the button / pathes arent correct anymore, can this be fixed within the xml file ?
What I do is first download a copy of my "production" style, then import that as a new style and modify that. I don't know if that's the best practice or not, but it's worked OK for me.
BigBlueBall - Everything about instant messaging
MessengerMods - Customize MSN with display pictures and emoticons
HisBuddyIcons - AIM buddy icons for dudes
BigBlueTemplates - 1,000s of professional website templates

Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 10:55 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC