Hi all, yesterday evening i tried to have working the new hacks. It is not working.
Now i've seen the new zenphoto release, i downloaded it and upgraded zenphoto, i deleted the cache folder, and re-inserted 2 videos. Zenphoto is working, but when I call the page with this code
i get an error:
Zenphoto Error
MySQL Query ( SELECT images.albumid, images.filename AS filename, images.title AS title, albums.folder AS folder, images.show, albums.show, albums.password FROM zp_images AS images, zp_albums AS albums WHERE images.albumid = albums.id AND images.show=1 AND albums.show=1 AND albums.folder != '' ORDER BY DESC LIMIT 2 ) Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 2' at line 1
Is mysql version i'm running that generates it?
I think is better if i try on the server, not in local, don't you?
this code is now working at the bottom of
http://www.bertsimons.nl/zenphoto/contact/comments.jpg.php
5 latest videos ordered by image-date
``
note replace the path's by yours
and you can insert
`$preview = substr($imageURL,0,strrpos($imageURL,".")).".jpg";
echo "so.addVariable(\"image\",\"".$preview ."\");";`
to show the preview image of the video.
sorry for my wrong contain.
now i made hacks in template functions.
with the old code i'm continuing to dipslay only a video that doesn't change when i add others
With the new
i get this error
MySQL Query ( SELECT images.albumid, images.filename AS filename, images.title AS title, albums.folder AS folder, images.show, albums.show, albums.password FROM zp_images AS images, zp_albums AS albums WHERE images.albumid = albums.id AND images.show=1 AND albums.show=1 AND albums.folder != '' ORDER BY DESC LIMIT 4 ) Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 4' at line 1
Bert, i saw your page and now know it's working.
I think it is the mysql server version (..error in your SQL syntax...your MySQL server version for the right...).
I will try on the server and inform you as soon as possible.
Thanks a lot for yours gold help!!!!
don't make hacks in the template- functions file!, with last night nightly build it is not neccesary
Hi Bert, i haven't touched any file of zp. In a page outside zp folder there is this code:
I'm always returning the error. I tried on the server. I think i'm losing something...
Zenphoto Error
MySQL Query ( SELECT images.albumid, images.filename AS filename, images.title AS title, albums.folder AS folder FROM zp_images AS images, zp_albums AS albums WHERE images.albumid = albums.id AND images.show = 1 AND albums.folder != '' ORDER BY DESC LIMIT 26 ) Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 26' at line 1
what are the paths of your folders? did you now install in /zenphoto ? and are the videos inside an album in zenphoto/albums?
antonio, i maneged to get it working outside the zenphoto directory as you can see at
http://www.bertsimons.nl/testlatestvideo.php
`
`
i don't get an mysql error..
but however to get the videos to show up I needed to at this at the top:
`
`
this is normally called by zenphoto if inside zenphoto
Hi Bert, thank you again.
Yesterday i forgot to paste , but it is in the page.
I made another folder called zenphoto with 5 video.
Nothing to do, i'm always getting the error.
Zenphoto works fine, i can see correctly all pages.
I changed if ($x++ >=5) to if ($x++ >=1) to display only 1 or 2 video but the error persists.
Now i try to clean the database and reinstalling zenphoto.
I will inform you.
Thank you Bert and thanks Acrylian.
Here i am!!
I made a new database for zenphoto 1.1.5, and during setup i got this error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\zenphoto\zp-core\setup.php on line 51
so i deleted the db, created another one and installed zenphoto 1.1.3
Setup was ok, but i can't display the last video.
Any idea?
Ok, on the server i upgraded to 1.1.5, sorry but i can't get it working. It's always displaying the error.
I am out of ideas, I don't know about MYSQL and servers..
Does the example function as on
http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin
work on your external page?
Hi Bert, I am at working now, if i remember right, it is working!!