Hongmu Notes
Home Program Notes

Program Notes

In the final analysis, programmers taking notes is an efficient behavior of recording work experience. It can not only record the various technical problems encountered in the process of program development, but also record the beneficial experiences gained in learning technical knowledge. It can both help...

Empire CMS search template supports dynamic tag calling

Empire CMS search template supports dynamic tag calling Program Notes Empire cms

Open the /e/search/result/index.php file and search: require("../../class/connect.php"); require("../../class/db_sql.php"); require("../../data/d…
👁 343
Empire Navigation calls advanced php code

Empire Navigation calls advanced php code Program Notes Empire cms

Navigation code: <li class="<?=$GLOBALS[navclassid]?"":"current-menu-item"?>"><a href="[!--news.url--]">Homepage</a></li> <?php $sql=$e…
👁 3653
How to use smart tags to call the friendly links at the bottom of the Empire CMS homepage?

How to use smart tags to call the friendly links at the bottom of the Empire CMS homepage? Program Notes Empire cms

Website reciprocal linking – Dynamic tag invocation: <ul> [e:loop={'select * from [!db.pre!]enewslink order by lid',20,24,0}] <li> <a href="<?=$bqr[lurl]">">...
👁 279
Empire cms7.5 content is randomly retrieved (high efficiency simple version)

Empire cms7.5 content is randomly retrieved (high efficiency simple version) Program Notes Empire cms

High-efficiency function `user_randId($table='news'){ global $dbtbpre,$empire; $filePath = ECMS_PATH. 'e/maxID'.md5($table)`. „.txt"; // File path; if (file_exists($fileP...
👁 679
How to get the parent column id and parent column name of the current column id in empire cms

How to get the parent column id and parent column name of the current column id in empire cms Program Notes Empire cms

Method to retrieve the parent category ID and parent category name for the current category ID using EmpireCMS: <?php if ($class_r[$GLOBALS['navclassid'])[bclassid] == 0) {$classid=$GLOBALS['navclassid']; $classname=$class_r[$classid][c...
👁 213
Empire cms call search keywords

Empire cms call search keywords Program Notes Empire cms

Pseudo-static search <?php $urls = $_SERVER[&quot;QUERY_STRING&quot;]; $sid = explode(&quot;=&quot;,$urls); $sids = $sid[2]; $res = $empire->fetch1("select...");
👁 222
Empire cms uses sql to replace content field values ​​in batches

Empire cms uses sql to replace content field values ​​in batches Program Notes Empire cms

To perform batch content field value replacement using SQL with Empire CMS, use the following query: `UPDATE phome_ecms_news_data_1 SET newstext = REPLACE(newstext, 'Original', 'Current')`. Note: `phome_ecms_news_data_1` is the name of the data table; you may replace this with any valid table name. `newstext` is the field targeted for batch replacement. This query is designed for batch...
👁 205
The title code of the content page of the empire cms list page

The title code of the content page of the empire cms list page Program Notes Empire cms

Site Name: <?=$public_r['sitename']?&gt;站点链接:[!--news.url--]所有页面的关键词和描述调用代码:&lt;title&gt;[!--pagetitle--] - &lt;?=$public_r['sitename']?> <title>...
👁 378
Empire cms7.5 list pagination title display

Empire cms7.5 list pagination title display Program Notes Empire cms

For websites built using the EmpireCMS software, the title on the category list page is default set to be identical across all pagination pages – meaning the `title` tag remains the same from the first page to the last page of the category list – which can have negative impacts on website optimization. The EmpireCMS list page template tag `!--pagetitle--` returns the page number; to display the text "Page X" (where X is the page number), use the following configuration: `<title>...</title>`.
👁 296
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…
👁 3749
1 19 20 21 22 23