I'm trying to get numbers below each thumbnail in my gallery. What I'd like is for them to start at 1 (at the top left) to however many thumbnails there are.
Now, I did a bit of reading on the forums about someone trying to get their image name below each image. This was all well and good (and I thought it could be the solution for me) but it didn't work 100%. I managed to get the titles showing (albeit unstyled) but an error came up:
Notice: printEditable() invalid function call. in /../zp-core/template-functions.php on line 1225
I managed to get the titles to show by inserting:
Thanks for that acrylian.
Yeah, I don't know much php at all. I've had a look through that first link and it shows:
function imageNumber( ) {
in the template-functions.php file. Is that what I'm supposed to be editing?
I had a look through http://www.zenphoto.org/news/how-to-read-the-zenphoto-functions-guide but I have no parameters for this function, so if I am supposed to be editing that particular bit of code, I'm not sure what I'm supposed to be changing. Also, in the first link you posted, it says 'int' so I'm assuming it should look something like:
function imageNumber( [int $?? = ?? ) {
Again, I've got no idea, so I could be way off (and probably am).
Any help appreciated.
No, that function gets the number of the current image (based on the order) within the next_image() loop on album.php. Not all functions have parameters as this does not. Also You use it this way echo imageNumber(); You should NEVER edit core files unless you know what you are doing (you are apparently not) and unless you want to run into trouble on upgrades.
I strongly suggest to read the theming tutorial and learn some PHP basics before proceeding with anything. Sorry, I will not further respond to absolute basics like using the function above.
Sorry about all the questions,
I sent a ticket the other day. With it being the first time I've used the system, where am I expected to look for a response? http://www.zenphoto.org/trac/report/1 there?
Thanks for all your hard work acrylian,
I'm not sure if I can comment on the ticket so I'll just comment here.
You stated "I took a look and it was a bug as the code was already there. Fixed in tonight's nightly build."
Do I have do download one of these files? http://www.zenphoto.org/pages/nightly-builds
Do I have to upgrade to another version of zenphoto first?
Thanks again.
To comment on a ticket you need to login on the Trac system with the credentials you got when registering to create the ticket.
Yes, you need to install one of those files (trunk version, not dev). Since you are on an older version I really recommend to upgrade to 1.4.1.2 first. Or you can wait until 1.4.13 is released, actually scheduled September 1st if nothing occurs.