The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
In an attempt to integrate my VB forums with my site, I've been searching high and low to be able to utilize the login system and gain access to the VB session.
I found this thread: https://vborg.vbsupport.ru/showthrea...2&page=1&pp=15 However it seems to be broken for 3.0.3. My self and other users get the following errors when following the instructions as described.... Code:
Fatal error: Call to a member function on a non-object in /home/xxxxx/public_html/vbtest/includes/functions.php on line 922 Code:
Fatal error: Call to a member function on a non-object in /home/xxxx/public_html/vbtest/includes/sessions.php on line 72 I don't want to use any kind of VB CMS system. I'm trying to bring my forums into my site, not my site into my forums. |
#2
|
|||
|
|||
![]() Quote:
|
#3
|
||||
|
||||
![]()
Ummm yes if this were possible it would be sick. I am over setting my own cookies in login.php
|
#4
|
|||
|
|||
![]()
Count me in!
|
#5
|
|||
|
|||
![]()
below is an overview of how I have gotten this to work myself. i tried to be as detailed as possible. if you have a 2 column site design, and your side column is on the right, this should work, if its on the left, some things from footer will need to go to header. read the code examples and it will make sense.
in header.php and footer.php, you will need to define your site layout, ive only provided up to the body tag. FIRST, NON-VB PAGES - Login box these pages should not be in your forum (vb) directory (would be messy) The files you want to view (ie. index.php, about.php along those lines) should be set up as: <? include("header.php"); ?> Page content here <? include("footer.php"); ?> -------------------------------------------------- header.php: <? ini_set ('display_errors', '1'); //change at will error_reporting(E_ALL); //change at will chdir("/local/pathto/yoursite.com/board/"); require('./global.php'); chdir("../"); //require any function files your created here ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> </head> <body> (include the div/table elements up until the main content section) -------------------------------------------------- footer.php: <? if ($bbuserinfo['userid']!=0) { $username=$bbuserinfo['username']; $loginbox = " <div>$username</div> <div> <a href='/board/profile.php?do=editprofile'>Edit Profile </a> | <a href='/board/login.php?do=logout&u=" . $bbuserinfo['userid'] . "'> Log Out</a></div> "; } else { $loginbox = " <form action='/board/login.php' name='all_login' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5pa ssword)'> <table align='center' cellpadding='0' cellspacing='0' border='0'><tr> <td>User:</td><td><input type='text' class='button' name='vb_login_username' id='navbar_username' style='width:115px' accesskey='u' tabindex='1' value=''/></td> </tr><tr> <td>Pass:</td><td><input type='password' class='button' name='vb_login_password' style='width:115px' accesskey='p' tabindex='2' /></td> </tr></table> <input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /> Remember Me<br /> <input name='submit' type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' /> <input type='hidden' name='do' value='login' /> <input type='hidden' name='forceredirect' value='1' /> <input type='hidden' name='vb_login_md5password' /> </form> "; } ?> (include the div/table elements that come after the main content section) (in the column section of your div/table put the following line: ) <? echo $loginbox; ?> </body> </html> ----------------------------------------------------- SECOND, VB PAGES - Login Box in phpinclude_start (through style manager) include only the PHP code from the footer.php file above (no html), no need for the <? ?> tags either. in your footer template put: $loginbox whereever you want the login box/welcome |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|