ZenphotoCMS Forum
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 - 13-03-2015

Thanks guys. I have upgraded to 1.4.7 Support build.

The initial issue (to be logged in for viewing images) has been resolved and it works properly now.

However if you click on the login link, the form is printed but doesn't go away after submission. I have to click on the index link to go back to the gallery/album.

Though the login function is working properly and the user is logged in after submitting the form.

Is this a bug or something at my end?

Previously the login was done through litebox popup. Is it not available anymore? The user login-out plugin options show colorbox enabled.




setting view restriction to un-registered users - acrylian - 13-03-2015

The colorbox one is still there but check the colorbox plugin option so the scripts are loaded on the theme pages needed.

Cannot answer the login link issue. Is this maybe the same as this?:
https://github.com/zenphoto/zenphoto/issues/908
Couldn't reproduce that so far.

At least the printPasswordForm() function has a parameter for a page redirect. Maybe that is not set on your theme?




setting view restriction to un-registered users - haroon - 13-03-2015

options/theme - use colorbox is checked

options/plugin/colorbox_js on active (zenpage) theme has the required pages checked e.g. index,album,gallery,image etc

but still it doesn't pop up.

Regarding redirect issue are you talking about this parameter of printPasswordForm()in template-functions.php

if (is_null($_password_redirect))
$_password_redirect = getPageRedirect();

how is one supposed to set this on a theme?




setting view restriction to un-registered users - acrylian - 13-03-2015

You don't do anything in template-funtions.php but set it where you use the printPasswordForm() function…




setting view restriction to un-registered users - haroon - 15-03-2015

I checked the login issue with other themes, it is working normally i.e. the popup colorbox comes and then redirects after submission.

I deleted the zenpage theme files and downloaded the files again from zenphoto site (1.4.7 support build) and uploaded them.

Run the setup again. It gives a warning:

"Zenphoto core files [Some files are missing or seem wrong]"

and then it lists all zenpage theme files. Why is that?

Though after setup it gives 5 green ticks for all themes setup.




setting view restriction to un-registered users - acrylian - 15-03-2015

It gives a warning because the file date is off compared to the other files. In your case you know it is since you added them later one. If this happens by itself suddenly it could indicate a file being hacked. http://www.zenphoto.org/news/installation-and-upgrading#re-running-and-re-uploading-setup-files




setting view restriction to un-registered users - haroon - 15-03-2015

so what else can i try to resolve the login issue




setting view restriction to un-registered users - acrylian - 15-03-2015

You did use a custom theme, correct? If it works in the included correctly something will be different on yours.




setting view restriction to un-registered users - haroon - 15-03-2015

I am using zenpage. i customized css a little bit but nothing related to its functions and in 1.4.5.7 login colorbox was working fine.

After upgrading to 1.4.7 the login colorbox is not popping up neither redirecting after submission only in zenpage. In other themes it is working properly.

After upgrading i havent customized anything yet. the files are exactly as they were downloaded from your site.




setting view restriction to un-registered users - acrylian - 15-03-2015

Ok, will take a look asap.




setting view restriction to un-registered users - acrylian - 17-03-2015

Reason you don't get a colorbox for the form is that it is not configured for the theme. In fact it requests a link to the password page instead by overriding the plugin options. Find printUserLogin_out("[*]", "", 0) in the Zenpage theme's sidebar.php and change the 0 to 2 to always get a colorbox or remove the last parameter to let the plugin option set it.




setting view restriction to un-registered users - haroon - 18-03-2015

Ok great, thanks a lot for your time. That resolves the issue.

just out of curiosity i saw that the older version sidebar.php, the default setting was 2. Any special reason for setting it to 0 by default in 1.4.7?




setting view restriction to un-registered users - acrylian - 18-03-2015

The reason was bascially that the pure link to the password page is "cleaner" and doesn't require the colorbox scripts being loaded on every page. That it does if you use it for the login form overriding the colorbox plugin settings (which I forgot earlier).




setting view restriction to un-registered users - haroon - 18-03-2015

ok. thanks a lot. have a great day.