Hi!
I currently have my own little photo album and am planning on moving over to zenphoto.
Right now I have everything set up and running, but I need a way to get the filename. On each image page I want to grab more data about the image that I already have stored in another MySQL table. To grab the correct information I need to be able top grab the filename of the image that is being shown, add a bit of text to it so it will match the thumb address of the second table and then call in the required fields.
The problem I am having is figuing out how to grab the filename of the image.
Thank you much for your time!
-Mr. Dobolina, Mr. Bob Dobolina
Comments
`$_zp_current_image->name`
If you need it for some other image, take a look at the gallery, album and image classes in classes.php and the things that return images. You can get any of those and get their name or do anything else you want with them
<? echo '$_zp_current_image->name' ?>
works.
It echoes filename.jpg on the image page.
But how to strip the extension .jpg and display the filename on an image page?
If you want to strip the extension, try
`<?php echo substr($_zp_current_image->name, 0, strrpos($_zp_current_image->name, '.')); ?>`
<?php echo substr($_zp_current_image->name, 0, strrpos($_zp_current_image->name, '.')); ?>
in the h2 tag but it is blank on page
Also tried it in page title but still blank