installing discuz
16-11-2022, 13:30
I promised to write this instruction here, well, I'm doing it. Because there is no such topic on the Internet at all - as someone already said, there are problems with manuals on Chinese engines. I will not delve into the wilds, and tell you my opinion about what this may be related to... And I will not even explain why it is absolutely impossible to touch the default single template (and believe me, I have something to tell you), but I will make this very template on my website, screen it and write immediately.
In general, are you ready to follow me to make a copy of the default style in order to mock it without touching the main one? Then go ahead! (am I having a good time on a Sunday night? ;) )
Step 1, mandatory if you do not have a new resource (reinstall the new one in five minutes if you mess up somewhere).
BACKUP!!!!!!!
I have a new one. Another trace of the completely killed folders of the installation has not cooled down)
Step 2.
We take the usual folder of the default template, pull it out of the carefully stored distribution kit or download it from the site to your computer (however, you can copy and put it right on the hosting, rename it if you know how to use FTP or at least the file manager of the hoster).
Who does not know, the template folder is located in /public_html/template/ and is called default
or upload/template/, if you take it from the downloaded distribution.
Step 3.
Rename. It is better to take a simple name (without any tricks with numbers, hyphens and other symbols).
Of course, we write the name in Latin. I hope you don't need a screen for this step?)
We remember it accurately and firmly, every letter, mistakes are fraught. Write it down! Once again, so as not to forget!
I chose hi.
Step 4.
Go to the folder and find the discuz_style_default file.xml
Found it? Great!
We open it using notepad++ or any other webmaster editor.
No Windows notebooks!!!!! Absolutely!!! If there is nothing acceptable, download notepad++ from the official website, it is free. Convenient. And in general, if you don't have any, then start with this, then you can evaluate and choose.
Opened? We are considering. You will see something like the following:
Do you think this is a variant of Chinese non-hieroglyphs? You're wrong. This file is opened in the wrong encoding.
If everything is fine in this place, that is, Chinese characters or Latin characters are displayed, then.... either the editor determined the desired encoding (ISO-8859-1) automatically, or.... hmm. We need to think about what other reasons there may be for this phenomenon... But the point is - don't change anything then. Although if the editor (there are a lot of them, I can't know everything) asks later in which encoding to save the changes, choose exactly what I said, it is indicated in the file itself in the first line.
<?xml version="1.0" encoding="ISO-8859-1"?>
Copy the code
For those who have krakozabry, it is necessary to change the encoding to UTF-8 (without BOM), in the notepad this is done through the "Encodings" menu
Now everything will be right - normal Chinese characters.
You ask. what is normal in this, and I will answer that in our situation it is possible to edit only in this way.
Hooray, we got to the fifth step - editing.
Step 5.
Huge, requiring care and not implying haste.
Editing. CAREFULLY! Do not remove unnecessary parentheses, this is not a "little thing" for you, but the syntax!!!
Hieroglyphs in the paragraph
<item id="name"><![CDATA[默认风格]]></item>
Copy the code
we replace it with our own name:
<item id="name"><![CDATA[hi]]></item>
Copy the code
Next line
<item id="templateid"><![CDATA[1]]></item>
Copy the code
Here it is, the cherished one, showing the engine which template (template id) to use!
Change to 2.
<item id="templateid"><![CDATA[2]]></item>
Copy the code
Next, we look for id ="tplname" is the name of the template, choose any, you can even Cyrillic. The default "Default Template" is also named.
<item id="tplname"><![CDATA[默认模板套系]]></item>
Copy the code
I change to
<item id="tplname"><![CDATA[The impossible is possible]]></item>
Copy the code
I'm too lazy to experiment whether these data are case-sensitive or not, it's just better to do everything as if they are case-sensitive.
Further:
<item id="directory"><![CDATA[./template/default]]></item>
Copy the code
Directory. Of course, we put our own one instead of the default one.
<item id="directory"><![CDATA[./template/hi]]></item>
Copy the code
Oh! It's interesting next:
<item id="copyright"><![CDATA[康盛创想(北京)科技有限公司]]></item>
Copy the code
Copyrights. In theory, until you change the style, you can't touch copyrights, but in fact... You can change it. Parentheses for joy, just do not move away;)
<item id="copyright"><![CDATA[Style by Zlata]]></item>
Copy the code
If you decide to upload your own additional styles and images, edit also
<item id="styleimgdir"><![CDATA[]]></item>
<item id="imgdir"><![CDATA[]]></item>
Copy the code
But don't forget to add these daddies to the style right away! However, those who know how all this is added will not read this manual... So leave it for now, then finish it when you need it.
We save and translate our file back to krakozyabry, ugh, that is, to the original format ...
Step 6.
Rename this file, replacing part of the name (default) with a code word, I got it discuz_style_hi.xml
Step 7.
Upload the entire renamed folder with the edited renamed file to the server.
Step 8.
Go to the admin panel.
Interface - templates. In the empty fields, enter the name and directory of YOUR new template:
Step 9.
Then it should be clear.
Now go to the Interface Styles in the admin panel and install your new template. We translate the radio buttons to it.
It should end up like this:
And now you can edit, in which case, you now know how to make another one.
The previews can then be replaced with their own, they are in the same folder there, the curious have probably seen.
Done. The promised is fulfilled. The instruction is in front of you ...
In this topic I can suggest something for the lesson, but I say right away - I am provided with work and I do not do styles on Discuz... This is so, in order to avoid personal questions.
16-11-2022, 13:30
16-11-2022, 12:19
16-11-2022, 13:04
There are no comments
Information
Users of Visitor are not allowed to comment this publication.