![]() |
VB Login on a Non-VB Page vB3 RC3
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): PHP Code:
PHP Code:
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. |
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.
PHP Code:
|
Quote:
You will need to have fun in there to work out how to get to your vars. |
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.
|
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?
|
Using <? just tells the server that PHP code is coming. It's still PHP, which is a server side thing. HTML is user side.
|
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.
|
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. |
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'); |
Quote:
I would also like to know how to do this but mine is on the same server |
All times are GMT. The time now is 07:45 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|