![]() |
|
setting view restriction to un-registered users - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: setting view restriction to un-registered users (/thread-11897.html) Pages:
1
2
|
setting view restriction to un-registered users - haroon - 08-03-2015 Hi hope you guys are doing great. I am coming here after a long time and have even forgotten the zenphoto standard terminologies regarding albums/galleries etc (not your headache i know) so i'll explain what i need to know: I want un-registered users to view up till here: http://www.outzeal.com/index.php?album=skiing/photos/usa-colorado After this point I want them to log in so that they can view this: http://www.outzeal.com/index.php?album=skiing/photos/usa-colorado&image=001.jpg If it is already mentioned somewhere pls share the link (sorry for wasting your time). If its not mentioned before pls let me know how this can be done. Thanks setting view restriction to un-registered users - acrylian - 08-03-2015 Please take a look here if this answers your questions already: setting view restriction to un-registered users - haroon - 09-03-2015 I already had a look before posting this query. In my understanding (if correct) the option I am looking for is not addressed there. The link you sent mentions: Protected image guest user: When these are set and image protection is set to protected, viewers will be required to login to view the full sized image. However what I want is something similar but at a different level (i.e. one step earlier). I want unrestricted access for viewers so that they can see the albums with image icons only. Once they click on the icon to see the image, I want viewers to login first. setting view restriction to un-registered users - acrylian - 09-03-2015 We have no such protection on image level. You can guest password protect any album or you can limit top level albums and all sub albums via rights for registered users only. But you will not get to the thumbs. If you want to require being loggedin to view images at all you can modify your theme's image.php to check for the login status and refuse access of course. So don't protect the albums and modify the image.php file to refuse acccess if e.g. the vistior is not logged in and/or has a specific right. setting view restriction to un-registered users - haroon - 11-03-2015 ok thanks will try that, and definitely will come here again considering my scripting skills setting view restriction to un-registered users - haroon - 12-03-2015 file: image.php if (zp_loggedin(user)) {load_CurrentPage;} else {load_LoginPage;} do i need to do something like this. if yes then what will be the code to check log in status and displaying of current page or login page? Is there a guide about these functions, thanks. setting view restriction to un-registered users - acrylian - 12-03-2015 No, much simpler. Place this check around the acual content of the image.php page:
setting view restriction to un-registered users - haroon - 12-03-2015 The issue I am getting with this is: When the else command runs it prints the Password Form at the location of this code and then carries on with the rest of the script and displays the image. e.g. please follow this link to see what I mean: I tried to get the login litebox to pop up but could'nt do it. Need help thanks. setting view restriction to un-registered users - acrylian - 12-03-2015 Then you haven't enclosed the image.php page content within the check correctly. setting view restriction to un-registered users - acrylian - 12-03-2015 An easier solution I should have thought of first (a bit like your own idea) for you without enclosing any content. On the image.php page right after
setting view restriction to un-registered users - haroon - 12-03-2015 yeah this works however password.php brings up the page that requests for a password only i.e. there is no option for username. http://www.outzeal.com/index.php?album=skiing/photos/usa-colorado I tried this instead: if(!zp_loggedin()) { this brings up the login page but not within the site. But if I place the code after the body tag then it pops up the login page within the site and masks everything else with black color. This works good, however in this case there is no registration link visible for visitors that are not yet registered. So the issue now is how to bring login page, if I use: if(!zp_loggedin()) { Or how to show register link if I use: if(!zp_loggedin()) { Thanks for your time, much appreciated setting view restriction to un-registered users - acrylian - 12-03-2015 If you use the code I noted last like: You get this: So exactly what you wanted or not? Of course the function has several parameters. You can review them on the documentation as usual: Registering is something different but the link should be show below the form if you have th register_user plugin enabled. Otherwise you can look at the theme's register.php page. setting view restriction to un-registered users - haroon - 12-03-2015 I am using the code like: I get this: Your result is exactly what I need but I cant figure out why I am not getting the username field. setting view restriction to un-registered users - acrylian - 12-03-2015 My bad, that's a bug in 1.4.7. You would need to use the master / support build to get the name. setting view restriction to un-registered users - haroon - 12-03-2015 I am still on 1.4.5.7 official build. working fine for me. I've done so much customization that I would like to avoid an overall update. What does this mean 'master / support build to get the name" setting view restriction to un-registered users - haroon - 12-03-2015 oh ok the support build to get the same result... got it if i ugrade from 1.4.5.7 to 1.4.7 support build without updating the theme ... is it ok? (i know its not recommended) setting view restriction to un-registered users - acrylian - 12-03-2015 You can of course choose to not upgrade on your own risk but you miss issue and security fixes and, well, as you know we can only support the current version. You will in any case have to update your theme in some place if you update from 1.4.5 to 1.4.6 as that was a bigger release but 1.4.7 is just a bugfix release (as the version numbering change was noted on its release). setting view restriction to un-registered users - haroon - 13-03-2015 the older version archive after 1.4.5.7 lists 1.4.5.8 and 1.4.5.9 there is no 1.4.6? any special reason? the last digit is for the bug fix release, so is it ok to upgrade directly from 1.4.5.7 to 1.4.7 support build by skipping the intermediate releases? setting view restriction to un-registered users - fretzl - 13-03-2015 Starting with 1.4.4 all consecutive releases are available on GitHub https://github.com/zenphoto/zenphoto/releases You should be able to safely upgrade to 1.4.7 directly. As @acrylian said, you will probably have to change some functions in your theme manually. setting view restriction to un-registered users - acrylian - 13-03-2015 What fretzl said. But besides we just forgot to update the archive⦠|