Advanced search  

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

Pages: [1]   Go Down

Author Topic: Creates the album list drop down  (Read 4098 times)

0 Members and 1 Guest are viewing this topic.

pixstreet

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • pixstreet.co.uk
Creates the album list drop down
« on: May 17, 2012, 06:10:28 pm »

I wonder whether it is possible to implant something like   // Creates the album list drop down
function
from upload.php under menu in themes on each page.

Something like this:
Code: [Select]
<option disabled="disabled" selected="selected">{JUMP_TO_PAGE}</option>
In Theme switch (mobile mode) plugin for cpg1.5.x

Thank you for any help  :)
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Creates the album list drop down
« Reply #1 on: May 18, 2012, 02:17:41 am »

What are you trying to do?
(What would users be selecting from the list?)

pixstreet

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • pixstreet.co.uk
Re: Creates the album list drop down
« Reply #2 on: May 18, 2012, 09:59:51 am »

I would like to creates the album list in drop down version.

Users be able to choose an album from the list and jump to the album page.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Creates the album list drop down
« Reply #3 on: May 21, 2012, 02:52:18 pm »

I don't get why you mentioned the theme switch plugin. Do you want to add that feature to the plugin or do you want to provide that list in your theme?
Logged

pixstreet

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • pixstreet.co.uk
Re: Creates the album list drop down
« Reply #4 on: May 21, 2012, 11:43:12 pm »

Hi there, sorry for the confusion. Let me try and explain.

What I am wondering is if there is a plug in that will enable a user of my website to have a similar drop down feature. As I have available when I upload images into my gallery.

Example: When I log in as administrator I have a drop down feature that enables me to select the catergory I would like to uploading my photo into. I was wondering if a similar drop down plug in could be used to aid a viewer to jump between my galleries.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Creates the album list drop down
« Reply #5 on: May 22, 2012, 03:01:49 pm »

Copy this to your theme's theme.php file:
Code: [Select]
/******************************************************************************
** Section <<<pageheader>>> - START
******************************************************************************/
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;

    global $RESTRICTEDWHERE;
    $album_list = "<select class=\"listbox\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='thumbnails.php?album=' + this.options[this.selectedIndex].value\"><option>Select album</option>";
    $result = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} $RESTRICTEDWHERE");
    while ($row = mysql_fetch_assoc($result)) {
        $album_list .= "<option value=\"{$row['aid']}\">{$row['title']}</option>";
    }
    $album_list .= "</select>";

    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);

    $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    header("Content-Type: text/html; charset=$charset");
    user_save_profile();
    $template_vars = array(
        '{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => theme_page_title($section),
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu').$album_list,
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
        '{JAVASCRIPT}' => theme_javascript_head(),
        '{MESSAGE_BLOCK}' => theme_display_message_block(),
    );
   
    $template_vars = CPGPluginAPI::filter('theme_pageheader_params', $template_vars);
    echo template_eval($template_header, $template_vars);

    // Show various admin messages
    adminmessages();
}
/******************************************************************************
** Section <<<pageheader>>> - END
******************************************************************************/
Logged

pixstreet

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • pixstreet.co.uk
Re: Creates the album list drop down
« Reply #6 on: May 22, 2012, 03:22:55 pm »

thank you very very much  :) :) ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.