Style template not completely modified tutorial _php basics

Source: Internet
Author: User
Tags error code

On their own a little experience, I hope to give the first contact template modified friends have a reference.

About template modification, quote star signature in a sentence "Learn html very important":

A style, in addition to changing pictures and color and then further into the template is modified.

Template is the HTML language plus PHP variables, the inside of these two things.
You can enter the system setup in the template editor, casually open a template, such as viewthread_post, personal feeling that the template is the most important, the second is the index header footer, each template is the forum which part, I believe you contact more natural will know, As the name implies also can see a lot. Index, header, footer these three is to enter the forum to see. Viewthread_post is what we see when we browse through posts.
From the Forum's current address can also find you want to modify the corresponding template, we look at a post, ie in the address is HTTP "//*****/viewthread.php?tid=****, if you want to modify this page, you need to find the template version of the Viewthread this big class ; There are a lot of small categories inside. Viewthread_post is one of them, it is about the post, the others are the forum jump, the signature related and so on. Many do not have to ignore it, we just modify the template, not too deep.


Nonsense not to say, modify template intuitive point, take out the Web page making Tools Dreamweaver,dw visualization is very convenient, above is the code, the bottom is the preview window. Also take template viewthread_post do example, your viewthread_post template code all copied into the DW Code window, in the bottom of the preview window can clearly see a post frame and variable.

There are only two kinds of things inside. ... $ip is to see the image of IP, the owner and administrator will appear this picture, $stars is the star of each member, $avatar is the avatar ... And so on, to modify the template is often to put these variables can be in the Web page in a different way, location display. At this point you can open an IE window, a forum post, looking at the forum posts and these DW preview window in the frame of the variable control, you know those variables corresponding in the forum posts are displayed what. Or you delete the template in a few variables to determine the changes, and then refresh the forum to see what changes, what is less to know.


As usual in the forum a number of common problems are required to modify the template to solve, such as the Forum legend needs to add a super moderator. All need to modify the corresponding template, the forum legend is displayed when the address is in index. PHP, then in this large category to find, see the name is known to be index_whosonline this template, find the relevant part to add. will not HTML will not be according to gourd painting ladle, according to the owner, the administrator added on it. and add a signature line, etc.
Seems to pull far, the bottom also said style related. The template has a preliminary understanding of the first to find a ready-made template modified to try. For example, a VBB style is good, the first to save the page as (of course, you feel good page, also said that part of the post), and then opened with DW,

We can use just one part of the post. Directly in the preview window to delete those things, delete and delete, the last one we want to keep a frame of a post can be, and then delete the superfluous, such as the original content of the post, posting time, etc., keep a clean page on it, (Or, of course, create a new DW window to open Viewthread_post's original template, look at this) and then take the variable in the viewthread_post template of discuz! one to the inside, and see which variables fit where, Of course, according to the original VBB arranged position is the best. The replacement is complete.

See what you've added, the frame width percentage or whatever you're playing, because different forums need to be modified and so on. Almost to the code window to copy and paste the code into your forum to cover your viewthread_post template, and then refresh to see your results, (note that the image to get to the path at the same time upload to your space) what is wrong, continue to modify and then modify.

In the meantime some code you paste into the DW may appear to be yellow error code, do not delete, retain its own role, see the specific situation.



This is just the example of Viewthread_post template, the main purpose is based on familiarity, modify the template, I believe that more contact with these are familiar with, later modified template, their own new style should be very comfortable. More to do their own original ... About the index section, which is the case, but note that a page of the forum needs several templates combined. Do not look at the template alone, to modify, and sometimes need to consider a classification of the overall situation. There is landscaping forum is also more than frame picture, I beautify the effect of immediate, the impact of the speed also need to consider. If you care very much about speed, adding a picture will have an impact. But a style is also very important to the impression of a forum. This is not much to say.
A complete style, some details, to the forum's scroll bar color well collocation, plus a set of appropriate mouse pointer (all need IE6.0 support) \logo, so that the forum to achieve a unified and harmonious effect.

The template is all based on the combination of HTML language and variables, so again, it is important to learn HTML, if you understand a little HTML language, I believe I wrote these will not have to look at. Further in, you need to know some PHP, at least the basic syntax. For example, "PHP in front of quotes to add \" I only know this now: D

Listen to Big C, later version (now is already) to adopt Multimode version, the existing template structure may have a little change, then a forum can use a variety of styles and do not have to be limited to modify the template can not be used another. ......  in the Infinite vision
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.