Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
After an Action Redirecting Details »»
After an Action Redirecting
Version: , by alexwriting alexwriting is offline
Developer Last Online: Sep 2002 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-15-2002 Last Update: Never Installs: 0
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-16-2002, 12:46 AM
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Location: Medina, OH
Posts: 785
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You want to be automatically logged out after subscribing to a thread?
Reply With Quote
  #3  
Old 04-16-2002, 01:09 AM
alexwriting alexwriting is offline
 
Join Date: Feb 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 04-16-2002, 03:15 PM
Mike Sullivan Mike Sullivan is offline
 
Join Date: Feb 2002
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]\");");
Reply With Quote
  #5  
Old 04-16-2002, 07:03 PM
alexwriting alexwriting is offline
 
Join Date: Feb 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 location

Many, many thanks,

Alex
Reply With Quote
  #6  
Old 04-16-2002, 09:37 PM
Mike Sullivan Mike Sullivan is offline
 
Join Date: Feb 2002
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 04-16-2002, 09:56 PM
alexwriting alexwriting is offline
 
Join Date: Feb 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 04-16-2002, 10:03 PM
Mike Sullivan Mike Sullivan is offline
 
Join Date: Feb 2002
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 04-17-2002, 05:00 PM
alexwriting alexwriting is offline
 
Join Date: Feb 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 04-17-2002, 05:55 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04354 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete