![]() |
|
Where is the alt text printing located - 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: Where is the alt text printing located (/thread-13075.html) |
Where is the alt text printing located - Goodfreephotos - 2018-03-27 Hi, http://forum.zenphoto.org/discussion/1719/changing-alt-text-for-images I looked through template function but I cannot find where: alt="" is located. The documentation did not help much, anyone know where that line of code is located? Where is the alt text printing located - acrylian - 2018-03-27 It is located within the function Recommended way for customisations: Copy, rename and modify the function (e.g. Where is the alt text printing located - Goodfreephotos - 2018-03-27 Found it, not very good with syntax though. If I just want to add "free photo" at the end of the alt text echo '[img]' . html_encode(pathurlencode($image->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . '[/img]getTitle()) ."\" />\n"; How would I just append "free photo" at the end of the title for the alt text, keep getting the wrong syntax. Where is the alt text printing located - acrylian - 2018-03-28 Appending text is quite basic like this Where is the alt text printing located - Goodfreephotos - 2018-03-28 I get an error when I do: echo '[img]' . html_encode(pathurlencode($image->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . '[/img]getTitle()) . 'free photo' "\" />\n"; is there some kind of backslash that I need to do? Where is the alt text printing located - acrylian - 2018-03-28 You have an issue with your quotes here. A double quote is wrong. At the end it should be something like Where is the alt text printing located - Goodfreephotos - 2018-03-28 Both: echo '[img]' . html_encode(pathurlencode($image->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . '[/img]getTitle()) . 'free photo"'\" />\n"; and echo '[img]' . html_encode(pathurlencode($image->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . '[/img]getTitle()) .'free photo"\" />'\n"; Give errors, I've tried a lot of different interations, can't get it to work. Where is the alt text printing located - acrylian - 2018-03-29 Well, you didn't pay atention to the details. Look at your quotes. Whatever you open, you also need to close. Especially the last one is really wrong. This is really PHP basics, sorry… Try this: If it doesn't work the error might also be in another line already. Where is the alt text printing located - wibbi - 2018-04-05 A better way is to duplicate the function you need, give him a new name, edit it and use it. You can find the file and point of an function in the Zenphoto docs. The function printLatestImages() only includes an another function. The function printImageStatistic(). In your case:
Where is the alt text printing located - acrylian - 2018-04-05
Duplicate and rename yes, but don't place it in the same file! Never edit core or official files if you can avoid it. Better: Copy it to your theme's The "weird" mixture of single and double quotes is primarily because of the source code view only |