ZenphotoCMS Forum
best url to view images from another site (eg. wordpress) - 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: best url to view images from another site (eg. wordpress) (/thread-10798.html)

Pages: 1 2 3


best url to view images from another site (eg. wordpress) - acrylian - 17-04-2013

I think zenphotopress has currently an compatibility issue. You should link to the cached image directly yourdomain.com/cache//.

The image processor i,php requires also an token to work. This has been added to prevent people to overload your server by sending random requests to the image processor.




best url to view images from another site (eg. wordpress) - hkdigit - 17-04-2013

According to sbillard reply, if I disable the security check, I can get the image if image already cached... Am I misunderstand his idea?




best url to view images from another site (eg. wordpress) - acrylian - 17-04-2013

True, he did write that above. Then I have no idea and we should wait for his reply.




best url to view images from another site (eg. wordpress) - sbillard - 17-04-2013

If you disable security checks you will get the image cached or not (and it will be cached once you have got it.) If the image is already cached you will get it even with the security check enabled.




best url to view images from another site (eg. wordpress) - hkdigit - 18-04-2013

sbillard,

Just make sure my config is correct, please take a look on following printscreen.

http://s13.postimg.org/uhxs3c68l/Photo_Gallery_admin_options_image.jpg

If it is the correct, then there is something wrong with the coding, as it return blank page without error.




best url to view images from another site (eg. wordpress) - sbillard - 18-04-2013

You have disabled the correct option. So I guess you need to look into your error logs to see what they are telling you. You can also enable DEBUG_IMAGE by setting the define to true in the global-definitions.php script to get a log of what is happening.




best url to view images from another site (eg. wordpress) - hkdigit - 19-04-2013

Here is the debug Log:

{4774:Fri, 19 Apr 2013 15:18:31 GMT} Zenphoto v1.4.4.4[121605f7d74b874e059338dee7accca873881c6d]
Loading GD

{4774:Fri, 19 Apr 2013 15:18:32 GMT}
i.php(kate-tsui-tsz-shan, kate-tsui-20110504-131612.jpg): $size=, $width=, $height=, $cw=, $ch=, $cx=, $cy=, $quality=85, $thumb=, $crop=, $thumbstandin=, $passedWM=, $adminrequest=, $effects=

{4774:Fri, 19 Apr 2013 15:18:32 GMT}
cacheImage($imgfile=kate-tsui-20110504-131612.jpg, $newfilename=/kate-tsui-tsz-shan/kate-tsui-20110504-131612.jpg, $allow_watermark=1, $theme=hkceleb4) $size=, $width=, $height=, $cw=, $ch=, $cx=NULL, $cy=NULL, $quality=85, $thumb=, $crop= $image_use_side=longest; $upscale=0);

{4848:Fri, 19 Apr 2013 15:18:36 GMT}
Loading GD

Seems no error appear. Any hints?




best url to view images from another site (eg. wordpress) - sbillard - 19-04-2013

You will probably have to check your server log. There should be more debug messages showing the progress of the image caching, so somewhere there probably has been a fatal PHP error that has aborted Zenphoto processing.




best url to view images from another site (eg. wordpress) - hkdigit - 23-04-2013

I checked the access log and find, it return 404 error..

"GET /pic/zp-core/i.php?a=kate-tsui-tsz-shan&i=kate-tsui-20110504-131612.jpg&s=thumb HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0"

If I omit &s=thumb parameter, zenphoto can return image.

Any hints?




best url to view images from another site (eg. wordpress) - acrylian - 23-04-2013

&s=thumb is in any case wrong anyway. So where does that come from? s must be a number. For a thumb you need to use t. All parameters are documented on the i.php file beginning.




best url to view images from another site (eg. wordpress) - hkdigit - 23-04-2013

It generated by ZenPhotoPress plugin for Wordpress, it work properly when using older version of ZenPhoto (1.4.3.5).

For example:

http://www.hkgimages.com/pic/zp-core/i.php?a=sports/marathon/2013&i=hkgimages-20130224-083702-01.jpg&s=thumb

will return following thumbnail:

http://www.hkgimages.com/pic/cache/sports/marathon/2013/hkgimages-20130224-083702-01_75_cw75_ch75_thumb.jpg




best url to view images from another site (eg. wordpress) - sbillard - 23-04-2013

use the image object getThumb() method to create the link. Any "hand concocted" link is bound to fail over time.




best url to view images from another site (eg. wordpress) - hkdigit - 24-04-2013

Too bad the zenphotopress developer don't have time to fix the issue now. Any workaround, as my Wordpress post use lot of this parameter to display thumbnail. :~(




best url to view images from another site (eg. wordpress) - acrylian - 24-04-2013

I can try to take a look at the code for maybe a quick fix the next days but sadly there are some other things with more priority on my list (Zenphoto specific as you may guess).




best url to view images from another site (eg. wordpress) - acrylian - 24-04-2013

I took a very quick look and at least changed the what I think is a wrong thumb url. I put it up on GitHub: https://github.com/acrylian/zenphotopress

The plugin really could use a rework as it uses a lot of db queries to get stuff that most likely don't take care of the proper publish or protection states. I am really not able to really take this over for maintenance but maybe it is a quick fix for now.




best url to view images from another site (eg. wordpress) - hkdigit - 24-04-2013

acrylian, thanks for the hotfix, however, but sorry to inform you that it does not work.

Nevermind, maybe I downgrade zenphoto to old version at this moment, until you or plugin developer have time to fix it.

Thanks again for your effort.




best url to view images from another site (eg. wordpress) - acrylian - 24-04-2013

Ok, it was a really quick attempt without even testing… I although I do work with Wordpress as well occasionally I never used this plugin (although our own tinyZenpage tool is directly inspired by it)




best url to view images from another site (eg. wordpress) - hkdigit - 24-04-2013

Nice if zenphoto can provide official wordpress plugin-in in further. Many thanks in advance.




best url to view images from another site (eg. wordpress) - acrylian - 24-04-2013

Sorry, we will not provide any offifical wordpress plugin. We of course favor the use of Zenpage instead (in case you don't know we once used Wordpress on our site..;-)).




best url to view images from another site (eg. wordpress) - acrylian - 30-04-2013

I took another look but sadly I have to say this will probably not an easy fix. The image processor requires an hash for which you need Zenphoto core functionality. THat would be a major rework if it even works within Wordpress.

Things will get much easier with these plans so it might not even be worth the work and time:
https://github.com/zenphoto/zenphoto/issues/340
https://github.com/zenphoto/zenphoto/issues/341