Quantcast
Channel: Zenphoto forum
Viewing all articles
Browse latest Browse all 2917

ERamseth on "can't get checkAccess() to work"

$
0
0

So I've written a script which serves videos to jplayer from a directory that isn't normally visible to web browsers.

I'm trying to incorporate checkAccess() into the script so it can only pull files for a user who should be able to access said files.

So far I've added

define('SERVERPATH',str_replace('\\','/',dirname(__FILE__)).'/zp');
define('WEBPATH','/'.basename(dirname(__FILE__)).'/zp');

require_once(SERVERPATH.'/zp-core/template-functions.php');

to my script and have done

zp_load_gallery();
zp_load_album('$albumName');
zp_load_image($albumName, $imageName);

with valid directory and file names.

when I try

print $_zp_current_image->checkAccess();

I never get a result (I assume that means it thinks I don't have access). I have tried it both logged in and logged out and it makes no difference. I know the $_zp_current_image seems to be working in other areas... I can get valid width and height; and isProtected() returns 1.

Is there anything glaringly wrong with what I've done in my code that might be causing me problems?


Viewing all articles
Browse latest Browse all 2917

Trending Articles