discuz模板语法,discuz模板
Discuz! X 模板的解析主要是 ./source/class/class_template.php 文件解析处理的,如果需要深入了解请可以看看这个文件!
直接执行 PHP 代码标签:
//相当于//相当于
//相当于
//相当于
//相当于
直接输出变量,等同于 PHP 的 , 花括号可以省略但不建议去掉。(模块程序处理后才能在这里调用):
- $announcements
//使用条件:1-变量需经函数处理 2-输出的是变量,不能是数组
广告的嵌入点代码:
//这是discuz内嵌广告,建议大家自定义广告位,自定义的广告位在后台会自动生成调用代码,我们只需要粘贴复制即可插件的钩子标签:
hook为关键词,意为将index_top定义为钩子
循环语法(可以多重循环)
带有数组键的循环写法循环输出的HTML语句
没有数组键的循环写法
循环输出的HTML语句
DIY 区域和后台数据调用标签:
//尽量避免使用discuz的diy功能,因为维护大家很大,可直接通过后台自定义模块或模块代码{block XXX}(数据调用模块)
Discuz! 语言包加载后,模板文件中的使用:
{lang forum_category_modedby}其中语言包在 ./source/language/目录下,以PHP数组形式存放
Statement
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
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article
What's New in Windows 11 KB5054979 & How to Fix Update Issues
3 weeks agoByDDD
How to fix KB5055523 fails to install in Windows 11?
2 weeks agoByDDD
InZoi: How To Apply To School And University
4 weeks agoByDDD
How to fix KB5055518 fails to install in Windows 10?
2 weeks agoByDDD
Roblox: Dead Rails – How To Summon And Defeat Nikola Tesla
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Atom editor mac version download
The most popular open source editor

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
