Home > Backend Development > PHP Tutorial > discuz template syntax, discuz template_PHP tutorial

discuz template syntax, discuz template_PHP tutorial

WBOY
Release: 2016-07-13 09:56:22
Original
1544 people have browsed it

discuz template syntax, discuz template

Discuz! Look at this document!

  • Directly execute PHP code tag:

    //Equivalent to
    //Equivalent to
    //Equivalent to
    //Equivalent to
  • Directly output variables, which is equivalent to PHP's . The curly braces can be omitted but are not recommended. (The module program can only be called here after processing):

      $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! ...
    source:php.cn
    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
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template