![]() |
|
OpenStreetMap: add link to photo to Title - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: OpenStreetMap: add link to photo to Title (/thread-13887.html) |
OpenStreetMap: add link to photo to Title - kuzzzma - 24-11-2023 Suggestion: add link to photo to Photo Title, displayed in Popup on the map. I've tried to do it myself, but run into some strange behaviour when adding this code to title: some links worked fine, but for some opening tag for link address < was transformed to < code, rendering link useless. Couldn't find reason for this though, it seemed random. OpenStreetMap: add link to photo to Title - acrylian - 25-11-2023 Since everyone will click instantly on the thumb as the "Larges area" anyway so I don't really see the direct benefit. But we'll try to look into linking the title as well. OpenStreetMap: add link to photo to Title - kuzzzma - 25-11-2023 Openstreetmap has several options what to display: Thumb, Title and Description can be enabled separately, and since Title has no link - it's not particularly useful without Thumb, which I think forces and limits users to use Thumb. OpenStreetMap: add link to photo to Title - acrylian - 25-11-2023 True, I just added a link to the image title in 1.6.1b OpenStreetMap: add link to photo to Title - kuzzzma - 25-11-2023 I used your version and got the same issue I had - same photos got their links broken (the same each time). Album with photos: https://www.photo.private-universe.net/travel/russia/gatchina/ Screenshots: I tried to modify html code for Thumb, getting rid of the img and using Title instead and this works. OpenStreetMap: add link to photo to Title - acrylian - 25-11-2023 IT seems to work sometimes and sometimes not. In my local test it works so far. The only thing I see is that the thumb link used double quotes for the code and single quotes in the HTML and the title link vice versa. I have switched it as JS can be overly picky at times. Perhaps that helps… OpenStreetMap: add link to photo to Title - kuzzzma - 25-11-2023 Switch of quotes did nothing with my issue - same broken links for the same photos. In my desperation in trying to find a solution I've tried to modify html code for Thumb, getting rid of the img and using Title instead and this works for every image: Code of openstreetmap.php: Result: Arch photo always got it's link broken when I've tried to add link to title. OpenStreetMap: add link to photo to Title - acrylian - 25-11-2023 I think the whole issue has to do with the Cyrillic chars in the title confusing the JS. Could you please try my original code but add js_encode() (or alternatively html_encode()) around the title? OpenStreetMap: add link to photo to Title - kuzzzma - 25-11-2023
In fact all other instances of such photos (I found a few in each album) all had only Latin chars in Titles too.
tried both, neither fix links. OpenStreetMap: add link to photo to Title - acrylian - 25-11-2023 Okay, I think I see the at least one issue now. Seems the getGeoDataJS() method for some reasons I don't remember again shortens the title/desc that is already shortened by getImageGeoData() and then uses js_encode() on everything including the link stuff unnecessary. Using the js_endode() as just suggested of course was double encoding which likey breaks things. Please try the update in 1.6.1b. OpenStreetMap: add link to photo to Title - kuzzzma - 25-11-2023 YESSS, with latest commit it worked! OpenStreetMap: add link to photo to Title - acrylian - 25-11-2023 Great! |