![]() |
|
- Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: (/thread-12884.html) |
- Guest - 22-06-2026 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! - trisweb - 11-08-2006 From a theme, it's in the following variable for the current image (whether you're on the image page, or in the
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 - jayray999 - 28-11-2006 Ok, works. It echoes filename.jpg on the image page. But how to strip the extension .jpg and display the filename on an image page? - trisweb - 28-11-2006 That is the filename... If you want to strip the extension, try - jayray999 - 28-11-2006 Thanks Tristan. It works. - trisweb - 28-11-2006 Cool, no problem. - wdiggles - 07-05-2011 This is an old thread so wondering if this still works? I tried putting in the h2 tag but it is blank on page Also tried it in page title but still blank - wdiggles - 07-05-2011 found a post that said you changed name to filename, it works now ;-) - wdiggles - 07-05-2011 Another question, does getFileName function exist? or printFileName? If not, how can it be done? - acrylian - 07-05-2011 Yes, see the documentation. |