Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: drop down menu for categories or albums  (Read 3588 times)

0 Members and 1 Guest are viewing this topic.

heavensportal

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 240
    • The Fantasy Attic
drop down menu for categories or albums
« on: December 07, 2014, 05:42:14 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: drop down menu for categories or albums
« Reply #1 on: December 26, 2014, 09:49:16 pm »

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.
Logged

heavensportal

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 240
    • The Fantasy Attic
Re: drop down menu for categories or albums
« Reply #2 on: December 26, 2014, 11:33:33 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: drop down menu for categories or albums
« Reply #3 on: December 27, 2014, 08:37:43 pm »

This will work, I just tested it in anycontent.php:
Code: [Select]
$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;
Logged

heavensportal

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 240
    • The Fantasy Attic
Re: drop down menu for categories or albums
« Reply #4 on: December 27, 2014, 09:10:55 pm »

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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: drop down menu for categories or albums
« Reply #5 on: December 27, 2014, 09:14:54 pm »

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.
Logged

heavensportal

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 240
    • The Fantasy Attic
Re: drop down menu for categories or albums
« Reply #6 on: December 27, 2014, 09:20:35 pm »

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.
Logged

heavensportal

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 240
    • The Fantasy Attic
Re: drop down menu for categories or albums
« Reply #7 on: December 27, 2014, 09:29:42 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.