[Revised] vBulletin Mod_rewrite Tutorial

Reply

Join Date: Apr 2005
Posts: 11
Reputation: berlin is an unknown quantity at this point 
Solved Threads: 0
berlin berlin is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #101
Apr 9th, 2005
Hi, there has been so many fixes for this tutorial. It's already confusing. is there one with all the fixes?
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 18
Reputation: agiacosa is an unknown quantity at this point 
Solved Threads: 0
agiacosa agiacosa is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #102
Apr 9th, 2005
Yes, I've asked Dani to let me post it but I have not heard back.

Update, Google has begun to index my keyword rich URLs because of this hack and I'm seeing an improvement in ranking. I wish the other issues could be resolved because the mod is worth it.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 11
Reputation: berlin is an unknown quantity at this point 
Solved Threads: 0
berlin berlin is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #103
Apr 9th, 2005
WOW. I just followed everyone's little fixes and it works like a charm. No problems even on the first run.


By the way, for the page numbers, this is just fine, am I correct?
http://forum.mysite.com/showthread.p...6&page=2&pp=10

It would be nice to fix that as well so google will index every page.

Thanks Dani, Keith and the rest!

Time to blow the competition.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1
Reputation: azziedone is an unknown quantity at this point 
Solved Threads: 0
azziedone azziedone is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #104
Apr 13th, 2005
Hi,

Does anyone have a solution for the broken link / 404 page error when question marks are used in the title?

I have followed everything from this thread, and the one before it, reading through almost 22 pages of bug fixes, different code variations etc. But I don't think anyone has solved this one yet.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 54
Reputation: BigBlueBall is an unknown quantity at this point 
Solved Threads: 1
BigBlueBall's Avatar
BigBlueBall BigBlueBall is offline Offline
Junior Poster in Training

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #105
Apr 13th, 2005
Originally Posted by azziedone
Hi,

Does anyone have a solution for the broken link / 404 page error when question marks are used in the title?

I have followed everything from this thread, and the one before it, reading through almost 22 pages of bug fixes, different code variations etc. But I don't think anyone has solved this one yet.
This post addresses the question marks in thread titles. There is still a problem with forum titles that use question marks, and for now, I've simply avoided using them.
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 Quick reply to this message  
Join Date: Apr 2005
Posts: 11
Reputation: berlin is an unknown quantity at this point 
Solved Threads: 0
berlin berlin is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #106
Apr 13th, 2005
What problems? it seems to work for me. It strips the question mark from the url. I'm more interested in the mod for the rest of the pages. Right now only the first page is search engine friendly but when you click page 2, 3 and so forth it back to .php
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 4
Reputation: extremefitness is an unknown quantity at this point 
Solved Threads: 0
extremefitness extremefitness is offline Offline
Newbie Poster

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #107
Apr 14th, 2005
Anyone figure out a way to use this while using multiple styles? Using the dropdown selector ignores any attempt to change your style.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 54
Reputation: BigBlueBall is an unknown quantity at this point 
Solved Threads: 1
BigBlueBall's Avatar
BigBlueBall BigBlueBall is offline Offline
Junior Poster in Training

Re: [Revised] vBulletin Mod_rewrite Tutorial

 
0
  #108
Apr 15th, 2005
Originally Posted by extremefitness
Anyone figure out a way to use this while using multiple styles? Using the dropdown selector ignores any attempt to change your style.
You don't really need to make this work with multiple styles, just your default style.. Remember the purpose of this mod is so that search engine spiders will index the keyword-rich URLs this mod generates. Since spiders won't index your site with multiple styles, you only need to apply this to whatever your default style is.
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 Quick reply to this message  
Join Date: Apr 2005
Posts: 4
Reputation: notepad is an unknown quantity at this point 
Solved Threads: 0
notepad notepad is offline Offline
Newbie Poster

How to get title urls into previous - next thread

 
0
  #109
Apr 16th, 2005
Sorry for a newbie question but I would like to replace the showthread.html? links at the bottom of each page (previous and next thread links) with title based keyword links.

I've modified the mod_rewrite hack to format thread links with both $threadID and $pagenumber as t#p# like this:

t125p4-my-thread-title.html

For which I modified my .htaccess line like so:

RewriteRule ^t([0-9]+)p([0-9]+)-(.*).html$ showthread.html?t=$1&page=$2 [L]

It rewrites just fine -- but now I need to find a way to modify the SHOWTHREAD template where the "previous" and "next thread" links are found in code like this:

  1. <div class="smallfont" align="center">
  2. <strong>&laquo;</strong>
  3. <a href="showthread.html?$session[sessionurl]t=$threadid&amp;goto=nextoldest">$vbphrase[prev_thread]</a>
  4. |
  5. <a href="showthread.html?$session[sessionurl]t=$threadid&amp;goto=nextnewest">$vbphrase[next_thread]</a>
  6. <strong>&raquo;</strong>
  7. </div>

It seems like this should be pretty easy since we have access to the $threadID and $pagenumber variables -- and the URL part will be the same for all pages in the thread.

However, I cannot seem to access $thread[url]. I'm too inexperienced with vBulletin and PHP to figure out what to try next.

Any suggestions appreciated.

- Chad
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 4
Reputation: notepad is an unknown quantity at this point 
Solved Threads: 0
notepad notepad is offline Offline
Newbie Poster

Re: How to get title urls into previous - next thread

 
0
  #110
Apr 16th, 2005
Aahh, my mistake. I don't want to modify the "Previous/Next Thread" links. I want to modify the numbered page links from the PAGENAV template -- specifically the numbered links 1|2|3|4 etc. which are built from the pagenav_pagelink template here:

  1. <td class="alt1"><a href="$address&amp;page=$curpage$address2" class="smallfont"
  2. title="<phrase 1="$pagenumbers[first]" ="$pagenumbers[last]"
  3. 3="$total" rel="nofollow">$vbphrase[show_results_x_to_y_of_z</phrase>">$curpage</a></td>

Now, it seems this is built by the function construct_page_nav in function.php so I first simplified the pagenav_pagelink template (above) to read:

  1. <td class="alt1"><a href="$tpURL.html" class="smallfont"
  2. title="$threadTitle, page $curpage">$curpage</a></td>

And then added a section into the beginning of function construct_page_nav (at the beginning of the while ($curpage++ < $totalpages) loop) like this:

  1. // TEST MOD by Chad
  2. global $threadid;
  3. $threadTitle = 'My Test Thread Title';
  4. $threadURL = 'my-test-thread-title';
  5. $tpURL = 't'.$threadid.'p'.$curpage.'-'.$threadURL;
  6. // END MOD

This results in a nicely formatted link:

t25p2-my-test-thread-title.html

So now how do I go about getting the REAL thread title and URL into the above code?

- Chad
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC