Brief introduction
Daily rest, and then Baidu found some big guys' handsome beautification version, stating that the following tutorial comes from the network and will indicate that it is not fully reproduced at the bottom
Modification method
The biggest highlight of this modification is that you can switch the magic change style at any time to ensure that the pages of your little partners can be changed anytime, anywhere. Then, to do this, we must first download the magic change file. Download button
Note: this time, the file is large, and there are more than 5 modifications. Please be sure to back up the file you want to modify. If you say important things three times, you must back up, you must back up, you must back up. After downloading, we unzip the file and put it under our server. There are two folders in this compressed package. An independent CSS file can delete pictures, and the rest is best not to delete. The two folders are named "personality" and "compatible". Put them in the / usr/themes/handsome/assets / folder and another file named "color" Min.css, this file can only be opened when the transparent mode is turned on. I suggest replacing the original file. Please change the color The min.css file is placed in the usr/themes/handsome/assets/css/features folder to replace the original file.
Edible method
After completing the previous step, we began to modify the background code. No matter what method the partners use to open the file, we must remember to back up. If there is a heavy loss due to operation error, our site will not bear any consequences.
First open usr / themes / handsome / functions PHP file. Copy and paste the following code;
//Theme magic change selection $magic = new Radio('magic', array( '0' => _t('1. Original style'), '1' => _t('2. Compatible styles</br>'), '2' => _t('3. Personalized style') ), //Default choose '7',_t('Theme magic change style'),_t("</br>There are three models: the original transparent style,Compatible and personalized styles,<b style='color: red'>Note: the personalized version only supports the big picture mode.</b>") ); $form->addInput($magic);
Start pasting around line 227
Step 2: open usr / themes / handsome / component / header The PHP file copies the following code:
<?php $url =STATIC_PATH; $md =Handsome::$version.Handsome::$versionTag; if ($this->options->magic ==0){ echo "<link rel=\"stylesheet\" href=\"$url/css/handsome.min.css?v=$md type=\"text/css\" />"; } if($this->options->magic ==1){ echo "<link rel=\"stylesheet\" href=\"$url/compatible/handsome.min.css?v=$md type=\"text/css\" />"; echo "<link rel=\"stylesheet\" href=\"$url/compatible/party.css?v=$md type=\"text/css\" />"; } if($this->options->magic ==2){ echo "<link rel=\"stylesheet\" href=\"$url/personality/handsome.min.css?v=$md type=\"text/css\" />"; echo "<link rel=\"stylesheet\" href=\"$url/personality/party.css?v=$md type=\"text/css\" />"; } ?>
Please note: delete handsome. In line 57 Min.css file. Otherwise, code conflicts and repeated calls of CSS style files are likely to occur. Now it is declared here for emphasis. Start pasting around line 59
There is another change in this file. Please copy and paste the following code to the bottom: there is no attached figure in the last line
<?php if ($this->options->magic ==0){ }else{ echo "<canvas id=\"canvas\" class=\"wybj\"></canvas>"; } ?>
Save the file and prepare for the next step: open usr / themes / handsome / component / footer The PHP file copies the following code: <? php version. Handsome::versionTag; if (
}else{ echo "<script src=\"$url/personality/special.js?v=$md\"></script>"; } ?>
Paste the code at about 340 lines, ok!!!! If the browser does not display the style, please try to clean up the browser cache. The shortcut key is Ctrl+F5, or refresh the cdn cache. Thank you. So far, we save and refresh our background, select transparent mode, and select compatibility, personality or original in magic change style. If you don't want to use transparent mode, turn off transparent mode, The front end will not output this js
This magic change is based on the original link of the style changed in 5.1.1: https://www.lovexint.com/archives/145/