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: Theme Switch - how to reset  (Read 1780 times)

0 Members and 1 Guest are viewing this topic.

ericr23

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Theme Switch - how to reset
« on: March 22, 2023, 10:42:06 pm »

I changed my user-agent to test Theme Switch on my desktop, but now it won't revert. How can I reset it after I've reverted my user-agent?
Logged

ericr23

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Theme Switch - how to reset
« Reply #1 on: March 23, 2023, 10:14:22 pm »

(I would have expected it to revert automatically upon detecting that I am back to my desktop user-agent.)
Logged

ericr23

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Theme Switch - how to reset
« Reply #2 on: March 24, 2023, 09:16:41 pm »

In the Theme Switch codebase, perhaps there needs to be an "else" routine with the following:
Code: [Select]
    if ($mobile_browser > 0) {
        define('MOBILE_BROWSER', TRUE);
        if (!$superCage->cookie->keyExists($CONFIG['cookie_name'].'_mobile_theme')) {
            define('MOBILE_VIEW', TRUE);
            if ($CONFIG['theme'] != $CONFIG['theme_switch_mobile_theme'] && !$superCage->get->keyExists('theme')) {
                $USER['theme'] = $CONFIG['theme_switch_mobile_theme'];
                user_save_profile();
                header('Location: '.urldecode($REFERER));
            }
        }
    }
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1539
  • aka 'i-imagine'
    • Home Page
Re: Theme Switch - how to reset
« Reply #3 on: March 28, 2023, 03:34:38 pm »

Quote
How can I reset it after I've reverted my user-agent?

To reset the theme to default use: yourdomain . com/index.php?theme=xxx.

Note that the theme=xxx request will reset any page the user happens to be on. Any theme on
the server can also be selected by naming the theme:  yourdomain . com/index.php?theme=eyeball
 

ericr23

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Theme Switch - how to reset
« Reply #4 on: March 28, 2023, 05:50:34 pm »

OK -- thanks.
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 21 queries.