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 05-25-2006, 10:28 AM
ORP ORP is offline
 
Join Date: Mar 2004
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 05-25-2006, 12:11 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 05-25-2006, 05:02 PM
ORP ORP is offline
 
Join Date: Mar 2004
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #4  
Old 05-25-2006, 05:08 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No. I was saying put that at the top of the page. Without the right permissions, they won't see anything on the page.
Reply With Quote
  #5  
Old 05-25-2006, 05:12 PM
ORP ORP is offline
 
Join Date: Mar 2004
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 05-25-2006, 05:13 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Amy
Reply With Quote
  #7  
Old 05-26-2006, 02:37 PM
SnickersTK SnickersTK is offline
 
Join Date: Apr 2005
Location: Denmark
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it...

Parse error: syntax error, unexpected '{' in /mounted-storage/home16a/sub002/sc18492-FLJN/www/forum/page.php on line 4
Reply With Quote
  #8  
Old 05-26-2006, 02:46 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 05-26-2006, 02:47 PM
SnickersTK SnickersTK is offline
 
Join Date: Apr 2005
Location: Denmark
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It seems to be working!

Sweet!

I just ran 5 tests, its 100% working.

I LOVE YOU!
Reply With Quote
  #10  
Old 05-26-2006, 02:51 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

woo hoo! Glad it works.
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 01:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04271 seconds
  • Memory Usage 2,247KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete