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:
<?php while (next_image( printImageTitle() )):
in admin.php
But anyway, not sure how I can insert numbers below each thumbnail? Any ideas / help would be greatly appreciated.
Also, my theme is the JoshuaInk Theme but I'm not sure if that helps.
Thanks!
Comments
`<?php while (next_image( printImageTitle() )):`
You probably misstyped but this example is of course wrong...
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionnext_image
Correct is of course:
`
while(next_image()) :
printImageTitle();.....
endwhile;
`
Not that anyone tries to use that...
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.
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.
I've managed to get <?php echo imageNumber();?> to work but it only seems to work in non-dynamic albums. Is that supposed to be the case?
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?
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.
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.