Hongmu Notes
EmpireCMS – Random Article Thumbnail Generation and Article-Embedded Image Replacement

EmpireCMS – Random Article Thumbnail Generation and Article-Embedded Image Replacement Program Notes Empire cms

I collected hundreds of thousands of articles, only to discover that none of them had thumbnails—which looked downright ugly, absolutely terrible!! So, with just a few simple clicks, I wrote some code to generate random thumbnails and assign one to every article! Code 🔒 Hidden content: Available to members only <?php $biao = "phome_"; // Table prefix $fbiao = "news"; // Table name requ...
👁 341
EmpireCMS Filtering Function

EmpireCMS Filtering Function Program Notes Empire cms

The built-in variable filtering function in EmpireCMS is frequently used during secondary development or when creating templates; mastering this function means you won't need to write your own filtering method, which saves a significant amount of code. (1) Numerical variables can be processed using the (int) or intval functions; example: $page=(int)$.Get[' page ']; or $page=intval($.Get[' page']; (2) Variables containing decimals...
👁 220
PHP function to replace image links in an article with randomly selected links

PHP function to replace image links in an article with randomly selected links Language Notes PHP

A PHP function for matching image links within an article using regular expressions and replacing them with specified image links: `function replaceImageLinks($content, $newImageLink) {// Match the src attribute within <img> tags $pattern = '/<img.*?src="(.*?)".*?>';`
👁 192
EmpireCMS Software Download Site – WAP + PC Dual-Platform Adaptive Templates (021)

EmpireCMS Software Download Site – WAP + PC Dual-Platform Adaptive Templates (021) Practical Collection empire template

An exceptionally high-quality template – during the testing phase, all other website links in the database have been replaced; feel free to use it! The preview video includes a collector tool, but please don't examine it closely – the extraction password is hidden 🔒. To view the hidden content, leave a comment. If no password prompt appears on the download page, the default password is: www.4s5.cn.
👁 312
Empire CMS Blog/News Responsive Template Theme – 020

Empire CMS Blog/News Responsive Template Theme – 020 Practical Collection empire template

A relatively simple blog-themed template collected from the web – ready to use after installation and testing! The previous Libushi website seems to be no longer available, so I didn't feel the need to modify the content there; however, I have optimized the page loading performance, making it much smoother now. If you're building a content aggregation website, you can use this template for your needs; if you're creating a blog or news site, it's also perfect for that! It has a wide range of uses – feel free to choose the one that suits you best! The template comes with 20,000 sample records for testing – feel free to give it a try!
👁 244
Empire CMS Q&A Question Bank – WAP + PC Dual-Device Adaptive Template 019

Empire CMS Q&A Question Bank – WAP + PC Dual-Device Adaptive Template 019 Practical Collection empire template

It can be used to build Q&A platforms (such as Q&A websites or question banks), or as a general knowledge portal – either way works perfectly! It comes with a built-in membership center! Preview image.
👁 233
Empire CMS Comic Adaptive Dual-Platform (WAP + PC) Website Template 018

Empire CMS Comic Adaptive Dual-Platform (WAP + PC) Website Template 018 Practical Collection empire template

I spent an entire afternoon fixing numerous broken CSS rules and external image buttons; simultaneously, I meticulously converted the IIS pseudo-static rule set into Nginx pseudo-static rules by referencing them exactly as they were! For this template, I successfully deployed it both on mobile devices and on desktop computers; I also carefully reviewed the code and optimized certain sections, ensuring that all functions work properly! This template is fully functional; however, the test data images are hosted on another website (that website is currently...).
👁 800
Empire CMS – Template inspired by Toutiao website; multi-user self-media platform source code (includes data, WAP + PC versions) – 017

Empire CMS – Template inspired by Toutiao website; multi-user self-media platform source code (includes data, WAP + PC versions) – 017 Practical Collection empire template

Fixed the thumbnail issue – the display looks fine. This is a dual-platform template (WAP + PC) – preview image: Installation Instructions: 1. Delete the `install.off` file located in the `/e/install/` directory, then upload the source code to the root directory of your website. 2. Visit `http://your-domain/e/install/index.php`, and enter your MySQL database credentials to complete the installation. 3. Use the username and password you provided during the installation process...
👁 386
Use PHP to batch rename files in a folder, starting from number 1 while keeping the file extensions unchanged.

Use PHP to batch rename files in a folder, starting from number 1 while keeping the file extensions unchanged. Language Notes PHP

Function: 🔒 Hidden content: Viewable after logging in – function renameFiles($dir) { // 获取目录下所有文件 $files = glob($dir './'); if (empty($files)) {return;} $i = 1; foreach ($files as $file)...
👁 166
Selects a random file from a specified folder and returns its file name.

Selects a random file from a specified folder and returns its file name. Language Notes PHP

A PHP function to randomly retrieve a file name from a specified directory: 🔒 Hidden content: Viewable after logging in. `function getRandomFileName($dir) {// /*... */; if (empty($files)) {return null;}`
👁 287
1 280 281 282 283 284 315

🔥 Popular articles

Empire CMS smart label call field collection

Empire CMS smart label call field collection Program Notes Empire cms

Collect and classify all fields that support smart tag calls into Empire CMS smart tags: [e:loop={column ID/topic ID, number of items displayed, operation type, only display pictures with titles, additional SQL conditions, display sorting}] Template code content [/e:loop] Calling time: <?=date('m-d',$bqr[newstime])?> <?=dat…
👁 3771
Imperial cms imitation website tutorial corresponding notes

Imperial cms imitation website tutorial corresponding notes Program Notes Empire cms

Hello everyone, welcome to learn the imperial cms imitation website tutorial. I am Hong Mu qq1810216796 QQ exchange group: 9589723231 Imperial cms website installation. Hello everyone, welcome to learn the imperial cms imitation website tutorial. I am Hong Mu qq: 1810216796 qq exchange group: 958972323 Build an imperial program. If you have a server and have built an imperial website on the server, then...
👁 3424
Empire cms7.5 payment upgraded and optimized version of the library sample automatically generates word/PDF documents paid copy download with payment system member center whole site template source code sitemap Baidu push + installation tutorial 014

Empire cms7.5 payment upgraded and optimized version of the library sample automatically generates word/PDF documents paid copy download with payment system member center whole site template source code sitemap Baidu push + installation tutorial 014 Practical Collection empire template

This set of templates has a complete member center on mobile and PC. The member center template is also very good! By the way, there are also corresponding locomotive collection rules! Regarding installation, upload the direct installation version, install it directly, and then restore the data in the background. There is a view more on the mobile phone. If there is a problem, you can copy the view more code in index.js on the PC. If it has not taken effect yet, please check whether the js file renderings are referenced...
👁 2712