Page 1 of 1

Restrict view of large image only?

Posted: 14 Jan 2011, 16:59
by chiconerd
Hello,
I am new to using this component, well I am new to joomla! in general but one of the component on my list was a gallery and so far I think this is the best one.

It has all the features that I wanted but there is a single one that I cant find or maybe there is another way of doing this.

There is a Access level for category but not for images, my goal is to be able to show preview of the thumbnails but when they click to see the full image they have to login.

if there is no way of doing this, Ill be thankful if someone can point me to the right file where I can set a user level access code to get this feature in.

thank you for any help you can provide.

Re: Restrict view of large image only?

Posted: 16 Jan 2011, 15:06
by Jan
There is a Access level for category but not for images
Hi, yes, in other case the script will do only checking (there are a lot of different permissiosn which are dependent to each other :-( ) and there will be no resources for displaying the gallery features :-(

This then needs to be customized in the code, adding some column to image (e.g. access) and then automatically or manually to add to this column that the image is protected. and then write some if clauses for the frontend :-(

Jan

Re: Restrict view of large image only?

Posted: 18 Jan 2011, 12:14
by chiconerd
Thank you Jan, I guess I will have to start working on that. :x :lol:

Re: Restrict view of large image only?

Posted: 18 Jan 2011, 15:21
by chiconerd
In case anyone is looking for something like this in the future I did it the easy way,
went into the the code and found where the image is being display for my settings it was in
views/detail/view.html.php

and found the line that shows the image which check if the person has access to that image
$rightDisplay is the variable and all you need to do is add an if

Code: Select all

if($user->get('id') == 0)
	$rightDisplay = 0;
cheap but gets the job done. sends the user to the login form.