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 high-efficiency random call tag PHP code

Empire cms high-efficiency random call tag PHP code Program Notes Empire cms

High-efficiency random selection: <?php $num=$empire->num("select tagid from {$dbtbpre}enewstags"); $randnum=100; $randids=''; $randdh=''; for($i=1;$i&lt;=$randnum; $i++)"...
👁 379
Empire CMS batch extracts the first picture of the news text content as a SQL statement for the title thumbnail

Empire CMS batch extracts the first picture of the news text content as a SQL statement for the title thumbnail Program Notes Empire cms

Please back up your database before running the following script! The "News Body Text" field stored in the text file is not available! To use the "News Body Text" field as the primary table, use the following SQL statement: `UPDATE phome_ecms_news SET titlepic = CONCAT(Replace(SUBSTRING_INDEX(SUBSTRING_INDEX(newstext, '"src...`
👁 150
The use of custom fields in Empire Navigation

The use of custom fields in Empire Navigation Program Notes Empire cms

[e:loop={&quot;select classid,classname from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,classid desc&quot;,0,24,0}] &lt;?p…
👁 248
Empire cms retrieves columns based on column id

Empire cms retrieves columns based on column id Program Notes Empire cms

Empire cms calls the column list php code based on the column id&lt;?php /******Parameter configuration begins******/ //If the parameters are left blank, all will be called $classid = &quot;&quot;; /******Parameter configuration ends******/ if(empty($classid)){ $where = &quot;isla…
👁 247
Empire CMS fields, add information processing functions in the background

Empire CMS fields, add information processing functions in the background Program Notes Empire cms

Preface: When adding or modifying fields, you can configure the "Backend Addition Information Processing Function," "Backend Modification Information Processing Function," "Frontend Addition Information Processing Function," or "Frontend Modification Information Processing Function." These allow you to specify separate functions for processing field content; this approach is commonly used for models that have special requirements regarding the storage format of field content. Below is a brief explanation of the basic steps for creating and configuring these processing functions: 1. Write the processing function; 2. Copy the function to e/c...
👁 386
Creation of search form for empire cms7.5

Creation of search form for empire cms7.5 Program Notes Empire cms

It's best to carefully review this code before replacing the form you want to clone; otherwise, if any errors occur, I won't be held responsible. <form action= "!--news.url--]e/search/index.php" method= "post" name= "searchform"...
👁 548
How to retrieve the sub-table fields from the Empire CMS list page?

How to retrieve the sub-table fields from the Empire CMS list page? Program Notes Empire cms

To access the content of a sub-table field within a list template, you should use the "list.var support program code." Below is an example of list.var template code used to retrieve the "newstext" field from a news sub-table: $fr=$empire->fetch1("select newstext from {$dbtbpre}ecms_news_data_{$r...
👁 229
Empire cms7.5 adds TAG auxiliary plug-ins in batches

Empire cms7.5 adds TAG auxiliary plug-ins in batches Program Notes Empire cms

This plugin is merely a supplementary add-on; the Empire version does not matter – either 7.5 or 7.2 will work. Duplicate tags will not be successfully inserted. PHP code: <?php require('../e/class/connect.php'); require('../e/class/db_SQL.php'); $link=db_connect(); $e...
👁 242
How to use sql statement to delete all article information in empire cms7.5 and let the ID start from 1

How to use sql statement to delete all article information in empire cms7.5 and let the ID start from 1 Program Notes Empire cms

The Empire CMS system can be completely emptied using the following SQL statements – this includes all article content, categories, tags, and member groups. If you have just purchased a new template and the data contained within it does not meet your requirements, you can use the following SQL commands: `TRUNCATE `[!db.pre!]ecms_news`;` or `TRUNCATE `[!db.pre!]ecms_news_check`...`.
👁 156
Empire CMS uses smart tags to call the "previous article" and "next article" of the current article

Empire CMS uses smart tags to call the "previous article" and "next article" of the current article Program Notes Empire cms

To retrieve the "Previous Article" and "Next Article" codes for the current article using the Lingdong Tag in EmpireCMS: [e:loop={'selfinfo',1, 0, 0, 'id&lt; '.$navinfor[id].'','id desc'}] &lt;a href=&quot;&lt;?php echo $bqsr[titleurl];$pre='tr...
👁 263
1 18 19 20 21 22 23