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
#1
Theme variation does not reset to default when theme is changed
I read on the ZPanel forum that every ZPanel staff is now on this forum so i'll try it here first.. Tongue
I am sorry but i think my knowledge of the english language is probably not good enough to explain the problem i have... but i give it a try:
The theme breaks if you select a new theme and you had previously selected a theme and with an not default theme variation.
So the "ac_usercss_vc" table is not set back to default when you select a new theme, so if the new theme does not have an theme variation with the same name it does not load all the css files.

My Sentora DemoMy GithubAuxio Github
Zentora themeS-Type themeCstyleX theme
flat-color-iconssmall-n-flat-icons

Sentora's development takes way too long, so i'm transitioning to HestiaCP.
Reply
Thanks given by:
#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
#3
RE: Theme variation does not reset to default when theme is changed
Thank you works like a charm, and that was fast!

btw, where is the thanks button? Tongue

I did found the reputation button... Big Grin

My Sentora DemoMy GithubAuxio Github
Zentora themeS-Type themeCstyleX theme
flat-color-iconssmall-n-flat-icons

Sentora's development takes way too long, so i'm transitioning to HestiaCP.
Reply
Thanks given by:
#4
RE: Theme variation does not reset to default when theme is changed
Your welcome Wink and thanks haha Big Grin
Before posting, update your profile with your OS, Sentora version and server type!

Reply
Thanks given by:
#5
RE: Theme variation does not reset to default when theme is changed
thanks button should be under right site of previous post where the edit button is...
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#6
RE: Theme variation does not reset to default when theme is changed
I am sorry but i do not see it...Huh
[Image: ka1iIeVl.png]

My Sentora DemoMy GithubAuxio Github
Zentora themeS-Type themeCstyleX theme
flat-color-iconssmall-n-flat-icons

Sentora's development takes way too long, so i'm transitioning to HestiaCP.
Reply
Thanks given by:
#7
RE: Theme variation does not reset to default when theme is changed
Changes have been merged to the Sentora Git repository Smile
Follow me on Twitter or find out more about me  at bobbyallen.me
Reply
Thanks given by: Ron-e
#8
RE: Theme variation does not reset to default when theme is changed
In classic mode i see the thanks button, but i do not like the classic mode..

My Sentora DemoMy GithubAuxio Github
Zentora themeS-Type themeCstyleX theme
flat-color-iconssmall-n-flat-icons

Sentora's development takes way too long, so i'm transitioning to HestiaCP.
Reply
Thanks given by:
#9
RE: Theme variation does not reset to default when theme is changed
Huh Hmmm, maybe I forgot to add it to the non-classic style. Will add it to my to-do list Wink

fixedWink
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by: Ron-e
#10
RE: Theme variation does not reset to default when theme is changed
If you want to/could also add the OS, Version and Server to the non-classic mode it would be perfect! Big Grin

My Sentora DemoMy GithubAuxio Github
Zentora themeS-Type themeCstyleX theme
flat-color-iconssmall-n-flat-icons

Sentora's development takes way too long, so i'm transitioning to HestiaCP.
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
hat is the MYSQL default Username owenclements 1 4 ,180 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 ,622 03-20-2019, 11:52 PM
Last Post: fearworks
Change default language diogorocha18 7 15 ,835 11-16-2018, 12:33 AM
Last Post: nibaldo

Forum Jump:


Users browsing this thread: 1 Guest(s)