View Full Version : Remove Posting Redirection (like vB3)
Hack: Remove posting redirection.
By: Anime-loo
Current Version:
Pre Release: 1.2pr 1
Stable: 1.1
What dose this do?
This hack will removed the redirection pages that apper after posting a reply/thread. Insted of seeing a "Thanks for posting, we are now sending you to..." message before a user is sent to their post, they are sent directly to it. On 56k ive noticed a big improvement in speed.
Latest news:
12 - 26 - 2003:
Version 1.2 pre release 1 released, this version answers the request(s) of many that are using this hack. That is no redirection screens after editing a post or deleting it.
If you are using 1.1 you can upgrade to 1.2pr 1 via the second attachment in this post. At this time there is no install file for 1.2 pr 1, install 1.1 then upgrade.
Modification info:
5 (8 for 1.2 pr 1) file edits
(files: newreply.php, newthread.php, poll.php, editpost.php (1.2 pr 1 only))
1 new template
Issues with other hacks: READ BEFORE INSTALLING!!
Xenon's Prevent Double Posting (https://vborg.vbsupport.ru/showthread.php?s=&threadid=40145) hack --
One extra code edit to newreply.php is required if you have this hack installed. [click here for the fix] (https://vborg.vbsupport.ru/showthread.php?postid=387224#post387224)
Version History:
version 1.2 pr 1 update released!
-- Got rid of redirection after editing/deleting posts
(Un-tested, upgrade at own risk!!)
version 1.1 released! (Stable)
-- got rid of redirection page after posting poll
-- added custom template for redirection page if poll option is click on newthread/reply
version 1.0 released
-- Frist code release to public
alkatraz
04-25-2003, 03:36 AM
will this affect the way vbulletin performs? Why would the developers add the posting redirection if it wasn't required somehow? plz let me know cuz i'd like to install this
romanticyao
04-25-2003, 03:37 AM
Today at 11:36 PM alkatraz said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=386760#post386760)
will this affect the way vbulletin performs? Why would the developers add the posting redirection if it wasn't required somehow? plz let me know cuz i'd like to install this
same question...
Why would the developers add the posting redirection if it wasn't required somehow?
Mostly to let the user know whats going on, and to pass some important info to the url.
I found a way of getting the url without the extra pageload (redirection).
I have it running on my board and the members are loving it. The only change im seeing in performance is a big speed up on the users end when it comes to posting. ;) :)
Koutaru
04-25-2003, 03:48 AM
:) glad to see you got this working. I think I'm going to check it out
Kurayami
04-25-2003, 06:07 AM
Interesting... I'm definitely giving this a try! *Whaps Install* :)
Erwin
04-25-2003, 06:28 AM
I use a different version, but nice work getting the URL variable to be passed. :)
vB3 doesn't have redirection pages either. ;) It's not needed. I haven't had them for over a year with no problems.
Thanks Erwin, ive been trying to do this for awhile and never found a 'working' hack for it. If you dont mind can you pm me a link to your forums, i know its a private url you dont give out but ive been wanting to see it for ages cause it sounds like youve done alot of work there :).
Areku
04-25-2003, 07:24 AM
Lovely!!!!!
/me licks install!!
Areku
04-25-2003, 07:29 AM
Uh oh
I think I never hacked the redirection stuff, but I only got these in vb 2.2.0:
// redirect
if ($prevpost[visible]) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
AND
// redirect
if ($visible && !$returntowhere) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
if ($returntowhere=="forumhome") {
$goto="index.php?s=$session[sessionhash]";
} elseif ($returntowhere=="thread") {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
1st is fine but second does not match...
ideas?
Use this for the second one:
// redirect
if ($visible && !$returntowhere) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid&goto=newpost";
} else {
if ($returntowhere=="forumhome") {
$goto="index.php?s=$session[sessionhash]";
} elseif ($returntowhere=="thread") {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid&goto=newpost";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
}
@header ("Location: $goto")
exit;
Areku
04-25-2003, 08:20 AM
Tu!
Ps. Is it me or u missed a ; after the last header sentence?
Ihsahn
04-25-2003, 08:27 AM
Very nice one ... congratz :)
* Ihsahn clicks Install !
Tony G
04-25-2003, 10:40 AM
Nice mod AL! Might use this one. :)
Zelda-King
04-25-2003, 10:48 AM
How about applying this to editpost.php too (I know it has different code)?
great looking hack - i have always hated sitting around waiting for slow sites to load up the new page - good job anime-loo :D
jibious
04-25-2003, 01:12 PM
maybe search.php as well? :)
if you can that is. it uses no // redirect code in the file but rather just the templates already created (same with editpost.php). which, i'm guessing, is the reason you didn't do this in the first place. :)
*installed*
PiotrasG
04-25-2003, 04:20 PM
AWESOME hack, works with no problems
Today at 05:20 AM Areku said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=386829#post386829)
Tu!
Ps. Is it me or u missed a ; after the last header sentence?
Yea I did, sorry about that.
Zelda-King: I like to let the user know that the changes have been saved via the redirect, but ill look into it for you.
jibious: ill look into that to. :)
zajako
04-25-2003, 06:52 PM
good work
Hobbes
04-26-2003, 01:11 AM
great hack....only one problem i encountered....
this hack code interferes with Xenon's Prevent Double Posting hack found Here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=40145&highlight=prevent+double+post)
any help? if needed, i'll post my code up:P
Xenon's Prevent Double Posting hack fix:
----------------------------
Open newreply.php
----------------------------
Find:
if ($visible) {
$goto = "showthread.php?s=$session[sessionhash]&postid=" . $lastpost['postid'] . "#post" . $lastpost['postid'];
} else {
$goto = "forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
exit;
}
Replace with:
if ($visible) {
$goto = "showthread.php?s=$session[sessionhash]&goto=lastpost&threadid=$threadid";
} else {
$goto = "forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
@header ("Location: $goto");
exit;
}
// Dev note - if user has double posted he had the last post in thread anyway. Showthread link was changed because of this.
Hobbes
04-26-2003, 05:45 AM
THANKS!!!!!!!!
*dances*....awesome hack *clicks install becuz he forgot earlier* heh *dances*
alkatraz
04-26-2003, 08:57 AM
04-24-03 at 09:36 PM alkatraz said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=386760#post386760)
will this affect the way vbulletin performs? Why would the developers add the posting redirection if it wasn't required somehow? plz let me know cuz i'd like to install this
Glad to hear it works!
Just tried installing it but my code is much different...
your code says to find:
// redirect
if ($prevpost[visible]) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");[/quote]
But My code looks like this:
[code]// redirect
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
if ($closeopen) {
if (!ismoderator($threadinfo[forumid],'canopenclose')) {
$permissions=getpermissions($threadinfo[forumid]);
if (!$permissions[canview] or !$permissions[canopenclose]) {
show_nopermission();
} else {
$firstpostinfo=$DB_site->query_first("SELECT userid FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1");
if ($bbuserinfo[userid]!=$firstpostinfo[userid]) {
show_nopermission();
}
}
}
updateuserforum($threadinfo[forumid]);
if ($threadinfo[open]) {
$threadinfo[open]=0;
$action='closed';
} else {
$threadinfo[open]=1;
$action='opened';
}
$threadinfo[notes]="Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
$DB_site->query("UPDATE thread SET open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'");
eval("standardredirect(\"".gettemplate("redirect_openclose")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
I haven't done any mods that I can think of that would change the code in this area..?
Looks like you installed the open/close checkbox option for mods and admins.
At any rate the code block you gave me is incomplete so I cant give you a fix. Link me to the hack you have installed (so I can add it to the issues list and make a fix) or give me the compleate block (from // redirect to where redirect_postthanks is evaled) and ill provide you with a fix.
MindTrix
04-26-2003, 02:29 PM
**claps hands** amazing :> I h8 that loading page (cause i got 56k) so sometimes ur starin at it for agessss.
Thank youuuuuuuuuuuuu
**clicks install loadsss of times :p **
gwhooooey
04-26-2003, 08:47 PM
You wouldn't have to edit anything else if you're using quick reply would you?
Nope, the hack works perfectly with the quick reply box.
MetaRidley
04-27-2003, 12:15 AM
I'm having problems, both newreply and newthread are giving parse errors. Maybe it's related to that missing semicolon?
Edit: Figured it out.
Alien
04-27-2003, 01:37 AM
Excellent job, it works perfectly for me! :)
I look forward to your editpost modification!
EvilLS1
04-27-2003, 11:42 AM
Nice hack. Thanks!
MetaRidley
04-27-2003, 02:29 PM
Ok, one problem left. This line is giving me a parse error in newthread.php:
$goto="poll.php?s=$session[sessionhash]&threadid=$threadid&polloptions=".intval($polloptions);
This is from the second edit of newthread. 'Cuse my newb questions, but I need to figure out what I did wrong.
EDIT: I just figured out that it's not that line, but the line below it. I still can't figure it out though...
jibious
04-28-2003, 11:03 AM
well, taking a look at the line below this, you get:
eval("standardredirect(\"".gettemplate("redirect_buildingpoll")."\",\"$goto\");");
so i have to ask, did you add the new template?
redirect_buildingpoll
i'd take the guess that you didn't :)
MetaRidley
04-28-2003, 08:50 PM
I did.
Smoothie
04-30-2003, 04:51 AM
nice.
Smoothie
04-30-2003, 04:52 AM
nice. I had previously used another hack to remove re-directs, but removed it and use this one. I like that you have re-directs where needed, and removed the ones that aren't.
themonarch
04-30-2003, 10:26 AM
Awesome hack! Works just fine on 2.3.0.
Kohhal
04-30-2003, 05:02 PM
Great hack, installed perfectly :D
Austin Dea
04-30-2003, 09:12 PM
When submitting a post through the QRB, I get a little javascript error in my task bar. Then it goes away and works like normal. Any idea where this may be from?
Smoothie
05-02-2003, 12:06 AM
what about removing the re-directs from search?
ImportPassion
05-02-2003, 01:06 AM
I would love to see more pages updated with this, as would all of us I think.
D
04-25-03 at 10:44 PM Anime-loo said this in Post #22 (https://vborg.vbsupport.ru/showthread.php?postid=387224#post387224)
Xenon's Prevent Double Posting hack fix:
----------------------------
Open newreply.php
----------------------------
Find:
if ($visible) {
$goto = "showthread.php?s=$session[sessionhash]&postid=" . $lastpost['postid'] . "#post" . $lastpost['postid'];
} else {
$goto = "forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
exit;
}
Replace with:
if ($visible) {
$goto = "showthread.php?s=$session[sessionhash]&goto=lastpost&threadid=$threadid";
} else {
$goto = "forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
@header ("Location: $goto");
exit;
}
// Dev note - if user has double posted he had the last post in thread anyway. Showthread link was changed because of this.
Everything works find and all, but when I post it doesn't take me to my post, takes me to the first page. I have the double post hack installed and really don't want to uninstall it because of this.
Is there some code to add or something?
Another thing is that it doesn't do it on ome new forums I added..
Seems to only do it every now and then.. any ideas?
sonic3d
05-05-2003, 09:34 PM
this hack is conflicting with the multi-quote hack. if u want to quote a person it will just reply with only the quote. it will not take you to the screen to add ur comments. is there neway to fix this?
l8er
sonic
exTracT
05-06-2003, 08:58 AM
does this hack work with 2.2.8?
Boofo
05-06-2003, 09:11 AM
Yesterday at 05:34 PM sonic3d said this in Post #43 (https://vborg.vbsupport.ru/showthread.php?postid=391923#post391923)
this hack is conflicting with the multi-quote hack. if u want to quote a person it will just reply with only the quote. it will not take you to the screen to add ur comments. is there neway to fix this?
l8er
sonic
Recheck your code. I have the multi-quote hack installed and it runs fine with this hack.
exTracT - I am running it with 2.2.9 so, yes, it will work fine with 2.2.8. ;)
Martin64
05-06-2003, 09:42 AM
Works good, nice job. :)
mymilkexpired
05-06-2003, 07:32 PM
Im liking this hack alot! i have many users who are going to like it :)
Any luck on doing this to the other pieces? Seach, Edit, etc....
sonic3d
05-06-2003, 09:10 PM
Today at 05:11 AM Boofo said this in Post #45 (https://vborg.vbsupport.ru/showthread.php?postid=392123#post392123)
Recheck your code. I have the multi-quote hack installed and it runs fine with this hack.
exTracT - I am running it with 2.2.9 so, yes, it will work fine with 2.2.8. ;)
which one do u have installed?
chens or xiphoid
i will recheck it agian but iam sure that i will get the same results
l8er
sonic
Boofo
05-06-2003, 09:18 PM
They are the same hack. ;)
week9
05-07-2003, 04:58 AM
thanks
OmaniMan
05-13-2003, 04:53 AM
Woow .. Its Great ...
I have just tested on Vb2.3.0 .. and worked great
hope to upgrade it to edit whole files :) ...
Well Done Anime - loo ...
xware
05-13-2003, 06:21 AM
you can easily do this.
open functions.php in editor
find:
$url = str_replace("\"", "", $url);
header ("Location: $url");
eval("dooutput(\"".gettemplate("standardredirect")."\");");
replace with:
$url = str_replace("\"", "", $url);
header ("Location: $url");
// eval("dooutput(\"".gettemplate("standardredirect")."\");");
works well!
05-13-03 at 02:21 AM xware said this in Post #52 (https://vborg.vbsupport.ru/showthread.php?postid=394468#post394468)
you can easily do this.
open functions.php in editor
find:
$url = str_replace("\"", "", $url);
header ("Location: $url");
eval("dooutput(\"".gettemplate("standardredirect")."\");");
replace with:
$url = str_replace("\"", "", $url);
header ("Location: $url");
// eval("dooutput(\"".gettemplate("standardredirect")."\");");
works well!
works great for me too. Thanks.
except I did this instead since header ("Location: $url"); isn't in my functions (2.3.0)
find:
$url = str_replace("\"", "", $url);
eval("dooutput(\"".gettemplate("standardredirect")."\");");
replace with:
$url = str_replace("\"", "", $url);
header ("Location: $url");
// eval("dooutput(\"".gettemplate("standardredirect")."\");");
FleaBag
08-12-2003, 05:32 PM
Just what the doctor ordered - cheers.
stark427
08-14-2003, 10:26 PM
I've just installed it to 2.3.2 with no probs so far :)
"clicks install"
p.s. Not sure what the edit at the function.php is needed for (?) :rolleyes:
MaDCaT75
08-21-2003, 08:59 PM
But what about skipping the "the post has been successfully edited" message? :cry:
Excellent job, it works perfectly for me! :)
I look forward to your editpost modification!
The modifications for editpost.php are now included in this hack, see the frist post for more details.
tiedyetoga
01-16-2004, 10:12 PM
For some reason the it doesn't get rid of the redirect page after you make a new thread. Any suggestions?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.