This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Theme variation does not reset to default when theme is changed
#2
RE: Theme variation does not reset to default when theme is changed
Okay I think I get what you mean haha Tongue

Basically, if you choose a theme with a variation and then switch to a completly different theme it tries to use the same variation with that theme.

I'll look into this and post a fix soon Wink

Okay, fixed. Simply open / modules / theme_manager / code / controller.ext.php and replace:
Code:
static function ExecuteUpdateTheme($uid, $theme)
    {
        global $zdbh;
        $sql = $zdbh->prepare("
        UPDATE x_accounts
        SET ac_usertheme_vc = :theme
        WHERE ac_reseller_fk = :uid
        OR ac_id_pk = :uid2");
        $sql->bindParam(':theme', $theme);
        $sql->bindParam(':uid', $uid);
        $sql->bindParam(':uid2', $uid);
        $sql->execute();
        return true;
    }
with this instead:
Code:
static function ExecuteUpdateTheme($uid, $theme)
    {
        global $zdbh;

        /* Set CSS back to default */
        self::ExecuteUpdateCSS($uid, 'default');

        /* Set new theme */
        $sql = $zdbh->prepare("
        UPDATE x_accounts
        SET ac_usertheme_vc = :theme
        WHERE ac_reseller_fk = :uid
        OR ac_id_pk = :uid2");
        $sql->bindParam(':theme', $theme);
        $sql->bindParam(':uid', $uid);
        $sql->bindParam(':uid2', $uid);
        $sql->execute();
        return true;
    }
Before posting, update your profile with your OS, Sentora version and server type!

Reply
Thanks given by: Ron-e


Messages In This Thread
RE: Theme variation does not reset to default when theme is changed - by jacobg830 - 08-08-2014, 02:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
hat is the MYSQL default Username owenclements 1 4 ,224 08-07-2019, 11:13 PM
Last Post: Ron-e
I changed date and time from server and sentora does not work gabriel15959 1 4 ,669 03-20-2019, 11:52 PM
Last Post: fearworks
Change default language diogorocha18 7 15 ,982 11-16-2018, 12:33 AM
Last Post: nibaldo

Forum Jump:


Users browsing this thread: 1 Guest(s)