Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2009, 07:01 PM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 08-29-2009, 07:08 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Take a look at this article - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
Reply With Quote
  #3  
Old 08-29-2009, 07:15 PM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #4  
Old 08-29-2009, 09:24 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 08-29-2009, 09:56 PM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #6  
Old 08-30-2009, 09:26 PM
eyelleye's Avatar
eyelleye eyelleye is offline
 
Join Date: Mar 2003
Location: Alaska
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 09-10-2009, 03:46 AM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by eyelleye View Post
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.
Reply With Quote
  #8  
Old 09-10-2009, 03:59 AM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 09-10-2009, 04:17 AM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^^^ 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>
Reply With Quote
  #10  
Old 09-10-2009, 02:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 04:19 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
  • Page Generation 0.04250 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete