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 obtains the system COOKIE variable function getcvar()

Empire CMS obtains the system COOKIE variable function getcvar() Program Notes Empire cms

Get the system COOKIE variable function syntax: getcvar($var,$ecms) Description: $var: is the variable name $ecms: 0 is to set the foreground COOKIE variable, 1 is to set the background COOKIE variable. This parameter can be omitted and defaults to 0. Usage example: getcvar('mlusername'), get the user name of the front-end login member getcvar('loginu...
👁 295
When developing the Empire plug-in, the filter function for input characters

When developing the Empire plug-in, the filter function for input characters Program Notes Empire cms

(1) Numeric variables can be processed with the (int) or intval function, for example: $page=(int)$_GET['page']; or $page=intval($_GET['page']); (2) Numeric variables with decimal points can be processed with the (float) or floatval function, for example: $money=(float)$money; or $...
👁 130
Typecho theme development

Typecho theme development Program Notes Typecho

In Typecho’s official theme development documents, there are very few development instructions related to article custom fields and theme settings. I also looked at the code of some open source themes to understand the development of custom fields and theme settings. Here I will briefly write about the definition and invocation of article custom fields and theme settings. Article custom fields After the article custom fields are defined, they will be displayed below the edit box on the article editing interface. Users can use the defined options...
👁 845
Typecho determines whether the plug-in is activated

Typecho determines whether the plug-in is activated Program Notes Typecho

When making templates, you may need to use plug-ins in some places. Then you need to check whether the plug-in is enabled, you can use the following plug-in: <?php $all = Typecho_Plugin::export();?> <?php if (array_key_exists('plugin name', $all['activated'])) : …
👁 162
Empire CMS database statement & SQL statement format

Empire CMS database statement & SQL statement format Program Notes Empire cms

Introduction to Imperial CMS extended SQL program writing, basic examples of Imperial CMS database statements & SQL statement formats: Note: The following examples are based on placing PHP files in the system root directory. Example 1: Connect to MYSQL program. (a.php)<?php require('e/class/connect.php'); //Introduce database configuration files and public function files requ…
👁 351
Empire cms retrieves the latest 10 message board reply messages

Empire cms retrieves the latest 10 message board reply messages Program Notes Empire cms

It could have been called using smart index tags, but I am used to using PHP code, so I wrote it in PHP code. php calls the latest 10 message board replies<?php $sql=$empire->query("select lyid,name,email,`mycall`,lytime,lytext,retext fro…
👁 267
Typecho calls the list of classified articles

Typecho calls the list of classified articles Program Notes Typecho

The number after pageSize represents the number of called articles; the number after mid represents the called category ID; Tip: The method to obtain the Typecho category ID is to move the mouse over a certain category name. The number after mid= displayed in the browser status bar is the category ID. Edit the current typecho theme template and add the following code where you want to call a category. Method 1: widget...
👁 360
TypechoWidget

TypechoWidget Program Notes Typecho

Through Typecho's Widget_Options, you can easily obtain Typecho's system information, or easily obtain related configurations, resource paths, etc. Commonly used Widget_Options functions and usage are listed here for your convenience. Obtain path information through Widget_Options and obtain built-in URL. Through this type of API, you can obtain some TE built-in features...
👁 193
Get all subcategories of the current parent category from the Typecho article page

Get all subcategories of the current parent category from the Typecho article page Program Notes Typecho

The article page obtains all subcategories under the current parent category. <ul> <?php $this->widget('Widget_Metas_Category_List')->to($categorys); ?> <?php while ($categorys->next()):…
👁 368
Typecho gets the name of the parent category

Typecho gets the name of the parent category Program Notes Typecho

$this->categories; can output all current categories, and then you can read it from the database yourself.
👁 156
1 20 21 22 23