Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by badmeetsevil- badmeetsevil- is offline
Developer Last Online: Jul 2002 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-17-2001 Last Update: Never Installs: 12
 
No support by the author.

Here's a little mini-addon to a very popular hack by RobAC. You can view the original hack here.

When Rob released this hack, it would log you in, and bring you to the Forums home. This was very fustrating to some, who put the logon on their mainpage, and it'd bring them to the Forums Home, and not back to where they logged in.

I decided to do it myself, and found it pretty simple.

What this little addon will do, is when you login, it'll bring you back to the page you were previously on when you logged on. So, lets say you had Rob's login code on your mainpage, and you logged in, it'd bring you back to your mainpage saying "Welcome Back, Username". This will work with any page since it uses "$HTTP_REFERER". "$HTTP_REFERER" is just a little code that tracks the last page you've been on.

To install this, you'll need to change one line in your member.php.

Find
Code:
eval("standardredirect(\"".gettemplate("redirect_login")."\",\"index.php?s=$session[dbsessionhash]\");");
and replace it with
Code:
eval("standardredirect(\"".gettemplate("redirect_login")."\",\"$HTTP_REFERER\");");
Once you do this, this should bring you back to the page you were on while logging in.

Thanks Rob for the great hack!

Does this work for you?

Show Your Support

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

Comments
  #2  
Old 10-18-2001, 03:36 AM
drumsy's Avatar
drumsy drumsy is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I'll try it!

Btw, both these hacks would work on say, a block on PHPnuke?
Reply With Quote
  #3  
Old 10-18-2001, 02:08 PM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem. I'm glad it's helped out. I apologize for not updating it with more features, but I just haven't had the time. I've got a few major projects I'm trying to roll out on my own site and haven't been here in the support forums much.

Looks like a cool feature!
Reply With Quote
  #4  
Old 10-18-2001, 03:07 PM
certify's Avatar
certify certify is offline
 
Join Date: Nov 2001
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!

I'm looking for this for quite sometime now.
Reply With Quote
  #5  
Old 10-18-2001, 06:25 PM
badmeetsevil-'s Avatar
badmeetsevil- badmeetsevil- is offline
 
Join Date: Oct 2001
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hehe. No problem. Rob did all the work, I just edited a very little part of it.
Reply With Quote
  #6  
Old 10-24-2001, 11:57 AM
certify's Avatar
certify certify is offline
 
Join Date: Nov 2001
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

badmeetsevil-

Now that we have the login return to the referrer page can you do one for logout too?

It would be a complete package then won't you think instead of going to the forum cookies clear page which is irritating.
Reply With Quote
  #7  
Old 10-24-2001, 07:48 PM
badmeetsevil-'s Avatar
badmeetsevil- badmeetsevil- is offline
 
Join Date: Oct 2001
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you go certify.

The following code will return you to your previous page when you log out of your Forums.

Open the template "error_cookieclear" and change this
Code:
All cookies cleared! Click <a href="index.php?s=$session[sessionhash]">here</a> to return to the forums index.
to this

Code:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="1;URL=$HTTP_REFERER">
All cookies cleared! You are being returned to your previous page.
This should work. Tell me if it doesn't.
Reply With Quote
  #8  
Old 10-25-2001, 01:05 PM
certify's Avatar
certify certify is offline
 
Join Date: Nov 2001
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I'll try it now!
Reply With Quote
  #9  
Old 10-25-2001, 06:58 PM
badmeetsevil-'s Avatar
badmeetsevil- badmeetsevil- is offline
 
Join Date: Oct 2001
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it working correctly? I only tested it a bit on my forums, but it seems to be working fine.
Reply With Quote
  #10  
Old 10-26-2001, 06:46 AM
certify's Avatar
certify certify is offline
 
Join Date: Nov 2001
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works!!!
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 09:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05730 seconds
  • Memory Usage 2,292KB
  • 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
  • (4)bbcode_code
  • (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
  • (2)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