Hongmu Notes
Home Program Notes Empire cms

Empire cms

Commonly used and practical Empire CMS codes – a collection of code snippets utilized in Empire CMS, such as those for creating and invoking navigation menus, implementing pagination, and performing various database queries, among others.

Empire cms adds custom lists and uses your own php code

Empire cms adds custom lists and uses your own php code Program Notes Empire cms

Secondary development for lists; <?php require('../../class/connect.php'); require('../../class/db_sql.php'); require('../../class/functions.php'); require('../../class/t_fu...');
👁 222
Empire cms, insert a picture in the first paragraph of the article

Empire cms, insert a picture in the first paragraph of the article Program Notes Empire cms

&lt;?php $img = '&lt;p&gt;&lt;img src=&quot;/skin/images/'.mt_rand(1,1).'.png&quot; alt=&quot;'.$navinfor['title'].'&quot;&gt;&lt;/p&gt;'; $pos = strp…
👁 203
Empire cms dynamic mode list page pseudo-static, new method

Empire cms dynamic mode list page pseudo-static, new method Program Notes Empire cms

Empire CMS can sometimes encounter issues where static lists fail to update automatically, or where newly updated articles do not appear immediately on the page. To address this seemingly minor issue, we have created a tutorial. The modified approach displays links to static web pages, but these pages actually operate in dynamic mode – i.e., they use pseudo-static URLs. The pseudo-static URL format is: http(s)://domain/section_filename/index_2.html – something like that! Pseudo...
👁 795
Empire's high-efficiency random calling function expansion

Empire's high-efficiency random calling function expansion Program Notes Empire cms

Key Concept Summary: 1. PHP function `ZQrand($classid, $num) {global $dbtbpre, $empire; /* Check whether the JSON file exists */ $file_arrays = glob(ECMS_PATH. "/d/json/*.json"); $file...`
👁 188
Empire Big Data Project Notes

Empire Big Data Project Notes Program Notes Empire cms

October 6, 2022:1. Create an aggregated table – the vanguard of big data! To create an aggregated table, use the following syntax: CREATE TABLE `i9j_cn`. `phome_book_1` (`id` INT(10) NOT NULL AUTO_INCREMENT COMMENT 'id', `book` VARCHAR(255) NOT NULL...
👁 148
Empire uses PHP to generate sitemap files

Empire uses PHP to generate sitemap files Program Notes Empire cms

This code can be used directly; however, one thing to note is that if your website contains a large number of articles, you may need to modify part of the code – it appears that Baidu has a limit on the number of links allowed in a sitemap. If the number of links is too high, it may not be optimal; sitemap code <?php /* Include files */ require('e/class/connect.php'); require('e/class/d...
👁 253
Empire cms gets the pictures inside the content php

Empire cms gets the pictures inside the content php Program Notes Empire cms

if(empty($add['titlepic'])){ $str = $add['newstext']; $isMatched = preg_match(&quot;/&lt;img .*?(?=src)src=\&quot;([^\&quot;]+)\&quot;/si&quot;, $str,…
👁 200
Empire cms 4 million article homepage high-efficiency calling code

Empire cms 4 million article homepage high-efficiency calling code Program Notes Empire cms

Due to the relatively low server specifications, using SQL's `RAND()` function for randomization is definitely not feasible—it's too slow. Therefore, I changed my approach: I first created a table with two fields—one for the article ID and one for the category ID—and then used this table to perform region-based randomization. This approach enables efficient randomization. However, there's a problem: relying solely on SQL isn't reliable, so I wrote some PHP code. After testing, the homepage loads within two seconds—but...
👁 210
The empire cms list page calls the tag tag

The empire cms list page calls the tag tag Program Notes Empire cms

$fr=$empire-&gt;fetch1(&quot;select infotags from {$dbtbpre}ecms_news_data_{$r[stb]} where id='$r[id]'&quot;); $infotags=$fr['infotags']; $r_tag=explo…
👁 301
Empire cms calling tag, pseudo-static version, smart calling

Empire cms calling tag, pseudo-static version, smart calling Program Notes Empire cms

[e:loop={&quot;select * from [!db.pre!]enewstags order by num DESC limit 20&quot;,0,24,0}] &lt;?php echo ' &lt;li class=&quot;submenu&quot;&gt;&lt;a t…
👁 279
1 4 5 6 7 8 10