Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2004, 10:31 AM
rrottman rrottman is offline
 
Join Date: Jun 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Login outside vB / Protect content

I have been searching at vbulletin.org, vbulletin.nl, vbulletintemplates.com and vulletin.com (which is unfortunately down on both URLs at present). I have seen some posts relating to this issue but none was dealing with exactly what I want to achive. Also I know how to code parts of the solution I am very much interested in your professional opinion as to how to do it best.

I have a website where vB is just a subpart of the overall content. So there are plenty of other non-vB .php pages.

Basically what I want to achieve is, that users outside the board can login without having to use the login form provided by vB. If the have logged in successfully they should not be taken to the forum home index.

I thought of just copying the login.php form but obviously the POST method takes users to the forum index after logging in. That is not what I want to do.

I have written a function which uses global.php and some other includes to get the session ($bbuserinfo) data, so once users have logged in I can user their authentication information to protect content outside vB and do all sorts of things (like personalization, etc.)

The only thing missing to have a complete picture is: How could I create a simple .php page which users can use to submit ther vB username / password, log into the board and exit to any other page outside vB?

Any idea?
Your help, as always, is greatly appreciated.
Reply With Quote
  #2  
Old 01-06-2004, 03:08 PM
[FG]Omega [FG]Omega is offline
 
Join Date: Dec 2003
Location: Vienna
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exactly this is what I'm looking for.
Reply With Quote
  #3  
Old 01-06-2004, 03:09 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

connect to global.php and look at the navbar template for the login code...
Reply With Quote
  #4  
Old 01-06-2004, 03:12 PM
rrottman rrottman is offline
 
Join Date: Jun 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@[FG]Omega:
Thanks for supporting this idea. ;-)
If I get it done, I'll let you know.

@Faranth:
What do you mean with "connect to global.php"? Are you saying that the page outside vB which should hold the login box should include global.php and I should just copy some code from the navbar?

P.S.:
I submitted a feature request to the folks at vb.com to provide an exiturl-feature.
Reply With Quote
  #5  
Old 01-06-2004, 03:15 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

first if we are outside of the forums directory we do this
PHP Code:
// ## Changes Directory so it can accesss vBulletin ##
chdir("/full/path/to/forums/"); 
then
PHP Code:
 // ## Grabs global.php ##
require("./global.php"); 
now you have "connected" to global.php / vBulletin
Reply With Quote
  #6  
Old 01-06-2004, 03:22 PM
rrottman rrottman is offline
 
Join Date: Jun 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.
I know that and I do it already to check whether users are known or unknown outside the board. But thanks for clarifying anyway.

Meanwhile I took a look at the navbar template:

PHP Code:
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password)">
        <
input type="hidden" name="do" value="login" />
        <
input type="hidden" name="forceredirect" value="1" />            <input type="hidden" name="vb_login_md5password" />

... 
And here is the list of issues I have with this:

1. Once the user submits this form the form action forces him to go to login.php which leaves him with the forum index page. But I want the user to get transferred to whatever URL I want outside vB after logging in.

2. What do the undocumented hidden input fields do, forceredirect and vb_login_md5password mean?

Does this clarify my thoughts a bit?
Reply With Quote
  #7  
Old 01-06-2004, 03:44 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i belive vB needs a redirect ONLY in the login to passon some session data.

there hidden to make sure users dont change them

vb_login_md5password is how the users password is stored i belive

might wanna check login.php
Reply With Quote
  #8  
Old 01-06-2004, 05:36 PM
rrottman rrottman is offline
 
Join Date: Jun 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It seems as if nobody has a real solution for it. Maybe I did not explain myself in a good way. I'm not a native English speaker. :-)

I try it again (I also posted this at vb.com as part of another thread in the suggestions forum):

Once again I try to explain what I want to achieve. Maybe it's the easiest way if you quickly describe how to do it as opposed to trying to chase my mistakes. :-)

I want to create a page one.php (not being a part of the vB structure) which allows a currently logged out user to log in. The form fields for username and password could either be in a form inside one.php itself or one.php could contain a link to another page two.php or it could contain a link to a .php file provided as part of the vB system.

If the login is successful I want the user to be forwarded to a page three.php, again, not being part og vB. If the login is not successful, I want the user to end up at four.php.
Reply With Quote
  #9  
Old 01-06-2004, 05:58 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why all the differnt pages?
Reply With Quote
  #10  
Old 01-06-2004, 06:00 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'd have to edited the functions to show where the login redirects too, but this would affect all other pages too. The only way I can think of doing it is to create another functions similar to vBs login code.
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:31 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.04334 seconds
  • Memory Usage 2,256KB
  • Queries Executed 11 (?)
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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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