Table of Contents
discuz template syntax, discuz template
Directly execute PHP code tag:
Directly output variables, which is equivalent to PHP's <?php echo $my_var; ?>. The curly braces can be omitted but are not recommended. (The module program can only be called here after processing):
Ad embed point code:
Plug-in hook tag:
Loop syntax (multiple loops possible)
DIY area and background data call tag:
Discuz! After the language pack is loaded, the usage in the template file:
Home Backend Development PHP Tutorial discuz template syntax, discuz template_PHP tutorial

discuz template syntax, discuz template_PHP tutorial

Jul 13, 2016 am 09:56 AM
class discuz source temp host template of parse grammar

discuz template syntax, discuz template

Discuz! Look at this document!

  • Directly execute PHP code tag:

    //Equivalent to
    //Equivalent to
    //Equivalent to
    //Equivalent to
    • $announcements
    //Generally, the output content is not a simple variable
    //Usage conditions: 1-Variables need to be processed by functions 2-The output is a variable, not an array
  • Ad embed point code:

    //This is discuz embedded advertising. It is recommended that you customize the advertising space. The customized advertising space will automatically generate the calling code in the background. We only need to paste it. Just copy
  • Plug-in hook tag:


    hook is the keyword, which means index_top is defined as a hook
  • Loop syntax (multiple loops possible)

    Loop writing with array keys

    HTML statement for loop output

    Loop output HTML Statement
  • DIY area and background data call tag:

    //Try your best Avoid using the DIY function of discuz, because the maintenance is huge. You can directly customize the module or module code through the background
    {block XXX} (data call module)
  • Discuz! After the language pack is loaded, the usage in the template file:

    {lang forum_category_modedby}
    The language package is in the ./source/language/ directory and is stored in the form of a PHP array
  • www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/988270.htmlTechArticlediscuz template syntax, discuz template Discuz! The analysis of X template is mainly the ./source/class/class_template.php file It is parsed and processed. If you need to know more about it, please take a look at this file! ...
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    Detailed explanation of Discuz registration process: allowing you to easily modify personal information Detailed explanation of Discuz registration process: allowing you to easily modify personal information Mar 13, 2024 pm 12:21 PM

    "Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

    A must-have for Discuz users! Comprehensive analysis of renaming props! A must-have for Discuz users! Comprehensive analysis of renaming props! Mar 12, 2024 pm 10:15 PM

    A must-have for Discuz users! Comprehensive analysis of renaming props! In the Discuz forum, the name change function has always received much attention and demand from users. For some users who need to change their name, name change props can easily modify the user name, and this is also an interesting way of interaction. Let’s take an in-depth look at the renaming props in Discuz, including how to obtain them, how to use them, and solutions to some common problems. 1. Obtain name-changing props in Discuz. Name-changing props are usually purchased through points or the administrator

    Analysis of the meaning and usage of midpoint in PHP Analysis of the meaning and usage of midpoint in PHP Mar 27, 2024 pm 08:57 PM

    [Analysis of the meaning and usage of midpoint in PHP] In PHP, midpoint (.) is a commonly used operator used to connect two strings or properties or methods of objects. In this article, we’ll take a deep dive into the meaning and usage of midpoints in PHP, illustrating them with concrete code examples. 1. Connect string midpoint operator. The most common usage in PHP is to connect two strings. By placing . between two strings, you can splice them together to form a new string. $string1=&qu

    How to add PPT mask How to add PPT mask Mar 20, 2024 pm 12:28 PM

    Regarding PPT masking, many people must be unfamiliar with it. Most people do not understand it thoroughly when making PPT, but just make it up to make what they like. Therefore, many people do not know what PPT masking means, nor do they understand it. I know what this mask does, and I don’t even know that it can make the picture less monotonous. Friends who want to learn, come and learn, and add some PPT masks to your PPT pictures. Make it less monotonous. So, how to add a PPT mask? Please read below. 1. First we open PPT, select a blank picture, then right-click [Set Background Format] and select a solid color. 2. Click [Insert], word art, enter the word 3. Click [Insert], click [Shape]

    Analysis of new features of Win11: How to skip logging in to Microsoft account Analysis of new features of Win11: How to skip logging in to Microsoft account Mar 27, 2024 pm 05:24 PM

    Analysis of new features of Win11: How to skip logging in to a Microsoft account. With the release of Windows 11, many users have found that it brings more convenience and new features. However, some users may not like having their system tied to a Microsoft account and wish to skip this step. This article will introduce some methods to help users skip logging in to a Microsoft account in Windows 11 and achieve a more private and autonomous experience. First, let’s understand why some users are reluctant to log in to their Microsoft account. On the one hand, some users worry that they

    What are the syntax and structure characteristics of lambda expressions? What are the syntax and structure characteristics of lambda expressions? Apr 25, 2024 pm 01:12 PM

    Lambda expression is an anonymous function without a name, and its syntax is: (parameter_list)->expression. They feature anonymity, diversity, currying, and closure. In practical applications, Lambda expressions can be used to define functions concisely, such as the summation function sum_lambda=lambdax,y:x+y, and apply the map() function to the list to perform the summation operation.

    Detailed explanation of steps to modify Discuz domain name Detailed explanation of steps to modify Discuz domain name Mar 11, 2024 am 11:00 AM

    Detailed explanation of the steps to modify the Discuz domain name. Specific code examples are required. With the development and operation of the website, sometimes we need to modify the domain name of the Discuz forum. This may be due to brand change, website SEO optimization, or other reasons. No matter what the reason is, modifying the Discuz domain name is a process that requires careful operation. Today we will introduce the steps of modifying the Discuz domain name in detail and provide specific code examples. Step 1: Back up data. Before modifying the domain name, you must first ensure that the website

    Effects of C++ template specialization on function overloading and overriding Effects of C++ template specialization on function overloading and overriding Apr 20, 2024 am 09:09 AM

    C++ template specializations affect function overloading and rewriting: Function overloading: Specialized versions can provide different implementations of a specific type, thus affecting the functions the compiler chooses to call. Function overriding: The specialized version in the derived class will override the template function in the base class, affecting the behavior of the derived class object when calling the function.

    See all articles