


Sharing Empire CMS uses user-defined functions to get the number of published news
Add user-defined function
1. The function content is as follows:
The code is as follows:
<?php function user_newstotal($userid){ global $empire,$class_r,$dbtbpre; $query="select count(*) as total from {$dbtbpre}ecms_news WHERE userid=".$userid." "; $num=$empire->gettotal($query); echo $num; } ?>
2. Copy the function content to the e/class/userfun.php file
3. Log in to the backend->"Template Management"->"Manage Tags"->"Add Tags"
4. Call [newstotal]User ID[/newstotal]
Recommended to study "Empirecms Tutorial"
The above is the detailed content of Sharing Empire CMS uses user-defined functions to get the number of published news. For more information, please follow other related articles on the PHP Chinese website!

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

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1
Easy-to-use and free code editor

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

SublimeText3 Mac version
God-level code editing software (SublimeText3)

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
