vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How hard would this be? (https://vborg.vbsupport.ru/showthread.php?t=70103)

Radon3k 10-02-2004 06:06 PM

How hard would this be?
 
I'm developing a site and the original plan was to have a registration system for the main site that allows users to post reviews. I'm also going to be using vBulletin for the forum. This has me now thinking that I probably should just use the forum registration system for the main site. I don't want a portal and in fact I don't want the main site to have statistics from the forum on it (such as latests posts, etc). The only thing I want to integrate would be the registration system so tha the users can log in and use the main site. I may also integrate a number of users online (not a who's online, though). How hard would this be to do? Thanks. :)

Velocd 10-02-2004 06:38 PM

This would be very easy to do.

Just ensure to require_once 'path/to/forum/global.php'; on every PHP file outside of the forums directory, so to tie it in with the forum system.

Radon3k 10-02-2004 07:09 PM

Quote:

Originally Posted by Velocd
This would be very easy to do.

Just ensure to require_once 'path/to/forum/global.php'; on every PHP file outside of the forums directory, so to tie it in with the forum system.

Thanks but that royally screws up my main site, especially if the board is turned off. Is there an easier way to get the login code only? I want to be able to put a small phrase that tells them they aren't logged in. Thanks. :)

Radon3k 10-03-2004 04:30 AM

Quote:

Originally Posted by Radon3k
Thanks but that royally screws up my main site, especially if the board is turned off. Is there an easier way to get the login code only? I want to be able to put a small phrase that tells them they aren't logged in. Thanks. :)

Can anybody assist with this, please? Thanks! :)

Brad 10-03-2004 04:40 AM

If you want to base login's on your main site soley on cookies it is easier to do. If you want to mimic vB's way exactly your are going to have to get creative with your main site. Your going to have to deal with the session hash for instance.

Radon3k 10-03-2004 04:44 AM

Quote:

Originally Posted by Brad.loo
If you want to base login's on your main site soley on cookies it is easier to do. If you want to mimic vB's way exactly your are going to have to get creative with your main site. Your going to have to deal with the session hash for instance.

Well I don't want them to register on the main site, I can provide a simple link to that. I just want them to be logged in before they can post a review. In fact, they don't even have to login on the main site, they can login on the forums but when they visit the main site, I want the main site to be able to tell whether or not they are logged in, and if they are, then allow them to do whatever they need, and if not, then post a link to the forums. I hope that makes sense. If so, how hard would it be to do this? Thanks. :)

SteveMoody 10-03-2004 11:58 AM

Take a look at the HTML for the login box on the VB page. You should be able to duplicate this code on your page and it will allow you to log in using vb.

nexialys 10-03-2004 12:11 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=61112" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=61112</a>

Radon3k 10-03-2004 08:08 PM

Quote:

Originally Posted by nexialys

Thanks nexialys, but the problem with that link is that it uses global.php and that interacts with the forums which means if the forums are turned off then it shows that huge vBulletin box on main page and I don't want that.

@SteveMoody: I'll take a look at it and see what I can find. Thanks! :)

Radon3k 10-03-2004 09:23 PM

Perhaps I'm not looking in the right place, but where would I find the HTML login code for vBulletin? I've looked in index.php and the FORUMHOME template and didn't find it in either. Am I just not looking in the right place? Thanks. :)

Radon3k 10-04-2004 04:19 AM

Quote:

Originally Posted by Radon3k
Perhaps I'm not looking in the right place, but where would I find the HTML login code for vBulletin? I've looked in index.php and the FORUMHOME template and didn't find it in either. Am I just not looking in the right place? Thanks. :)

Any suggestions?

Dean C 10-04-2004 06:22 AM

Please don't keep bumping the thread :)

Logikos 10-04-2004 06:31 AM

Quote:

Originally Posted by Radon3k
Any suggestions?

Come on man, you can't find the login code? Turn HTML comments on and check like that, or perhaps see the login is in the Navbar template. Heres the code from the Navbar template:

HTML Code:

                <!-- login form -->
                <form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)">
                <script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                <tr>
                        <td class="smallfont">$vbphrase[username]</td>
                        <td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
                        <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td>
                </tr>
                <tr>
                        <td class="smallfont">$vbphrase[password]</td>
                        <td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td>
                        <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
                </tr>
                </table>
                <input type="hidden" name="s" value="$session[sessionhash]" />
                <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" />
                </form>
                <!-- / login form -->


Radon3k 10-04-2004 06:50 AM

Well the problem with that is that after it logs me in, it brings me back to the same page yet asks me to login again showing that I'm in fact, not logged in. This is my problem, maybe I should have been more clear. Any suggestions on that? Thanks. :)

Logikos 10-04-2004 08:06 AM

Adding the login HTML to your non vb page will do that, i would add the globals.php includes and code from there. But thats me.

Radon3k 10-04-2004 08:09 AM

Quote:

Originally Posted by Live Wire
Adding the login HTML to your non vb page will do that, i would add the globals.php includes and code from there. But thats me.

I understand, however when I log in, it brings me back to the login page. This is what I'm trying to fix. The code works and it logs me in, but like I said, it brings me back to the login page instead of saying "Welcome, $username!".

Radon3k 10-06-2004 07:51 PM

Quote:

Originally Posted by Radon3k
I understand, however when I log in, it brings me back to the login page. This is what I'm trying to fix. The code works and it logs me in, but like I said, it brings me back to the login page instead of saying "Welcome, $username!".

I'm still having issues with this so any help would be appreciated. Thanks. :)

Radon3k 10-11-2004 09:31 AM

Quote:

Originally Posted by Radon3k
I'm still having issues with this so any help would be appreciated. Thanks. :)

After playing around a bit with the code I still have yet to be able to figure this out. I would appreciate any and all help. Thanks. :)

AN-net 10-11-2004 12:31 PM

this is just an idea couldnt you edit the area where vbulletin shows the closed message and make it exclude certain files, since the files should be following standard setup you can use THIS_SCRIPT and if THIS_SCRIPT is in a certain array then the closed message wont appear.....

AN-net 10-11-2004 12:54 PM

got this working as long as THIS_SCRIPT is defined you can choose which files receive the closed error message and which dont, so say you had a poetry site but still wanted users to be to view poetry well if the forum was closed before selective file was added they would receive the error message also but now they can view the poetry with just a prompt(the same as the admin gets) at the bottom and top of the screen saying "Alert: The forums are currently turned off!". so basically you can choose what sections not to close off on your site when the forums are closed:)

i think ill release this as a hack:)

AN-net 10-11-2004 03:41 PM

i have release it here: https://vborg.vbsupport.ru/showthread.php?t=70444

Radon3k 10-14-2004 05:57 AM

Quote:

Originally Posted by AN-net

Maybe I don't understand what your script does but basically I just want basic code to log someone in from any non-vBulletin page so that they can perform the necessary tasks. I'm sorry if I don't understand what you're hack does.

AN-net 10-14-2004 10:05 AM

Quote:

Originally Posted by Radon3k
Maybe I don't understand what your script does but basically I just want basic code to log someone in from any non-vBulletin page so that they can perform the necessary tasks. I'm sorry if I don't understand what you're hack does.

well you said you didnt want it to be closed when the forum is closed, so basically this will allow you to use require_once('./global.php'); without having to worry about closing that file/section when the forums are closed.

Logikos 10-14-2004 11:26 AM

Quote:

Originally Posted by Radon3k
Maybe I don't understand what your script does but basically I just want basic code to log someone in from any non-vBulletin page so that they can perform the necessary tasks. I'm sorry if I don't understand what you're hack does.

Basicly, you still have to figure out how to add the login code, but once you do figure that out. You can add AN-net's hack, and that section of the site will remain viewable to vistors even when the forums are turned off.

Radon3k 10-18-2004 05:00 AM

Quote:

Originally Posted by Live Wire
Basicly, you still have to figure out how to add the login code, but once you do figure that out. You can add AN-net's hack, and that section of the site will remain viewable to vistors even when the forums are turned off.

Right and that's what I need help with, the login code without using global.php.


All times are GMT. The time now is 12:55 AM.

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.01181 seconds
  • Memory Usage 1,809KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete