Member
Member
BigLouis87   05-08-2012, 09:11
#1

Hi Stephen, I made a new thread to avoid going OT in the other thread ("db update function").
I turned my idea into a plugin to upload anonymously images in an album. In 1.4.2 it worked perfectly, in 1.4.3 and latest trunk it gives issues in including functions files (require_once). The error is:
Page not found The Zenphoto object you are requesting cannot be found. Album: plugins/gigiuploader/zp-core Image: setup
This is the plugin, it is very simple and only an alpha, the options are to be implemented yet and you must create an album in the folder albums/fan, but it should work at least.
http://www.mediafire.com/?e5g2kaxxddae0hr
I use it in search.php, calling the function printgigiuploader($searchwords); in order to take the right image tag to assign (I actually use search functions only for tags in my project).

Can you help me understand what's wrong?
Thank you!

Member
Member
sbillard   05-08-2012, 18:29
#2

Sure, I will take a look and see if I can get it running.

Member
Member
sbillard   05-08-2012, 19:21
#3

Pretty close to working. Just two changes needed in upload.php

Add a 'define('OFFSET_PATH', 3);` as the first line of code
This basically declares the code to reside in a sub-folder of the plugins folder.

change $path = WEBPATH . '/albums/fan/'; to $path = SERVERPATH. '/albums/fan/'; (of course eventually to whatever album is in the options.) move_uploaded_file() and chmod() operate on filesystem paths, not web paths.

Did work for me when I tested with those two changes.

[edit] note that the original post had an error on the second line replacement.

Member
Member
BigLouis87   06-08-2012, 10:03
#4

Thank you Stephan now it works! The offset_path was the main key.
Now I will work on it to make it generally usable and I'll give it to you to publish if you think it will be useful for other people.

Administrator
Administrator
acrylian   06-08-2012, 10:54
#5

New plugins are always welcome but you should not give it "to us". Please read here regarding publishing the plugin for the community:
http://www.zenphoto.org/news/general-contributor-guidelines#themes-and-plugins

You will understand that we cannot take over maintaining everything (even if we did help a bit in this case). Unless sbillard wants to do that naturally which I don't know right now.

Member
Member
sbillard   06-08-2012, 16:43
#6

We are glad to help making things work, but as acrylian indicates we prefer if people can host their contributions. Otherwise if we do it they gust get out of date and cause people problems who try to use them.

Member
Member
BigLouis87   08-08-2012, 14:26
#7

Seems legit! When I will finish my site I will build a page for the plugin to host it, thanks for the guidelines.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.