Phpwind9.0 template creation, Forum style development

Source: Internet
Author: User
For each PHPer, PHPwind9.0 is the most exciting thing recently, but it takes some effort to understand it and develop it. Since the forum template mechanism is different from the portal template mechanism, I will focus on the general process of Forum template creation today .... "> <LINKhref =" http://www.php100.com//statics/style

 

For each PHPer, PHPwind9.0 is the most exciting thing recently, but it takes some effort to understand it and develop it. Since the forum template mechanism is different from the portal template mechanism, I will focus on the general process of Forum template creation today.

I. familiarize yourself with phpwind9.0's forum template mechanism.

In fact, phpwind9.0's template mechanism is similar to discuzx2.5. it is the default template (file in template) that comes with the program running itself. if we design a template and put it in the corresponding folder and specify it in the background, then the program will run the template style we created. The official purpose is to: make the template wherever you want to change it, which is convenient and flexible, if the whole site template is required to modify the style of a forum interface, the loss is worth the candle.

II. what files and directories are required to create forum template styles?

1. new style directory

2. css directory and css file (style)

3. js directories and js files (javascript, jquery, and other scripts)

4. images directory and image files (style images)

5. template directory and htm file (template)

6. Manifest. xml (installation configuration file)

Note:

① The new style directory must be created. the following 2 ~ Put all the files in the six items.

② The css directory must be created. to normalize the dev and build directories in the css Directory, dev is the css directory to be used by the style; the build directory is the directory that will generate the compressed css file after the compression css function is enabled in the background. Place a new css file in the dev directory.

③ Skip this option if you do not need js special effects for your style. Otherwise, you need to create a js directory and put the js file in it.

④ Skip this option if you do not need images for your style. Otherwise, you need to create an images directory and put the image file in it.

⑤ The template directory must be created to store the htm template file. The htm file name must correspond to the name of the relevant template under the official/template/bbs/; otherwise, the program cannot recognize it.

⑥ The Manifest. xml file must be created for background recognition and template installation.

As a supplement to the above description, please see: http://www.zsbs.net/phpwind/forum.html

3. template corresponding to the forum page

Many of my friends are asking for help in the experience site. for example, if you want to modify a certain page in a file, I will first describe the corresponding htm file on the page that I know, if you have any questions, follow the instructions. if you have the skills, post more instructions.

Forum homepage:/index. php? M = bbs

Template:/template/bbs/index_run.htm

The latest posting and last reply pages of the Forum ()

Template:/template/bbs/forum_run.htm, forum_run.htm, and forum_list.htm

Forum channel page:/index. php? M = bbs & c = cate & fid = 1

Template:/template/bbs/cate_run.htm and cate_digest.htm

Forum page:/index. php? M = bbs & c = thread & fid = 1

Template:/template/bbs/thread_run.htm

Forum Post reading page:/read. php? Tid = 1 & fid = 1

Corresponding templates:/template/bbs/read_run.htm and read_reply_floor.htm and read_floor.htm

In fact, we can certainly find some rules here:

For example, the general homepage is running a file similar to a certain _run.htm.

For example, if you see the name in the url path, the corresponding template is prefixed with the name.

For example, all files with the same prefix as the link url path are htm files related to this connection.

I hope you can give a similar picture. here, we will not give an example here. we hope more enthusiastic members will find it frequently!

4. create a template

I will not describe it in detail here. I will explain it in the next instance tutorial. The php if judgment and labels of the program cannot be embedded in the htm Code. It is good to map paths such as css, js, and images.

5. configure the Manifest. xml installation file

I understand this file as an important basis for the background to identify whether a new style exists. I did an experiment to create a new directory, put this configuration file in it, and then put this new style directory directly under/themes/forum/, the program background will be able to identify a new style. I will not talk about the importance of this configuration file. you just need to refer to the instructions.

For more information, see phpwind9.0 on the official website.

6. install a new template

1. place the new template directory under the program root directory/themes/forum/, and click cloud platform> Template management> Local installation> The new template is displayed in the background, select and install it.

2,After the installation is complete, it does not mean you are using it. please specify this style in the background forum settings,This function is very good. for example, I want to use Forum 1 as a blog, I want to use Forum 2 as information, and I want to use Forum 3 as a forum ...... Then you only need to make various style forum templates for matching. of course, currently only the forum binding style is required. the official website confirms that the channel page also has the style Binding Function. We look forward to the official phpwind9.0 version.

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.