PDA

View Full Version : Remove Intermediate Redirection Page


Tommy Boy
11-20-2001, 10:00 PM
For some odd reason, I didn't see any request for such a feature, although as far as I know, vBulletin is the only bulletin board which uses this useless redirection system. I'm talking about the "Thank you for logging in...", "Thank you for posting...", "Please wait while searching...", etc. pages.

This hack (I'm not even sure you can call it a hack, it's just 1 line of code) will get rid of this page. It works with all the browsers, but just in case a VERY old browser is being used, the original redirection system will be used, so basically you have nothing to lose.

In the admin/functions.php file, find:
eval("dooutput(\"".gettemplate("standardredirect")."\");");
Before it, add:
header ("Location: $url");

auto
11-23-2001, 03:09 PM
I don't think this would exist if it was totally useless..
My theory is that the redirection page allows the server to breathe inbetween resource consuming actions.. so it doesnt overload and crash.

george_proost
11-24-2001, 10:03 AM
Originally posted by auto
I don't think this would exist if it was totally useless..
My theory is that the redirection page allows the server to breathe inbetween resource consuming actions.. so it doesnt overload and crash.

is this indeed the case ????

Syphin
11-24-2001, 10:10 AM
Originally posted by auto
I don't think this would exist if it was totally useless..
My theory is that the redirection page allows the server to breathe inbetween resource consuming actions.. so it doesnt overload and crash.

Thats what i was thinkin too...

But im sure theres more... like setting cookies or somthing like that... not sure.. but id rather keep them anyways...


-Syphin

Tommy Boy
11-24-2001, 10:12 AM
Originally posted by george_proost

is this indeed the case ????
It wouldn't make any sense if it was. You see, the intermediate page is a normal HTML page, in which the HTTP-EQUIV META tag is used for re-redirection. If at all, it just generates MORE server work, not to speak about the extra bandwidth...

I'm using my hack in my forums since the very beginning, and I have quite a busy board, and so far so good. :p

Admin
11-24-2001, 11:16 AM
While this is good for the "big guns" of forums, who use it for a lot of time, I think the redirection page is important and friendly for newbies.
I don't know how to explain this, I'm sure someone else can, but just doing stuff without letting the user know isn't good IMO.

I think I'll use this for my testing site... I don't need the redirection. :)

fonzerelli_79
11-25-2001, 10:17 AM
firefly

do you think the admin at vbulletin forums would know why this is there

GeorgeofCS
11-25-2001, 11:00 AM
It works great, but there appears to be a few areas where it appears to be needed. With deleting threads, and a portion of the registration. Although it still does redirect it takes so long to do so that 50% of the time my users thought they screwed up. :(

Admin
11-25-2001, 11:06 AM
[QUOTE]Originally posted by fonzerelli_79
firefly

do you think the admin at vbulletin forums would know why this is there

fonzerelli_79
11-25-2001, 11:58 AM
sorry firefly

what i meant was, do you think that any of the administrators or moderators of the vbulletin forums would know why this redirection is in place

i agree with you that it helps with new users of a forum but i think experienced users get a bit annoyed

Tommy Boy
11-25-2001, 01:17 PM
Originally posted by GeorgeofCS
Although it still does redirect it takes so long to do so that 50% of the time my users thought they screwed up. :( I highly doubt it is related to removing the redirect page. If you want, you can play with my board (http://www.utopiatemple.com/forum), and enjoy the fast reaction time.

DarkReaper
11-25-2001, 03:15 PM
What about allowing the user to choose to disable it?

fonzerelli_79
11-25-2001, 03:18 PM
what i want to know is why didn't i think of it??

doh!

nafae
11-25-2001, 03:42 PM
definately a good idea for a yes/no on the registration page/user cp: "Use Intermediate Redirection pages?" would be great.

Crinos
11-25-2001, 10:58 PM
Well, I think the redirect is a novelty way back in the UBB days ... in any case, I've applied it to my test forum and it does give a semblance of "speed" and "responsiveness" ... so I'm applying it to my live forums and see what happens ;)

Thanks :)

nafae
11-25-2001, 11:12 PM
let us know if you get any responses from forum newbies or if it works out smoothly :)

JTMON
11-26-2001, 01:48 AM
I installed this hack. Working great, everything is speedy.

I posted the question over at vbulletin.com and the official reply from Tubedogg was:

"It is used as an alternative to using the Header("Location:xxx"); function of PHP, and to provide information to the user about what is happening, whether their post was successful, etc. It places no indentifiable additional load on the server."

