vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Integrating vBulletin's User Permissions System (https://vborg.vbsupport.ru/showthread.php?t=222058)

RobAC 08-29-2009 07:01 PM

Integrating vBulletin's User Permissions System
 
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.

RobAC 08-29-2009 07:15 PM

Quote:

Originally Posted by Lynne (Post 1876518)

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.p...fo&productid=4

RobAC 09-10-2009 03:46 AM

Quote:

Originally Posted by eyelleye (Post 1876987)
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.p...fo&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:
PHP Code:

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 [DATE]1252590896[/DATE] at [TIME]1252590896[/TIME] ---------------

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:

PHP Code:

<?
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) - 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

Quote:

Originally Posted by Lynne (Post 1882592)
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) - 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.


All times are GMT. The time now is 04:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01052 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete