DiscuzX2.5/X3 single page creation tutorial

Source: Internet
Author: User
The single-page PHP file is stored in the Forum root directory. Note: News is the template file name without the. htm extension. the template file is stored in the forum directory under the default style directory. 1. create a single-page php page, applicable to DIY and common single-page? Phpdefine (CURSCRIPT, archy); // A class ID of the body: require./source/cl. the php file on a single page is stored in the Forum root directory.
Note:: News is the template file name without the. htm extension. the template file is stored in the forum directory under the default style directory.

I, Create a single-page php page, Applicable to DIY and common single-page
Define ('curscript', 'Archie'); // A class ID of the body
Require './source/class/class_core.php'; // introduce the system core file
$ Discuz= & Discuz_ Core: instance (); // The following code creates and initializes an object.
$ Discuz-> init ();
Loadcache ('didtemplatename'); // DIY needs to load the cache
$ Navtitle = 'single-page title ';
$ Metakeywords = 'single-page keyword 1, single-page keyword 2 ';
$ Metadescription = 'single-page description ';
Include template ('DIY: forum/News'); // call the single-page template file
?>

II, Create a single-page template file news.htm
1. Code of the template file on a single page of common content:
 
 

$ _ G [setting] [bbname] » 
$ _ G [setting] [bbname] » 
$ Navtitle

 

 
 
 
 


Here is the content area of a single page.

 


 
 
The DIY code is, pay attention to the number when adding:
 
 
 

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.