drop down menu for categories or albums drop down menu for categories or albums
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

drop down menu for categories or albums

Started by heavensportal, December 07, 2014, 05:42:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

heavensportal

I hope this is the right section toask this if not please move it to the right location.

Is there a way to create a drop down menu to allow the members to see the categories and/or albums that we have. We have quite a few and this would help no having to scroll to kingdom come to find an album to look at.

Something like the Theme Select would probably work.

Thanks and hope your holidays are safe and joyous.

Αndré

That's possible with some custom code. Do you just want to list your albums (without their category) or do you also need to display the category titles? I assume the albums should be ordered alphabetically by title? Please explain detailed what exactly you need.

heavensportal

Well like I said to appear where ever we want it to be shown and if they are to appear like the one we have for the image upload area is great.

I suppose that when it is like that if we add albums they will appear in the listing as usual.

Whenever you can get it done is alright, you are probably still busy with holiday things.

Thanks

Αndré

This will work, I just tested it in anycontent.php:
$options = album_selection_options();
echo <<<EOT
        <select class="listbox" onchange="if (this.options[this.selectedIndex].value) window.location.href='thumbnails.php?album=' + this.options[this.selectedIndex].value;">
        <option value="">{$lang_common['select_album']}</option>
        $options
        </select>
EOT;

heavensportal

Oh my you are fast...is there a way or where do I put this code to make sure it appears on all pages, like the theme selector does?

Αndré

You'd need to add a new token to template.html, like {MY_ALBUM_SELECTOR}. Then you need to replace that token either in the function pageheader or pagefooter, depending if you add it above or below the {GALLERY} token. I currently cannot give you a more detailed answer, as I don't have sufficient details. However, I already explained in several threads how to add and replace a custom token.

heavensportal

token? like the one for the {THEME_SELECT_LIST}

I will do a search for the token replacements/addons and see if I can make sense of it...I am worse than a blonde today...LOL

Thanks.

heavensportal

I totally forgot a link...this forum is my own and I use it to try things out on so

http://angelwingcreations.thefantasiesattic.net/forum/gallery/index.php

it has only one template whereas the one I want it for has several different templates.