![]() |
|
Index to Image Link - 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: Index to Image Link (/thread-11017.html) |
Index to Image Link - Sabyre - 2013-04-26 Hi All, I'm trying to make it so that albums that have only 1 video or image, link directly from index.php to image.php. Basically I am trying to eliminate the album page for albums that only have 1 entry. Usually for videos on our site. I have tried Any help would be appreciated, thank you. Index to Image Link - FunkFlex2001 - 2013-04-26 Try something like: if (getNumImages() Index to Image Link - Sabyre - 2013-04-26 Thank you for the reply. The problem isn't with images not showing. From the index.php page you click the thumbnail of an album, that brings you to album.php where you can select an image you want to view that will take you to image.php. I am trying to take album.php out of the equation for albums with only 1 image/video. To go from index.php directly to image.php. SO basically I am looking for a way to return the value of the URL to the single image/video on the index page. Index to Image Link - acrylian - 2013-04-26 You will have to use the object model to achieve that. Please see the user guide for info. Index to Image Link - FunkFlex2001 - 2013-04-27 Mhm, isnt it the same like: i think so, but this time ive not tested. Index to Image Link - acrylian - 2013-04-27 Yes, that tells you if there is only one image in the album. But not the link to it. You need to know which image you want to link to. Within the album loop you don't know that unless you use the object model to get the images of the album and telling which you want to use. It always comes down to the object model which is the core of everything. Index to Image Link - FunkFlex2001 - 2013-04-28 I know, but what i've meaned was when i insert the function he checks it out, the function to show the image should be: Or not?! Also untesed and it should be just the link to the image not the image itself, but with the mansonry theme it works in this way. He jumps direct to the image, it should also work for videos. Mansonry theme line 39 to 57... And by the way, its an interesting thing to hide. Maybe a photograph got a nude folder, it dont should shown. Have you includet a function to hide albums in the script? Index to Image Link - acrylian - 2013-04-28 The code you posted is truncated as you did not escape it correctly (see below the form). In any case Regarding hiding: You can unpublish albums so only persons who know the link can see it. Or password protect it. Also you can of course use a specific image as the album thumb so it is "save". Index to Image Link - FunkFlex2001 - 2013-04-28 acrylian, i just ask a question about working/not working things and sait wich theme it comes from. So if someone needs it, he could find it out there. And if someone talk about it, he also can see what i mean and agree/disagree... As the album thump, but not in the random image sliding function. This is we talking about, and the photograph wants to publish the files, but dont want to show it in the image slider. (dont ask me why ) I mean i can write a little code wich checks if its a nude picture, but it is easier to use an existing function to hide or something like that. Without unpublish. But your answer is then: no, there is no existing function, right?! Index to Image Link - acrylian - 2013-04-28 I am just trying to put on the right track what to do if you want to do this. As for the thumb if it is published it will appear in the places where needed. There is no other way without making custom functions with specific checks (for a specific tag). Index to Image Link - FunkFlex2001 - 2013-04-28 I thought the same, give it a special tag, or maybe a database hide function to hide/unhide. Easiest way i think is the database function, but i dont want to go so deep in the core while an update could destroy all the work. But thx Index to Image Link - acrylian - 2013-04-28 Well the database hide function is not publishing.. |