vBulletin mod_rewrite

Reply

Join Date: Aug 2004
Posts: 6
Reputation: ToOnZ is an unknown quantity at this point 
Solved Threads: 0
ToOnZ ToOnZ is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #11
Aug 15th, 2004
I see, btw is there a demo of this hack somewhere ? Or is this forum already the working example without any extra hacks

Also, i noticed announcements are still using the normal URL ?
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,040
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 127
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

 
0
  #12
Aug 15th, 2004
Yes, I never bothered to rewrite announcements. I will in a bit though This forum is a demo of this hack - another example is a forum I designed and coded, www.mod-rewrite.com/forum/
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 40
Reputation: Ted S is an unknown quantity at this point 
Solved Threads: 0
Ted S Ted S is offline Offline
Light Poster

Re: vBulletin mod_rewrite

 
0
  #13
Aug 16th, 2004
The quickstyle chooser is run via javascript using the following code:

[php]
function switch_styleid(selectobj)
{
var styleid = selectobj.options[selectobj.selectedIndex].value;

if (styleid == "")
{
return;
}

var url = new String(window.location);
var fragment = new String("");

// get rid of fragment
url = url.split("#");

// deal with the fragment first
if (url[1])
{
fragment = "#" + url[1];
}

// deal with the main url
url = url[0];

// remove styleid=x& from main bit
if (url.indexOf("styleid=") != -1 && is_regexp)
{
re = new RegExp("styleid=\\d+&?");
url = url.replace(re, "");
}

// add the ? to the url if needed
if (url.indexOf("?") == -1)
{
url += "?";
}
else
{
// make sure that we have a valid character to join our styleid bit
lastchar = url.substr(url.length - 1);
if (lastchar != "&" && lastchar != "?")
{
url += "&";
}
}
window.location = url + "styleid=" + styleid + fragment;
}
[/php]

I have no idea how to make it work properly so for now I must stick with [R] flags.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 193
Reputation: YoungCoder is an unknown quantity at this point 
Solved Threads: 2
YoungCoder's Avatar
YoungCoder YoungCoder is offline Offline
Junior Poster

Re: vBulletin mod_rewrite

 
0
  #14
Aug 16th, 2004
Cool hack there, i think i shall use it on my forum and let the googlies in :cheesy:
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 3
Reputation: SiFor is an unknown quantity at this point 
Solved Threads: 0
SiFor's Avatar
SiFor SiFor is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #15
Aug 17th, 2004
Thanks for sharing this, I just got it setup on my forums. I'm using V3.0.3 and found a couple of the instructions didnt work for me.

Heres what I changed.

In step two it asks to replace all with the following:

  1. <a href="$forum['url'].html">
But I got an error so had to change to:

  1. <a href="$forum[url].html">

In Step four Part one I had to use:
  1. <a href="lastpostinthread$thread[threadid].html">
Instead of the instructed:
  1. <a href="lastpostinthread[threadid].html">

All works fine now.

I also used the rewrite rule Teds posted:
  1. RewriteRule ^/f([0-9]+)-(.*).html$ /forumdisplay.php?forumid=$1 [L]
But as my .htaccess file is in my forum directory I had to remove the /'s to make it work:
  1. RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]

Thanks again :mrgreen:
CertForums.co.uk Help, Advice and Resources to Pass Your Certification
Nominated for VB board of the month August
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,040
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 127
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

 
0
  #16
Aug 17th, 2004
The change you made in Step 4 Part 1 would make it stop working?
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 3
Reputation: SiFor is an unknown quantity at this point 
Solved Threads: 0
SiFor's Avatar
SiFor SiFor is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #17
Aug 17th, 2004
It may be the way I posted it:

  1. <a href="lastpostinthread[threadid].html">
That is the code as instructed in the first post.

I had to chage it to this:
  1. <a href="lastpostinthread$thread[threadid].html">

Also, theres no reply with quote buttons in any of the posts apart from the first post of this thread.
CertForums.co.uk Help, Advice and Resources to Pass Your Certification
Nominated for VB board of the month August
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,040
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 127
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

 
0
  #18
Aug 17th, 2004
Yes, that makes much more sense! As to your question, that's because there are limited features available to the DaniWeb tutorial threads. The idea is that all replies be comments / responses to the original article.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 47
Reputation: I, Brian is an unknown quantity at this point 
Solved Threads: 1
I, Brian's Avatar
I, Brian I, Brian is offline Offline
Light Poster

Re: vBulletin mod_rewrite

 
0
  #19
Aug 17th, 2004
I've been testing this on a new install, but for some reason I have the simple issue of "forumdisplay" is showing as the normal dynamic link, rather than the HTML form. It's probably a small mistake, but if there are any pointers to which part of the instructions I possibly messed up on, that would be most appreciated.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,040
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 127
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

 
0
  #20
Aug 17th, 2004
Look at all of the templates in the FORUMHOME template group and replace all occurrences of <a href="forumdisplay.php?..."> with <a href="$forum['url'].html">
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
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