Hongmu Notes
Home Program Notes pbootcms introduces public file code
Program Notes PbootCms

pbootcms introduces public file code

pbootcms introduces public file code

1. Nested references to template files

{include file=***.html}

Instructions for use:

It can be used in nesting, for example: index.html nests a head.html, and head.html nests comm.html at the same time.

Supports the use of subdirectories, such as: {include file=comm/*.html}

2. Time formatting tag

style=*

For example: content list time formatting [list:date style=Y-m-d], content details page time formatting {content:date style=Y-m-d}

Instructions for use:

The time formatting tag has the same syntax as PHP time formatting. They are replaced by different letters, and any characters can be interspersed in the middle, such as: Y-m-d, Y/m/d, Y year m month d day, etc.

Note: Y represents the complete year, y represents the simplified year, m represents the month, d represents the day, H represents the hour, i represents the minute, s represents the second, such as the complete time: style='Y-m-dH:i:s', for more information, please refer to PHP time formatting syntax, reference link: http://php.net/manual/zh/function.date.php

3. HTML tag removal

drophtml=1

For example: content list content [list:content drophtml=1], content details page content {content:content drophtml=1}

Instructions for use:

It is generally used when a piece of plain text needs to be retrieved from a special location such as the homepage. In this case, it is generally used in conjunction with the following content interception tags.

4. Content interception tags

Length interception uses len= or lencn= , using the second one will avoid the problem of inconsistent lengths between Chinese and English. One English character counts as half a word.

(V1.3.5+) When intercepting content, you can use more='*' to set the ellipsis content. If you set more='', the ellipses will not be displayed.

For example: content list title interception [list:title len=10], content details page time formatting {content:title len=10}

substr=x,y intercept a section

substr intercepts the length of the string and passes two numbers. The first is the starting position and the second is the interception length. If there is only one number, all the following numbers will be intercepted.

Instructions for use:

When using content interception, please note that if it is html content, you need to remove the html before intercepting, otherwise it may cause the html to be misplaced, such as: [list:content drophtml=1 len=50]

5. Other formatting tags

dropblank=1, remove whitespace characters, such as newlines, tabs, etc.

decode=1 decodes data html characters. If it is equal to 0, it will not be decoded (including the source code that has been decoded). This tag is generally not used.

decimal=* number of decimal places

unit=* Capacity unit, which can be kb, mb, gb, tb, pb, eb

operate=* (New in V2.0.4) Number operations (support +-/%), for example, add 1000 to the number of visits [list:visits operate=+1000], and find the remainder of the sequence number [list:i operate=%2]

lfield="a,b" (new in V2.0.5) limits list data query fields to improve big data performance, such as lfield="title,content"

mark=1 (new in V2.0.5) marks the search result keywords in red, such as: [search:title mark=1];

6. Custom labels

{label:*}

Instructions for use:

Define it in the background "Global Configuration > Custom Label", and use the corresponding name in the front desk to call it.

7. Breadcrumb tags

{pboot:position}

Parameter description:

separator=* separator, optional, default is >>

separatoricon=* Split icon, optional, if using icon font: separatoricon='fa fa-angle-double-right'

indextext=* Home page text, optional, default is "Home page"

indexicon=* Home page icon, optional, if using icon font: indexicon='fa fa-home'

8. Current URL

{pboot:httpurl}

Instructions for use:

Adaptively obtain the current accessed URL, mainly used when the website path prefix needs to be used, such as output: https://www.pbootcms.com

9. Current page

{pboot:pageurl}

Instructions for use:

Adaptively obtain the complete address of the currently visited page

10. QR code generation label

{pboot:qrcode string=*}

Instructions for use:

Used to generate QR code images corresponding to text, which can be used on product list pages or detail pages to generate QR codes for each product: {pboot:qrcode string={pboot:httpurl}{content:link}} or {pboot:qrcode string={pboot:pageurl}

11. Program running time

{pboot:runtime@} 使用时@去掉

Instructions for use:

Used to output page running time/caching time. Please remove the backslash when using it.

12. Message verification code

{pboot:checkcodestatus}

Instructions for use:

Used to determine whether the message verification code is turned on, so that the page can control the display of the verification code icon.

13. Site map

http://domain/index.php/sitemap

http://domain/index.php/sitemap.xml

Instructions for use:

The system uses a dynamic site map, which does not need to be generated. The access address is the real-time map, and the output format is xml. Of course, you can also open it and save it as a map file.

If you have turned on pseudo-static, the address will not contain index.php.

14. Image scaling and cropping (v1.3.5+)

There are four parameters in total for image scaling and cropping:

Parameter: width= height= maxwidth= maxheight=

Usage, such as: [list:ico width=100]

Instructions for use:

The four parameters can be used in combination. Here, a cached image with a changed image size will be generated. The cached image is a cropped image, but the original uploaded image remains unchanged.

If you don't want to change the size and crop the image, but just want to zoom in and out, then please use CSS to control it.

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Addition of message function to pbootcms website

Addition of message function to pbootcms website Program Notes PbootCms

Scope of application of message board tags: can be used anywhere on the entire site Tag function: used for users to submit messages and retrieve message records 1. Message submission form<form action="{pboot:msgaction}" method="post"> Contact person:<input type="tex…
👁 174
What are the call tags of pbootcms content page?

What are the call tags of pbootcms content page? Program Notes PbootCms

Content Detail Page Tag – Scope of Use: To be used on content detail pages, including both single-page and list-based detail pages. – Function: Outputs relevant information about the current content: {content:id} – Content ID; {content:scode} – Category Code; {content:subscode} – Subcategory Code; {content:sortname} – Category Name; {content:su... – Subcategory Name.
👁 267

Recommended reading

Responsive freight logistics transportation website template – 0996

Responsive freight logistics transportation website template – 0996 Practical Collection Yiyou template

An EyouCMS responsive website template designed specifically for the freight and logistics industry. Its efficient, modern design effectively showcases logistics services, delivery networks, and corporate strength. This template helps logistics companies present their brand online and attract both e-commerce and corporate clients. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS (...
👁 61
Responsive automotive engine parts website template 0997

Responsive automotive engine parts website template 0997 Practical Collection Yiyou template

This EyouCMS responsive template is ideal for the automotive engine and accessories industry. Its professional automotive design style enables effective display of engine products, automotive parts, technical specifications, and maintenance services. It helps automotive parts enterprises showcase their products online and attract customers from the automotive aftermarket. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | Eyou...
👁 44
Responsive, marketing-oriented automotive parts website template – 0998

Responsive, marketing-oriented automotive parts website template – 0998 Practical Collection Yiyou template

An EyouCMS responsive website template designed specifically for the automotive parts marketing industry. Its professional marketing-oriented design enables effective presentation of automotive parts products, technical specifications, brand advantages, and after-sales support. This template helps automotive parts enterprises showcase their products online and attract targeted customers. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS...
👁 36
Resource website typecho001 template

Resource website typecho001 template Program Notes Typecho

typecho001 template template please do not modify the folder name of this template. The folder name is: typecho001 1.4 Fix the js output problem on the article page 1.3 Fix the error prompt when the plug-in is not installed Optimize the list page code output 1.2 Fix the comment function and add a custom homepage title 1.1 Fix the comment reply asymmetry function Add a separate title setting function on the homepage Add the website favicon.ico icon Add one...
👁 198
Responsive automotive maintenance service website template – 0999

Responsive automotive maintenance service website template – 0999 Practical Collection Yiyou template

This EyouCMS responsive template is ideal for the automotive maintenance services industry. Its professional automotive design style enables effective presentation of vehicle maintenance services, repair services, technical teams, and customer reviews. It helps automotive service providers attract car owners online and enhance their brand image. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS...
👁 55
Modification of typecho paging style

Modification of typecho paging style Program Notes Typecho

Sir, times have changed! Typecho is currently the most perfect solution, because Baidu can only see the code of fixed thinking. The actual generated HTML code is breathtakingly clean and fully customized, including adding classes to the li element, adding classes to the a element, adding classes to the previous page and next page, and removing the li tags that come with typecho to express more. I can even add some text to the content inside...
👁 516