![]() |
|
db update function - 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: db update function (/thread-10020.html) |
db update function - BigLouis87 - 2012-05-25 Hello, db update function - acrylian - 2012-05-25 You need to understand how Zenphoto works. The gallery/albums are filesystem based so that an image is added on discovery, e.g. someone visits the site or the backend. That is why you can upload via ftp. If you upload via the backend that process does also add an image entry to the db. To add an image manually you need to use the object model. Please read the tutorial on that. So anyone can upload with that anonymous tool without logging even in? Are you sure you want to open such a possible security hole? Not to speak of copyright or other rights issues if someone uploads somethings he should not do... db update function - BigLouis87 - 2012-05-25 Yes, I thought about security hole... Every uploaded photo will be inserted in a unique "users" album (=folder) but it will be unpublished until I manually approve it... and that will be the only folder they will have write access by the php/ajax form (that I found here and re-adapted http://tinyurl.com/3rsto2q ). I think it will be enough safe, don't you? db update function - sbillard - 2012-05-25 There have been a few people asking for this feature. You should consider making it a plugin and offering it to the community. You might also want to look at the Zenphoto upload handler's As for the security, you can be the judge. But I will caution you that the worst hack on Zenphoto to date was from a flaw in the ajaxfilemanager that allowed hackers to upload files to the site. db update function - BigLouis87 - 2012-05-25 Well, I have read the tutorial and now I have better understood how zenphoto works. $imageobject = newImage($albumobject,""); I'll work on it... I thought there was an easier way @acrylian: I'm not a programmer, I do it for hobby, but I'm an Open Source "fanboy" and I would like to contribute to the community! If it will work I will try to convert it into a plugin. I hope there is a good guide in the documentation db update function - BigLouis87 - 2012-05-25 Oh yeah it works! Thank you for the support, in the next weeks I'll try to make a plugin of it. db update function - BigLouis87 - 2012-07-31 Hi! I have just updated from 1.4.2 to 1.4.3; in the previous version all worked like a charm but in this 1.4.3 I recieve this error: db update function - sbillard - 2012-07-31 The change between 1.4.2 and 1.4.3 with regards to file paths has to do with the handling of cloned installs. Probably this is what is impacting you. But I am afraid I really do not understand what you are doing. The 404 error you are getting seems to indicate that Zenphoto has not found its proper install parameters and thinks it needs to be re-installed. My guess is that you need to set the defines for WEBPATH and SERVERPATH because the load path is not "normal". But that is only a guess. It might be better if you try to make this functionality into a plugin. Then it will load from the plugins folder which is a "normal" load point. db update function - BigLouis87 - 2012-07-31 Thank you. I found that probably the problem is the first line (require_once), i tried to change it into |