The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
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(); } ?> Rename the file from .html to .php too. |
#3
|
|||
|
|||
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! |
#4
|
||||
|
||||
No. I was saying put that at the top of the page. Without the right permissions, they won't see anything on the page.
|
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
Right. The php will go at the very top of the file before anything else.
Amy |
#7
|
|||
|
|||
I tried it...
Parse error: syntax error, unexpected '{' in /mounted-storage/home16a/sub002/sc18492-FLJN/www/forum/page.php on line 4 |
#8
|
||||
|
||||
The code was intended to be an example - hence the 'looks sort of like this'
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. |
#9
|
|||
|
|||
It seems to be working!
Sweet! I just ran 5 tests, its 100% working. I LOVE YOU! |
#10
|
||||
|
||||
woo hoo! Glad it works.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|