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: Dropdown sortorder menu with lang configs  (Read 13804 times)

0 Members and 1 Guest are viewing this topic.

Sweetener

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 64
Dropdown sortorder menu with lang configs
« 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

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?

Sweetener

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 64
Re: Dropdown sortorder menu with lang configs
« Reply #1 on: October 20, 2019, 06:24:48 pm »

Also the {PAGE} doesn't put the page number on the link

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Dropdown sortorder menu with lang configs
« Reply #2 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
Logged

Sweetener

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 64
Re: Dropdown sortorder menu with lang configs
« Reply #3 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

Sweetener

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 64
Re: Dropdown sortorder menu with lang configs
« Reply #4 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

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Dropdown sortorder menu with lang configs
« Reply #5 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"));
}

Logged

Sweetener

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 64
Re: Dropdown sortorder menu with lang configs
« Reply #6 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

Sweetener

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 64
Re: Dropdown sortorder menu with lang configs
« Reply #7 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

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Dropdown sortorder menu with lang configs
« Reply #8 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.
Logged

Sweetener

  • Contributor
  • Coppermine regular visitor
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 64
Re: Dropdown sortorder menu with lang configs
« Reply #9 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
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.