vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Tieing my html Gallery pages to VB permissions (https://vborg.vbsupport.ru/showthread.php?t=116621)

ORP 05-25-2006 10:28 AM

Tieing my html Gallery pages to VB permissions
 
I thought this would be simple, but ...maybe not.
I have some photo gallery pages on the same site as my forums. This is not Photo Post or VB gallery, this is simple html pages with thumbnails, which when clicked enlarge.
I would like to only allow members of my forum to view these galleries. I thought if I created a dir somewhere in the VB structure, and giving it the proper group permissions that would accomplish this, but I haven't been able to get it to work. VB.com said I need to use PHP ...and to come here to ask about that. So here I am. Does anyone have any PHP that might help me accomplish this?

Thanks in advance!

amykhar 05-25-2006 12:11 PM

One possible fix. Put php at the top of the file that looks sort of like this:

Code:

<?php>
require_once('./global.php');
if(!is_member_of($vbulletin->userinfo,2,5,6))
{
  print_no_permission();
}
?>

you'll probably have to adjust the require global.php to reflect the path.

Rename the file from .html to .php too.

ORP 05-25-2006 05:02 PM

Thanks for the help Amy, but .....I'm more than lost.
I know html and css but do not know how to wrap my html with PHP. I know your trying to tell me, but I'm still confused.
Could you elablerate or give an example of one that works.

are you saying to put php around each thumbnail image code?
Would they then be able to see the thumb but not the larger image?
How could i keep them from seeing the html page at all?

Thanks again!

amykhar 05-25-2006 05:08 PM

No. I was saying put that at the top of the page. Without the right permissions, they won't see anything on the page.

ORP 05-25-2006 05:12 PM

And then the regular html goes under the ?>

including the header info, css reference, etc?
I"m going to have to break down and buy a PHP book. Sorry for these basic questions.

amykhar 05-25-2006 05:13 PM

Right. The php will go at the very top of the file before anything else.

Amy

SnickersTK 05-26-2006 02:37 PM

I tried it...

Parse error: syntax error, unexpected '{' in /mounted-storage/home16a/sub002/sc18492-FLJN/www/forum/page.php on line 4

amykhar 05-26-2006 02:46 PM

The code was intended to be an example - hence the 'looks sort of like this' :D

It was missing a closing ) on the end of line 3.

Please note, I have not guaranteed this will work. It's a a possible solution, not a boilerplate answer.

SnickersTK 05-26-2006 02:47 PM

It seems to be working! :D

Sweet!

I just ran 5 tests, its 100% working.

I LOVE YOU!

amykhar 05-26-2006 02:51 PM

woo hoo! Glad it works. :)


All times are GMT. The time now is 03:35 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.01042 seconds
  • Memory Usage 1,723KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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