Discuz3.3 Fine imitation millet style whole station template making--1, new template scheme

Source: Internet
Author: User

Term Description:

Template-- a template is a bunch of HTML files that are named in a given way to specify the appearance of different pages throughout the forum. Tags- tags and templates work together to achieve the forum skin-changing function, where the label mainly controls what data the page displays, how many bars are displayed, etc. Style- style is an XML configuration file that configures the size, color, background color, and so on for some fixed-area fonts. For example, during the Spring Festival, the whole layout becomes festive red. Style This feature is essentially a technique that allows you to set the size, color, background color, etc. of a fixed-format text in a forum, such as a title list, directly in the background, without having to write CSS files separately. For the webmaster has the ability to encode, in fact, not much significance.

Discuz Template Production official description: http://faq.comsenz.com/library/template/made/made_extend.htm

This section contains an extended description of the template overview provided by Discuz. Please refer to the above URL for a preliminary understanding of discuz template production. The Discuz template file is located in the Web site root directory/template/directory. Where the subdirectory default is its template, the webmaster can create a new template directory under this directory to place its own template.

The Discuz template is a fixed file name for the HTM file. For example, the template file on the home page is called discuz.html. Where the home page template file for the default template is located at the site root directory/template/default/forum/discuz.html. Discuz has made two basic requirements for the template:

    1. Template name fixed-for different functions, the file name of the template is fixed, such as the first page of the template named Discuz.htm, plate of the main list page template file name forumdisplay_list.htm and so on. http://faq.comsenz.com/library/template/filelist/filelist_index.htm This URL gives the name of the functional area for each template file under the default template directory. All we have to do is follow this directory list and create the corresponding HTM file for the forum to change skin.
    2. The template file extension is fixed to the htm--html file with two extensions, HTM and HTML, respectively. Files with the HTM suffix are generally more common in early Linux. Now most of the HTML is the suffix, and this is the recommended practice.

Personally, Discuz is such a weird design that it's very difficult for new users to understand them. A good design should allow the user to freely select the template. For example, for the function of the Forum homepage, the user is free to decide whether to choose index.html or default.php or other text files under the X template scheme. Such a practice is more in line with the intuition of ordinary people. Subsequently, the author will make minor changes to the source code of Discuz, so that it can recognize the HTML suffix of the file (modified to identify the HTML suffix file or other suffix files, such as ASP, JSP, PHP and other code is similar, the user can refer to the modification). In the Discuz template directory, there is a special directory--common, the file in this directory is a non-mandatory template file, it is only the common parts of the template purification, its own optional, completely according to the idea of the creator.

Discuz Read the template rules (example of the first page template): First read the background specified in the template directory if there is a discuz.htm file, if present, directly as a template for this file, if not, then take the default template file of the discuz.html file as a template.

Discuz The main process of the new template scheme the new style scheme

Log in to the background, click the top "interface" ribbon, after the page refreshes, the left side will show about the "interface" function navigation, at this time select "Style management" on the left. Enter a custom style name in the new input area and click "Add". A set of empty style schemes is copied. (The style scheme is essentially a bunch of CSS and picture path settings, ignoring this, followed by details of the specific settings) and then choose to use this style (template) When browsing for devices. System provides a

Computer edition

Mobile Standard Edition

Mobile Phone touch screen version

Mobile phone minimalist version

Four options, where "Computer Edition" is required. Other can be ignored, the judgment here is filtered through the HTTP header. means that we can create four sets of styles and corresponding templates, respectively, for different visitors to provide different display results.

Second, the new template directory

Create a new template directory under the site root/template/and copy the Discuz_style_default.xml file from the default template directory to the new directory, modifying the file name: Discuz_style_ the new directory name. Xml. The template catalog suggests English characters. To prevent the server from not recognizing the Chinese directory. Then use Notepad to open the XML file for editing and modify the corresponding configuration item. For specific modifications see the official template making overview for a modified example:

Note: In the directory item, the path is consistent with the path to the template folder. In the TemplateID item, the specific value is modified to the ID of the corresponding style scheme (in the style scheme, click Edit, you can see the specific ID from the URL bar.) )

Third, the background to create a new template cover system

In interface-template management, add a template name (the recommendation and style name are consistent) and specify the correct path. See:

At this point, the new template scheme is done. Updates the cache once in the tools-update cache. The foreground style is the new template. At this point we will find that there is no change in the foreground, this is because we just created a template scheme, but did not establish a specific template file, the system detects that there is no template file, automatically adopted the default template schema of the corresponding template file (in the Discuz template read rules are described), so there is no change in the foreground. In the following chapters, we will make each template file, and the foreground will be changed accordingly.

Discuz3.3 Fine imitation millet style whole station template making--1, new template scheme

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.