LuBi
11-26-2001, 10:42 AM
Maybe we could work out a sciprt like this.

0-99 Posts See redirect page
100 Posts see a special rediect page that will inform them they will never see hti page again unless they choose so in their user cp
101+ Do not see the rediect pages unless checked in user cp

With this code you would have to add something in the user CP and I would leave the default as redirects on but hey who knows, any ideas?

Also at 100 it couldk inform them they are now able to disable the rediect pages, I think that would be better for users.

nafae
11-26-2001, 07:01 PM
i think an option when they register, and then they can just change it via usercp if they change their mind.. that would prolly be easier to code anyways...; i dunno :stupid:

Robert Basil
11-30-2001, 05:54 AM
Installed on my site with 14,500+ members and working fine!

Thanks for the hack.

Streicher
12-05-2001, 07:41 PM
This hack does not work with Opera 6. :(

nuno
12-07-2001, 05:40 PM
many tx Tommy :)
gr8 hack ;)

derfelix
12-08-2001, 01:41 AM
Originally posted by Streicher
This hack does not work with Opera 6. :(



and also if you post an image in your thread although you use the no-cache headers etc...
somehow in netscape 4.7 it is still the old one in cache!!! have to do a shift reload to see the new one..
with the intermediate page and the same headers it works fine...

Crinos
12-08-2001, 03:56 AM
Anyone noticed a strange behavior when this hack was installed? My members just brought to me attention that after they reply to a post, it brings them back to the beginning of the thread instead of the message they just posted ...

I tried undoing the redirection hack and now it's working again ... it seems the redirection page is necessary to anchor back to the recent post ... anyone else having this behavior?

I have uninstalled the hack for now until I get some more info :)

FWC
12-08-2001, 04:12 AM
Originally posted by Crinos
Anyone noticed a strange behavior when this hack was installed? My members just brought to me attention that after they reply to a post, it brings them back to the beginning of the thread instead of the message they just posted ...

I tried undoing the redirection hack and now it's working again ... it seems the redirection page is necessary to anchor back to the recent post ... anyone else having this behavior?

I have uninstalled the hack for now until I get some more info :) I had the same problem and uninstalled the hack because of it. I think there needs to be a little more code in this one to take you where you are supposed to go.

Meta
12-08-2001, 09:56 AM
I had the same problem. And didn't find a clue. So i uninstalled it.

Nice that i'm not the only one.

Without redirect there is missing the second parameter in the url.

Instead of

=&postid=20548#post20548 it only says

=&postid=20548

Tommy Boy
12-08-2001, 11:46 AM
Looks like you're right. The reason why I didn't notice it, is because I've set my board to go back to the forum after posting, instead of returning to the thread.

