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 `getAlbumLinkURL().getImageLinkURL()`, it returns the album link but not the image portion.
Any help would be appreciated, thank you.
Comments
Works fine for me, all folders with more than one image get shown.
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.
if (getNumImages() == 1) { show me the image direct } else { do all you do normal }
i think so, but this time ive not tested.
if (getNumImages() == 1) {
echo '<h3>getTitle())) . '">'.html_encode($randomImage->getTitle()).'</h3>'; } else { do all you do normal }
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?
In any case `$randomImage` must be an image object and that needs to be setup somehow. Within the `next_album` loop there is no "current image" so you have to setup it via the said object model first which image to get.
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".
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?!
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).
But thx