PDA

View Full Version : VB User To Site


Kayne
10-24-2003, 09:47 PM
Ok, i don't know where to put this, so if it's in the wrong place, sorry.

I have a basic php coded website, however, i would like to use the user group and registration system from my VB to order my site's new user system.

Basically, i need to let unregistered members of the forum view the site, however, i wish members who sign up at the forums to be allowed access to certain other areas, then those who have 10 posts or more to be able to view other pages. It's kind of like a reward scheme which is determined by how active you are on the forums.

I hope someone can help me. Thanks in advance.

Sephiroth 9999
10-28-2003, 03:44 PM
The following doesn't need too much PHP knowledge, providing you know some basic PHP and how to work with MySQL (basic too xP) and variables.

That little file called global.php is very important. Just put in a require command anywhere, usually at the top, of a PHP doc and it'll automatically open up all vB variables and functions to you. From there you can use $bbuserinfo[username] stuff and all the rest.

An easier solution would be to use a hack already released here at vB.org. I'm in a rush at the moment but there's several hacks that allow you to run any webpage via vBulletin; just search around. :)

Kayne
10-28-2003, 06:24 PM
Thanks, thats solved one problem. The second problem now comes in how to stop anyone with less then 10 posts accesing a page, and if my forum is located at http://forum.ffunreal.com how does a page on www.ffunreal.com access all the files without access errors.

assassingod
10-28-2003, 06:34 PM
You would do something like

if($bbuserinfo['posts'] < 10)
{
code here
}

Kayne
10-28-2003, 06:38 PM
so would it look something like

<?PHP if($bbuserinfo['posts'] < 10) ?>

if i were to set it up as a variable.

(I know i'm asking whats already been asked, but how do i create a login panel for the page, do i just have to set the code for the form to go to some area in the vb database?)

assassingod
10-28-2003, 06:42 PM
In your file it would be:

<?php

chdir("forum-path");
require("./global.php");

if($bbuserinfo['posts'] > 10)
{
stuff for people with more than 10 posts
}
else
{
stuff for people with less than 10 posts
}

?>