The Arcive of vBulletin Modifications Site. |
|
After an Action Redirecting Details »»
|
|||||||||||||||||||||||||
Hi Everyone,
After subscribing to a thread or a Forum, it redirects you back. Within the program, what contols that? How would I write it to redirect and log out? I think it has something to do with this code in the member2.php file: eval("standardredirect(\"".gettemplate("redirect_s ubsadd")."\",\"\$url\");"); Thanks, Alex Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You want to be automatically logged out after subscribing to a thread?
|
|
#3
|
|||
|
|||
|
Hi Tubedogg,
Thanks for replying!! Yes, that's right. How to rewrite it so that it subscribes you, but then you come back logged out.All the best, Alex |
|
#4
|
|||
|
|||
|
The $url variable is dynamic -- it varies based on where you last came from.
If you replace the: \$url in that line (yes, include the \), with: member.php?action=logout&s=\$session[sessionhash] it should work. eval("standardredirect(\"".gettemplate("redirect_s ubsadd")."\",\"member.php?acti on=logout&s=\$session[sessionhash]\");"); |
|
#5
|
|||
|
|||
|
Hi Ed,
That's what I wanted But, I think we both overlooked one detail. Because the subscription process includes the .gettemplate("redirect_subsadd") as the second to last step, the logout works great, and the return too, but that .gettemplate("redirect_subsadd") is the returned to location, which then goes to the logout, which then goes to the... and it gets in a loop. How would I write it so it redirects back ?2? places, instead of just to the immediately previous locationMany, many thanks, ![]() Alex |
|
#6
|
|||
|
|||
|
Logging out shouldn't be a redirect, and the template that is used to say you're now logged out -- error_cookieclear -- doesn't have any references to $url, so that shouldn't be happening. Have you hacked logging out so it redirects as well?
|
|
#7
|
|||
|
|||
|
Dr. E,
Of course you were right. :classic: I had. Took that out. Now, it subscribes them, and they finish at the "All cookies cleared. Click here to return to the forums index." What would I need to add to have it redirect them back as the last step? Thanks, ![]() ![]() Alex |
|
#8
|
|||
|
|||
|
Presumably, if you change the subscription redirection to include $url:
eval("standardredirect(\"".gettemplate("redirect_s ubsadd")."\",\"member.php?action=logout&url=\$url& s=\$session[sessionhash]\");"); Then put your $url-dependent logout code back in, it should work. No guarantees though.
|
|
#9
|
|||
|
|||
|
Hey Dr. E,
I had used this one for the logout https://vborg.vbsupport.ru/showthrea...hreadid=24889. That's the only hack I have right now. Everything else is native. Added that back with your new code, but still got subscribe, logout then stop there, no redirect. Tried to rewrite it a few other ways, but came up empty :P Any other way to write it? I can remove that hack if it will help. Thanks, ![]() Alex |
|
#10
|
||||
|
||||
|
You can also stick the code from member.php's logout action in member2.php, and change the redirect to a standarderror. If you need more info let me know.
![]() (and stop with all the smilies, makes the page load slower j/k)
|
![]() |
|
|