Skip to content

templates.en_US

YanQS edited this page Dec 13, 2025 · 1 revision

Templates & Styles

Directory layout

  • includes/templates/: default template files shipped with the plugin (reply.php, new_comment.php, pending.php).
  • includes/templates/styles/{modern,plain,compact}/: style-specific template folders (each style contains its own template files).

Managing templates

  • The admin page provides an HTML editor (TinyMCE supported).
  • "Load selected style" will read the corresponding files from includes/templates/styles/<style>/ and attempt to write them into includes/templates/. If writing fails, the plugin will save templates into the pcn_templates option.
  • When saving: the plugin preserves PHP source code inside templates; however, for security the admin "Preview" strips PHP before rendering to avoid executing server-side PHP.

Template variables

  • Common variables: {{blogname}}, {{parent_author}}, {{parent_content}}, {{reply_author}}, {{reply_content}}, {{comment_link}}, {{unsubscribe_url}}.

Customization & fallback

  • Keep custom templates under version control or in a child theme. If you want to prevent style file writes, make includes/templates/ read-only — the plugin will then use the database-backed template fallback.

主页 (Home)中文English

安装与升级 (Installation and Upgrade)中文English

模板与样式 (Templates and Style)中文English

日志与Cron (logs&cron)中文English

国际化 (Localization)中文English

变更日志 (Changelog)中文English

Clone this wiki locally