forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 themes (visuals) => Topic started by: Sweetener on October 20, 2019, 05:51:56 pm

Title: Dropdown sortorder menu with lang configs
Post by: Sweetener on October 20, 2019, 05:51:56 pm
I was looking through the forum and I found this https://forum.coppermine-gallery.net/index.php?topic=69704.0 (https://forum.coppermine-gallery.net/index.php?topic=69704.0)

Sadly, I get this (check ss.png file) with just {TITLE} and not Title or Order by Title

Is there anyway to put $lang_thumb_view['sort_ta'] (and the other ones) into that code in the theme.php?
Title: Re: Dropdown sortorder menu with lang configs
Post by: Sweetener on October 20, 2019, 06:24:48 pm
Also the {PAGE} doesn't put the page number on the link
Title: Re: Dropdown sortorder menu with lang configs
Post by: ron4mac on October 20, 2019, 10:14:24 pm
Look at my respond theme for how it might be done. I did it there (though I don't remember the details).
https://forum.coppermine-gallery.net/index.php/topic,79594.msg385872.html#msg385872
Title: Re: Dropdown sortorder menu with lang configs
Post by: Sweetener on October 20, 2019, 10:23:51 pm
Look at my respond theme for how it might be done. I did it there (though I don't remember the details).
https://forum.coppermine-gallery.net/index.php/topic,79594.msg385872.html#msg385872

yes I found your theme too. Sadly I don't know/understand how to put your code into my theme, because I went through the theme.php and everything seemed so confusing
Title: Re: Dropdown sortorder menu with lang configs
Post by: Sweetener on October 20, 2019, 10:59:51 pm
Look at my respond theme for how it might be done. I did it there (though I don't remember the details).
https://forum.coppermine-gallery.net/index.php/topic,79594.msg385872.html#msg385872

I managed to put it but it doesnt work ? https://mabelphotos.net/thumbnails.php?album=138 (https://mabelphotos.net/thumbnails.php?album=138)
Title: Re: Dropdown sortorder menu with lang configs
Post by: ron4mac on October 20, 2019, 11:36:04 pm
You need to include the sorting javascript functions from the respond theme somewhere in yours.

Code: [Select]
// thumbnail sort selection
function sort_go_page (sbd) {
wloc = 'thumbnails.php?album='
+ js_vars.sort_vars.aid
+ '&page='
+ js_vars.sort_vars.page
+ '&sort=' + sbd;
window.location = wloc;
}
function sort_sel_sbd (elm) {
sort_go_page(elm.value);
}
function sort_sel_val (elm) {
sort_go_page(elm.value + js_vars.h5r_sort.charAt(1));
}
function sort_sel_dir (elm) {
sort_go_page(js_vars.h5r_sort.charAt(0) + elm.getAttribute("data-dir"));
}

Title: Re: Dropdown sortorder menu with lang configs
Post by: Sweetener on October 20, 2019, 11:43:39 pm
You need to include the sorting javascript functions from the respond theme somewhere in yours.

Code: [Select]
// thumbnail sort selection
function sort_go_page (sbd) {
wloc = 'thumbnails.php?album='
+ js_vars.sort_vars.aid
+ '&page='
+ js_vars.sort_vars.page
+ '&sort=' + sbd;
window.location = wloc;
}
function sort_sel_sbd (elm) {
sort_go_page(elm.value);
}
function sort_sel_val (elm) {
sort_go_page(elm.value + js_vars.h5r_sort.charAt(1));
}
function sort_sel_dir (elm) {
sort_go_page(js_vars.h5r_sort.charAt(0) + elm.getAttribute("data-dir"));
}

Thank you so so much it worked!!!! Just one last question, is there anyway to put the option "Order by" instead of the selected option?
What I mean is that they will have the Order by when they open the album for the very first time
Title: Re: Dropdown sortorder menu with lang configs
Post by: Sweetener on October 21, 2019, 12:10:35 am
You need to include the sorting javascript functions from the respond theme somewhere in yours.

When I select the option it doesn't show the selection in the menu...  :( I mean the get ordered but the option stays as File Name up
Title: Re: Dropdown sortorder menu with lang configs
Post by: ron4mac on October 21, 2019, 04:12:13 am
Make sure the theme_display_thumbnails function in your theme.php has $USER declared in its globals.
Title: Re: Dropdown sortorder menu with lang configs
Post by: Sweetener on October 21, 2019, 06:30:08 am
Make sure the theme_display_thumbnails function in your theme.php has $USER declared in its globals.
I can't be more thankful for all your help. Thank you so much