Anyway, I have investigated it for a couple of hours, and it seems to be an Internet Explorer problem, since the header is passed just fine. In other words, IE ignores internal anchors (#post1234) in the Location URL, in this specific case. In my tests, when having an internal anchor in the Location URL, but having it as the only header line, it worked just fine. Therefore, there seems to be another header line which confuses IE in this case, but I haven't been able to find it. If someone could help, it would be great.

In the meantime, you can replace:
doshutdown();
header ("Location: $url");
eval("dooutput(\"".gettemplate("standardredirect")."\");");with
doshutdown();
header ("Refresh: 0; URL=$url");
// eval("dooutput(\"".gettemplate("standardredirect")."\");");This does not perform "smooth" redirect, as it uses a technique close to the original one vBulletin uses, however it will transfer internal anchors, and it is faster than the original vBulletin redirection. If the internal anchors problem doesn't bother you, you should stay with the original Location line, until we find a better solution.

Gutspiller
01-03-2002, 11:01 PM
This hack did not work on my forum, which is 2.0.3. It did not take out the redirection pages. I do have a hack that puts people back to the forum, but this hack changed nothing. :(

-.valkyre
01-03-2002, 11:26 PM
Gutspiller, this is simple: Update your forums

And I love this hack! But I'm not sure about installing it on my forums. Could you (or someone else) make it like the others said? An option to turn it on/off? That would be awesome!

Tommy Boy
01-04-2002, 12:48 AM
Originally posted by -.valkyre
Gutspiller, this is simple: Update your forums

And I love this hack! But I'm not sure about installing it on my forums. Could you (or someone else) make it like the others said? An option to turn it on/off? That would be awesome! I'll try to find the time for that.

-.valkyre
01-04-2002, 12:52 AM
Thanks man, your the best :)

Gutspiller
01-04-2002, 03:09 AM
Originally posted by -.valkyre
Gutspiller, this is simple: Update your forums

And I love this hack! But I'm not sure about installing it on my forums. Could you (or someone else) make it like the others said? An option to turn it on/off? That would be awesome!

You mean update my counters? Which do I need to do? there's Update Users Info, Update Forums Info, Update Thread Info, Rebuild search index, and Remove dupe threads. Which? :confused:

nuno
01-04-2002, 03:42 AM
Originally posted by Gutspiller
This hack did not work on my forum, which is 2.0.3. It did not take out the redirection pages. I do have a hack that puts people back to the forum, but this hack changed nothing. :(

are you running Apache?

Erwin
01-08-2002, 07:32 AM
The hack works fine with the updated code, Tommy Boy. The replies do get anchored. I like it. I would be interested to know if anyone has found any other bugs with it. So far it is working well on my forums.

Erwin
01-08-2002, 09:23 AM
Nope, I take that back.

I tested the redirection code with NN 4 and NN6 and Opera - you get an error with it.

So I have removed the hack.

Good idea, but needs to be compatible with other browsers.

nuno
01-18-2002, 12:27 AM
not working with Konqueror also :(

Tim Wheatley
02-13-2002, 06:38 PM
Well I've just set the meta tag to go go the new URL in 0secs in my template, that's made things a lot quicker and I didn't have to hack a thing...

CloudBurst
02-16-2002, 02:53 PM
I think I'll test install to try to lower the bandwidth :)
If it screws up the server speed, or don't work then I'll tell you :D lol.

SWFans.net
03-03-2002, 12:19 AM
One of the side effects of this hack that I like is the fact that it causes my forums index not to reload from scratch (as if not cached) when using our database version of "Mark Forum Read" per ethank, which is slightly modified so that when it is clicked within a forum, it takes you back to the forums index page rather than returning you to the same forum you just marked read.

I suppose I'll keep using it since more than 98% of our forum users use IE or Netscape, and no one has complained about not being returned directly to thier post after submitting a reply.

JTMON
03-07-2002, 04:08 PM
Anyway to get this working on the new 2.2.3b? I edited the functions but it has exit; instead of doshutdown(); I tried it anyways and the board worked up until trying a new reply, then it would just give me a white page.

JediKNight
03-21-2002, 05:01 PM
um... I've installed this hacks with my 2.2.1 and I am upgrading to 2.2.4 but don't know if it works fine for 2.2.4 ?
This is a very great hacks, I've been thinking of ."there must be something link this..." :D

anyway, thanks a lot.

Jedi

Tommy Boy
03-21-2002, 09:12 PM
It is working fine for me, and I'm running 2.2.4.

JediKNight
03-22-2002, 04:46 AM
Parse error: parse error in /home/petrusk/public_html/forums/admin/functions.php on line 807

Fatal error: Call to undefined function: vbdate() in /home/petrusk/public_html/forums/admin/sessions.php on line 357

Will the author upgrade this hacks to works with 2.2.4? and someone who had this hacks with 2.2.4 will you please upload the file so that people can use? thanks a lot.

Jedi

bill-t
03-25-2002, 10:06 PM
Originally posted by Erwin
Nope, I take that back.

I tested the redirection code with NN 4 and NN6 and Opera - you get an error with it.

So I have removed the hack.

Good idea, but needs to be compatible with other browsers.

I have it installed on my board, browse my board with opera6 and no problem...

CeleronXL
03-26-2002, 06:23 PM
Not sure if this has been said already because I'm too lazy to read it all, but I'm pretty sure the page is there to allow time to write the database. It's not instant.... There needs to be time in between...

JTMON
03-26-2002, 06:26 PM
No, when it works, it works ok. Someone else said they thought that was it also but I didn't have a problem with it until the upgrade to 2.2.4 and I only upgraded the two files they said were needed for the security hole.

JediKNight
03-26-2002, 10:29 PM
and I don't think there is any reasons that make this hacks discriminate over user's browsers..
Since PHP is server-parsed and then serve to end-user as HTML, the browsers only receive HTML (not php codes).. so if browser can't display the page for some reasons.. it's the browser's problem.

Jedi

Tommy Boy
03-27-2002, 12:59 PM
Originally posted by CeleronXL
Not sure if this has been said already because I'm too lazy to read it all, but I'm pretty sure the page is there to allow time to write the database. It's not instant.... There needs to be time in between... :laugh: :laugh: :laugh:

melondog
04-04-2002, 01:00 AM
The reason the redirect is there is so if a user refreshes the thread page, the post is not resubmitted. You should redirect to a blank page that redirects to the thread, to make it seem like no mid step is used, and then it takes them to the url. That is what I think should be done. :)

p.s. - I've done this on my test board.

JTMON
04-04-2002, 01:02 AM
the only problem I see with that is that I read that before, tested it and couldn't reproduce the problem so I figured they fixed it.

Tommy Boy
04-05-2002, 02:12 AM
Originally posted by melondog
The reason the redirect is there is so if a user refreshes the thread page, the post is not resubmitted. You should redirect to a blank page that redirects to the thread, to make it seem like no mid step is used, and then it takes them to the url. That is what I think should be done. :)

p.s. - I've done this on my test board.

You'll get the same effect with this hack too.

The Keeper
04-05-2002, 04:29 AM
heh I just changed
<meta http-equiv="Refresh" content="1; URL=$url">

to
<meta http-equiv="Refresh" content="0; URL=$url">

in Standard redirect, to make it appear faster.

phase1
04-05-2002, 06:37 PM
test

Psychdrone
04-06-2002, 06:15 PM
Hey could somebody be so kinda and tell me around what line this is on?? Cause I have 2.2.4 and can not find it

Please thanks guys!

Erwin
04-08-2002, 02:07 AM
It's in the standardredirect template.

Velocd
04-08-2002, 03:04 AM
Excellent hack :p :p

It works perfectly on my forums, and I'm not getting any of the problems some of you are getting. I'm using the original code on the main page, and when I post it takes me right to my thread :)
Very fast, and I know the users will like it.

