Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
VB Login on a Non-VB Page vB3 RC3 Details »
VB Login on a Non-VB Page vB3 RC3
Mod Version: 1.00, by mcahill (Member) mcahill is offline
Developer Last Online: Dec 2012 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.0 Rating: (2 votes - 5.00 average) Installs: 74
Released: 03 Feb 2004 Last Update: Never Downloads: 17
Not Supported  

This is a simple modification to do, and adds a lot of value to your homepage.

Notes:

1. This script can occassionally have conflicts with other javascripts. Test before you deploy.
2. If you use and include to put the file on your page, be sure that the chdir and the require for global.php is in the head of the main document.
3. It is assumed that you are using a php page, and that you have already got connectivity with your database.


The code:

At the top of the document, before the <html> or <head> tags (edit to provide the path for your particular installation):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Wherever you want your login:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Troubleshooting:

Before requesting support, please check the following:

1. Make sure you have the path to your forum in the chdir. If you haven't done this, you will get a "can't include" error.
2. Make sure you have the chdir in the main document. If it isn't you will get a "can't modify header" error.
3. If those don't resolve the issue, try putting the login in a separate file, with no other code. If it works there, then you will know that you have a conflict with one of the scripts on the page you are trying to add the login to. I can't help you if you've got a conflict with another script.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 03 Feb 2004, 14:18
vbmechanic vbmechanic is offline
 
Join Date: Jan 2004
One suggestion, if you chdir at the top of the program to include something, you should also chdir back to the original location so you don't disrupt any relative includes further down the code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

cheers!
Reply With Quote
  #3  
Old 03 Feb 2004, 15:11
buro9 buro9 is offline
 
Join Date: Feb 2002
Originally Posted by vbmechanic
One suggestion, if you chdir at the top of the program to include something, you should also chdir back to the original location so you don't disrupt any relative includes further down the code.
A further note on this is that vBulletin's XSS measures are now kicking arse... and if you were going to use the above within another PHP script and expected some inputs or other vars that you can't get hold of... it's because \includes\init.php

You will need to have fun in there to work out how to get to your vars.
Reply With Quote
  #4  
Old 04 Feb 2004, 11:50
VeoMorphine VeoMorphine is offline
 
Join Date: Nov 2002
hmmmmmm...... Just a sugestion. Insted of writing out all the form code i think vbulletin has a make_login() or somthing like that function. But they way you did it offers more flex to it so, either way has its ups and downs.
Reply With Quote
  #5  
Old 05 Feb 2004, 03:17
apokphp apokphp is offline
 
Join Date: Nov 2002
What about if the page is html. I know your hack is for .php, but is it possible to use on html pages? Or should the html page be converted to .php? And if so, isn't that done just by adding the <?php tag?
Reply With Quote
  #6  
Old 05 Feb 2004, 03:45
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Using <? just tells the server that PHP code is coming. It's still PHP, which is a server side thing. HTML is user side.
Reply With Quote
  #7  
Old 05 Feb 2004, 04:48
apokphp apokphp is offline
 
Join Date: Nov 2002
My server has php. My index is html. I use vb as a forum. I'd like to use some form of vb logon on the front page which is not related to vb at all.
Reply With Quote
  #8  
Old 05 Feb 2004, 22:18
mcahill mcahill is offline
 
Join Date: Apr 2002
The page needs to be php. That means it has to have a .php extension. If you're running vB on the same server, you have php installed.

If the page has an html extension, it will not be processed by the server.
Reply With Quote
  #9  
Old 05 Feb 2004, 23:20
Oxcide Oxcide is offline
 
Join Date: Feb 2004
Hehe, Apok has already seen this, to bad he never told me.

Anyway.

What if I want to use this on a remote server/site.

Should I include the remote database information above the chdir? And then use a URL to those files on the remote server? Or change it to connect to the server, and use the absolute path to the files?

Or is it as simple as doing

require('http://www.pathtoremoteserver.com/forums/global.php');

Last edited by Oxcide; 05 Feb 2004 at 23:31.
Reply With Quote
  #10  
Old 07 Feb 2004, 11:37
mcncyo's Avatar
mcncyo mcncyo is offline
 
Join Date: Oct 2001
Real name: Chris
Originally Posted by Oxcide
Hehe, Apok has already seen this, to bad he never told me.

Anyway.

What if I want to use this on a remote server/site.

Should I include the remote database information above the chdir? And then use a URL to those files on the remote server? Or change it to connect to the server, and use the absolute path to the files?

Or is it as simple as doing

require('http://www.pathtoremoteserver.com/forums/global.php');


I would also like to know how to do this but mine is on the same server
Reply With Quote
  #11  
Old 07 Feb 2004, 12:34
-animal- -animal- is offline
 
Join Date: Oct 2003
the code works great but when i enter my login details, if the page changes to the "thanks for logging in" page and then back to the page that has the login forms. Is there anyway to say get it to not go to the thanks for loggin in page and then rather than just displaying the login boxed display the users avatar who just logged in?

thanks
Reply With Quote
  #12  
Old 09 Feb 2004, 13:26
mcahill mcahill is offline
 
Join Date: Apr 2002
Not showing thankyou page...

Set the value in the form for Forceredirect to 0 and it will not show the thank you for logging in. To get the avatar displayed, you'd need to take a look at what is available in bbuserinfo[] or figure out how to add the avatar stuff from you postbit template.

Last edited by mcahill; 09 Feb 2004 at 13:38.
Reply With Quote
  #13  
Old 11 Feb 2004, 15:11
Blue Moose Aaron's Avatar
Blue Moose Aaron Blue Moose Aaron is offline
 
Join Date: Sep 2002
Real name: Aaron
Is it at all possible to have the users avatar show up?
__________________
www.kryptonian.com/forum/
Reply With Quote
  #14  
Old 12 Feb 2004, 02:56
Osterling Osterling is offline
 
Join Date: Jan 2004
i did the direction and i am getting this error message:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/exasko/public_html/forum_tester/test.php on line 13

line 13 is..

if ($bbuserinfo['userid']!=0) {



got any ideas what's wrong
Reply With Quote
  #15  
Old 12 Feb 2004, 18:32
killervette killervette is offline
 
Join Date: Nov 2003
redirect doesnt work for me.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 01:56.

Layout Options | Width: Wide Color: