View Full Version : Integrating vBulletin's User Permissions System
RobAC
08-29-2009, 07:01 PM
Not sure if this is the right forum to ask this question or not, but what is the best way to integrate vB's user permissions system into the rest of my site.
I have a bunch of HTML pages on my site that I would have to convert to php, but I'd like to make those pages accessible only to my forum members.
How can I do this?
Lynne
08-29-2009, 07:08 PM
Take a look at this article - [How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=98009)
RobAC
08-29-2009, 07:15 PM
Take a look at this article - [How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=98009)
Thanks Lynn,
I read through that, but it's kind of confusing what I need and what I don't need to use from that thread.
Lynne
08-29-2009, 09:24 PM
You just need to be concerned with the first part, Creating a Custom Script. That tells you the basics of creating the php page and having a template to hold the content.
RobAC
08-29-2009, 09:56 PM
Yes, but if I'm reading that correctly, I have to create a template for each new page with the content in the template?? I have close to 400 html pages that I want to restrict to my forum members only. I really don't have to create 400 templates?
eyelleye
08-30-2009, 09:26 PM
Why not use vbadvanced cmps to wrap all your existing html pages. It has support for this out of the box. See: http://www.vbadvanced.com/products.php?do=productinfo&productid=4
RobAC
09-10-2009, 03:46 AM
Why not use vbadvanced cmps to wrap all your existing html pages. It has support for this out of the box. See: http://www.vbadvanced.com/products.php?do=productinfo&productid=4
The only reason why I haven't gone with vbAdvanced, even though I love their product, I don't need all of the bells and whistles that it comes with.
ragtek
09-10-2009, 03:59 AM
try this way:
chdir(forumdir); //change forumdir to your path to the forum
require_once 'global.php';
if ($show['guest'])
{
print_no_permission();
}
add this to the beginning of your pages
i think that should be all
RobAC
09-10-2009, 04:17 AM
^^^^ Interesting! That's what I'm looking for! It works, but doesn't seem to pull in the forum styles for some reason.
--------------- Added 1252590896 at 1252590896 ---------------
Ugh...so I get the "you do not have permission to...." page, but the forum styles are not being pulled in.
What am I doing wrong?
This is what I have at the top of my php file:
<?
chdir('/home/site/public_html/forums');
require_once('global.php');
if ($show['guest'])
{
print_no_permission();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Lynne
09-10-2009, 02:06 PM
If you read the article I linked to, or if you want a simpler one, try this one - How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164) - then you'll see you can just use the vbulletin templates to pull in the style for your page. It would be much simpler than redoing it all like you are.
RobAC
09-10-2009, 03:23 PM
If you read the article I linked to, or if you want a simpler one, try this one - How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164) - then you'll see you can just use the vbulletin templates to pull in the style for your page. It would be much simpler than redoing it all like you are.
I have read the article as well as the new linked to. I still cannot get the styles to pull in no matter what I do.
I simply want to restrict access to a group of web pages in a directory to a select group of forum members. That's all.
The task of trying to integrate vBulletins permissions system based upon the examples you've cited are beyond my comprehension and more advanced than I really need.
Thanks anyways. I guess I'm just going to move on and leave this project on the backburner.
Lynne
09-10-2009, 03:47 PM
Well, the style will get pulled in with the inclusion of the $headinclude template. And that gets pulled in from the inclusion of the $header template (I think..). Since you aren't using the template system to pull in those template, then they aren't getting included. If you use the template system, they will get included.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.