99% of the people on my forums use Internet Explorer, so there is no worry bout incompatibility till maybe later. An option for enabling / disabling in profile would be nice.

Ben Johnson
09-08-2002, 05:14 PM
i installed this hack and when people vote on polls it does not work

TheSaint-AeD
10-19-2002, 01:47 PM
I have lots of requests of my Users for this Hack. Could anybody of the vB.org-Staff please say something to this? Test it and correct it if needed?

Paul
10-19-2002, 03:28 PM
I have been able to use the header() function to successfully redirect to a post anchor. It involves far more code editing than is supplied here and appears to be the way vb3 is handling this.

There are instances when standardredirect is used for informational purposes, so I elected to only remove specific instances--most notably, newthread, newreply, and search.

If there is an interest, I'll attach instructions here.

Paul

Kars10
10-20-2002, 01:18 PM
cool hack!! Works great... ;)
* Minifreunde klicks installed!

TheSaint-AeD
10-23-2002, 06:34 AM
Originally posted by LoveShack
I have been able to use the header() function to successfully redirect to a post anchor. It involves far more code editing than is supplied here and appears to be the way vb3 is handling this.

There are instances when standardredirect is used for informational purposes, so I elected to only remove specific instances--most notably, newthread, newreply, and search.

If there is an interest, I'll attach instructions here.

Paul

Yes, there is Interest :) You could even release it newly giving Credits to Chen ;)

Axel Foley
12-10-2002, 12:56 AM
Tommy, your hacks are little "gems"...;)

This hack is working on my 2.2.9 forum. It works with other browsers. It only has the glitch of the anchor problem, but as someone else said, it's IE's fault, the anchor gets parsed correctly on other browsers.

This hack also solved a little problem my users and I noticed: after the submission of a new post/reply, when the forum redirected to the thread, the browser "reloaded" the entire page, graphics were pulled from the cache, but anyway it was a little slow. I never caught the problem.

Anyway I just installed this and I noticed a big improvement in response time, some users already tried it and they are very happy about it. :D

Keep up the excellent work Tommy...

Erwin
12-10-2002, 01:40 AM
I agree - this caches the graphics, so it actually reduces bandwidth and speeds things up. :)

Boofo
12-10-2002, 03:54 AM
Originally posted by LoveShack
I have been able to use the header() function to successfully redirect to a post anchor. It involves far more code editing than is supplied here and appears to be the way vb3 is handling this.

There are instances when standardredirect is used for informational purposes, so I elected to only remove specific instances--most notably, newthread, newreply, and search.

If there is an interest, I'll attach instructions here.

Paul

If you're still willing to supply the code, I would be willing to use it. :)

padblaz
07-01-2003, 05:28 AM
nice thing, working well
thx ;)