Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[HELP] CMS Themes
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Universo" data-source="post: 438346" data-attributes="member: 82371"><p>First things first.</p><p>Do you know anything about css, html, php ??</p><p>If not, stop here, I will not code it for you.</p><p></p><p>If yes, follow my lead.</p><p>-You want to give users the option to change the theme,</p><p>1. Obviously you'll need 2 themed CSS for wich one, as for the black so to the light theme.</p><p>2. A button to change betwin them. This button will store the preference of the user for the theme in the db.</p><p>3. But for that you'll need to store it in a db (you can use the same as CMS just add the column "theme" at users table).</p><p></p><p>The simple logic is.</p><p>Add a request to the table at the global.php to guarantee it will affect every page in CMS. This request should refer to what the user preference is, if its dark theme or light theme.</p><p></p><p>This request will affect a variable placed in the path to the css in your index like this "./templates/style/<?php echo $ theme; ?> .css</p><p>$ theme will change if db return "dark" then the path will lead to ".templates / style / dark.css" SIMPLE!</p><p></p><p>The button ??? Man it could be a simple button to write the preference in the db at the column "theme", it could be placed where the hell you want ...</p><p></p><p>Hope you understand, I don't give the fish, I teach how to fishing xD</p><p>[doublepost=1535657570,1535657447][/doublepost]</p><p>He is with problem with simple html/php shit, don't destroy his life bringing javascript to it xD</p></blockquote><p></p>
[QUOTE="Universo, post: 438346, member: 82371"] First things first. Do you know anything about css, html, php ?? If not, stop here, I will not code it for you. If yes, follow my lead. -You want to give users the option to change the theme, 1. Obviously you'll need 2 themed CSS for wich one, as for the black so to the light theme. 2. A button to change betwin them. This button will store the preference of the user for the theme in the db. 3. But for that you'll need to store it in a db (you can use the same as CMS just add the column "theme" at users table). The simple logic is. Add a request to the table at the global.php to guarantee it will affect every page in CMS. This request should refer to what the user preference is, if its dark theme or light theme. This request will affect a variable placed in the path to the css in your index like this "./templates/style/<?php echo $ theme; ?> .css $ theme will change if db return "dark" then the path will lead to ".templates / style / dark.css" SIMPLE! The button ??? Man it could be a simple button to write the preference in the db at the column "theme", it could be placed where the hell you want ... Hope you understand, I don't give the fish, I teach how to fishing xD [doublepost=1535657570,1535657447][/doublepost] He is with problem with simple html/php shit, don't destroy his life bringing javascript to it xD [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[HELP] CMS Themes
Top