Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2010, 09:53 PM
Force011 Force011 is offline
 
Join Date: Jan 2009
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vBulletin Login Page on Site?

Heres what I am trying to do, I have a site and a forum. I put a login page on the site for the forum. However when I login, I get sent to the forum page and it says login successful, then afterwards I get sent back to same login page on my site. Instead of it being sent to the login page on my site, I want the login page to display Welcome $username, and give them links to update their profile, change password, etc.

I am using the login code here - http://www.vbulletin.com/forum/showt...ng-In&p=720724, later in the thread a user describes a similar problem.
Reply With Quote
  #2  
Old 08-29-2010, 11:01 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to make sure I follow - you want it to go to the forum home page after logging in, just like you had logged in normally?

I'm not sure, but try this: it looks like if you're coming from somewhere "unusual" then it uses $_REQUEST['url'] as the place to redirect, so on the form submission url (which I guess ends in login.php?do=login now), try adding "&url=" and then the url you want it to go to.
Reply With Quote
  #3  
Old 08-31-2010, 03:31 PM
Force011 Force011 is offline
 
Join Date: Jan 2009
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heres an example on my site below.

Code:
http://www.limitedition.org
On the side it has a login, I can login fine it takes me to vBulletin and says thanks for logging in, problem is it redirects to the main page and still asks me to login again, instead of it asking me to login it should say Welcome $username (or this case my username).
Reply With Quote
  #4  
Old 09-01-2010, 12:39 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I'm not doing too well lately - not only did I misundertsand what you wanted but I obviously didn't fully understand the code. But I did try putting this html file on my local machine:

Code:
<html><body>
<form action="http://*************/forum/login.php" method="post" onSubmit="md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)">
		      <p class="content">
		        <script type="text/javascript" src="http://losttv-forum.com/forum/clientscript/vbulletin_md5.js"></script>
		        Username: <br><input type="text" class="content" name="vb_login_username" id="navbar_username" size="30" accesskey="u" tabindex="1" value="Username" onFocus="if (this.value == 'Username') this.value = '';" /><br>
		        Password: <br><input type="password" class="content" name="vb_login_password" size="30" accesskey="p" tabindex="2" /><br>
		        <input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />Remember Me</label><br />
		        <input type="submit" class="button" value="Login" tabindex="4" title="" accesskey="s" />
		        <input type="hidden" name="s" value="" />
		        <input type="hidden" name="do" value="login" />
		        <input type="hidden" name="forceredirect" value="1" />
		        <input type="hidden" name="vb_login_md5password" />
		        <input type="hidden" name="vb_login_md5password_utf" />
                        <input type="hidden" name="url" value="http://*************/forum" />
		      </form>
</body></html>
It's just your login form with a couple changes (and I replace my site iwth *'s). When I copied your code it logged me in but sent me back to the above login page. So I added the "url" hidden field with my site's home page and then it sent me there with the "Welcome $username" message. I have no idea if this will help you at all - maybe it's just saying that it worked for me but it still doesn't work for you.

Anyone else?
Reply With Quote
  #5  
Old 09-01-2010, 01:55 AM
Force011 Force011 is offline
 
Join Date: Jan 2009
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heres a copy of that form in its full.

Code:
<form action="forums/login.php" method="post" onSubmit="md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)">
		      <p class="content">
		        <script type="text/javascript" src="forums/clientscript/vbulletin_md5.js"></script>
		        Username: <br><input type="text" class="content" name="vb_login_username" id="navbar_username" size="30" accesskey="u" tabindex="1" value="Username" onFocus="if (this.value == 'Username') this.value = '';" /><br>
		        Password: <br><input type="password" class="content" name="vb_login_password" size="30" accesskey="p" tabindex="2" /><br>
		        <input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />Remember Me</label><br />
		        <input type="submit" class="button" value="Login" tabindex="4" title="" accesskey="s" />
		        <input type="hidden" name="s" value="" />
		        <input type="hidden" name="do" value="login" />
		        <input type="hidden" name="forceredirect" value="1" />			
		        <input type="hidden" name="vb_login_md5password" />
		        <input type="hidden" name="vb_login_md5password_utf" />
		        <br>
		        <a href="http://forums.limitedition.org/login.php?do=lostpw" class="link">Forgot your password?</a><br>
		      Not a registered member? <a href="http://forums.limitedition.org/register.php" class="link">Register Now</a>
		      </form>
The problem is, that even if it does login, if you go back to the main site, it still asks you to login, I am basically just trying to change that login form into Welcome $username after login, on the main page, and not just on the forums.
Reply With Quote
  #6  
Old 09-01-2010, 05:16 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, now I've got you - sorry I'm so slow. I guess what threw me is that I assumed your main page is a static HTML page so of course it's not going to change (but probably that's the whole point of your question).

Anyone else?
Reply With Quote
  #7  
Old 09-01-2010, 12:26 PM
Force011 Force011 is offline
 
Join Date: Jan 2009
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Oh, now I've got you - sorry I'm so slow. I guess what threw me is that I assumed your main page is a static HTML page so of course it's not going to change (but probably that's the whole point of your question).

Anyone else?
Nah, I use a lot of PHP, but I just don't know how to make this work with my site.
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 01:00 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.04154 seconds
  • Memory Usage 2,226KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete