vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Fetch Username (logged in) and other data on Non-VB Pages (https://vborg.vbsupport.ru/showthread.php?t=184603)

Gursimran 07-07-2008 10:29 AM

Fetch Username (logged in) and other data on Non-VB Pages
 
Hello, I recently bought vbulletin and I am currently testing it on my localhost. The board on which I am going to install it is phpbb3.... which is installed in /forum folder. I have wordpress installed on my homepage. In phpbb3 it was easy to display login in the home page... It was a login forum when user is not logged in.....and after loggin in.... It displayed Welcome "Username" | Logout, user avatar etc etc.

I am currently using this code to display login. but it does not fetch the username and any other information after logging in.

Code:

<!-- login form -->
        <form action="/vb/login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
        <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=364"></script>
        <table cellpadding="0" cellspacing="3" border="0">
        <tr>
            <td class="smallfont"><label for="navbar_username">User Name</label></td>
            <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
            <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />Remember Me?</label></td>
        </tr>
        <tr>
            <td class="smallfont"><label for="navbar_password">Password</label></td>
            <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
            <td><input type="submit" class="button" value="Log in" tabindex="104" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" /></td>
        </tr>
        </table>
        <input type="hidden" name="s" value="" />
        <input type="hidden" name="do" value="login" />       
        <input type="hidden" name="vb_login_md5password" />
        <input type="hidden" name="vb_login_md5password_utf" />
        </form>
        <!-- / login form -->

I am having big trouble to find that piece of php code to do that in vbulletin.

Please help me!:erm:

I am using vBulletin 3.7.2!

MoT3rror 07-07-2008 08:39 PM

If you have vBulletin global file included you can use the $vbulletin->userinfo array.

Gursimran 07-08-2008 02:39 AM

Yes, I have that file included, but how to use to..... i dont know much php...

Gursimran 07-09-2008 05:12 AM

Can anybody please help me out? :(

samiro 07-12-2008 11:22 PM

anybody...
i also need this

i want to put the login details in all the pages in my site... (not a forum pages)

Commander-X 12-05-2008 02:54 PM

I've been following this problem from Gursimran way back on the vbulletin forums and nobody seems to have the answer.

samiro 12-10-2008 08:27 PM

soo bad !

Gursimran 12-11-2008 02:41 AM

Yes very bad....

somebody help us out...

samiro 12-11-2008 04:10 AM

i'll try to help myself today... if it will work i will upload it here !!!

bye 4 now

samiro 04-28-2009 10:59 AM

someone ?

Lynne 04-28-2009 02:12 PM

This should help - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.

samiro 09-21-2009 05:45 AM

hope this option will be built in un the new VB !!! :)
bye 4 now

Rolll 06-02-2010 09:44 PM

Quote:

Originally Posted by Gursimran (Post 1568967)
Hello, I recently bought vbulletin and I am currently testing it on my localhost. The board on which I am going to install it is phpbb3.... which is installed in /forum folder. I have wordpress installed on my homepage. In phpbb3 it was easy to display login in the home page... It was a login forum when user is not logged in.....and after loggin in.... It displayed Welcome "Username" | Logout, user avatar etc etc.

I am currently using this code to display login. but it does not fetch the username and any other information after logging in.

Code:

<!-- login form -->
        <form action="/vb/login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
        <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=364"></script>
        <table cellpadding="0" cellspacing="3" border="0">
        <tr>
            <td class="smallfont"><label for="navbar_username">User Name</label></td>
            <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
            <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />Remember Me?</label></td>
        </tr>
        <tr>
            <td class="smallfont"><label for="navbar_password">Password</label></td>
            <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
            <td><input type="submit" class="button" value="Log in" tabindex="104" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" /></td>
        </tr>
        </table>
        <input type="hidden" name="s" value="" />
        <input type="hidden" name="do" value="login" />       
        <input type="hidden" name="vb_login_md5password" />
        <input type="hidden" name="vb_login_md5password_utf" />
        </form>
        <!-- / login form -->


I've the SAME problem, but I am using vBulletin 3.8.5!

Any one can help me?

Thanks

Gursimran 06-03-2010 01:23 PM

Quote:

Originally Posted by Rolll (Post 2047323)
I've the SAME problem, but I am using vBulletin 3.8.5!

Any one can help me?

Thanks

almost 2 years passed but still no mod on this

Marco van Herwaarden 06-04-2010 03:18 AM

This has been discussed many times and many solutions have been provided. Please start by reading information in our Article depository on this.


All times are GMT. The time now is 05:49 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.01260 seconds
  • Memory Usage 1,753KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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