Hongmu Notes
Home Program Notes Typecho

Typecho

Typecho is a combination of the two words type and echo, which came from the brainstorming of the development team. Typecho is developed based on PHP5 and supports a variety of databases. It is a lightweight open source blog program with a strong core, easy expansion, user-friendly experience, and smooth operation. Choose Typecho to build a unique personal web log publishing platform and enjoy the joy of creation.

typecho background custom field multi-selection

typecho background custom field multi-selection Program Notes Typecho

Typecho background custom field multi-select code is as follows, perform research, where the multi-select is the value corresponding to the option name, the default is the first one, mainly depends on the subscript $biaosi = new Typecho_Widget_Helper_Form_Element_Select('biaosi',array('1'=>&…
👁 228
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
Typecho article page comment style modification

Typecho article page comment style modification Program Notes Typecho

When you need to use typecho for template development, the default comment style is ugly. Therefore, comments need to be re-output or styled. The default comment template file path is: comments.php Mainly used related variables<?php $comments->gravatar('40', ''); ?> //Avatar has two parameters, size,...
👁 387
Typecho's API for adding, deleting, modifying and querying databases

Typecho's API for adding, deleting, modifying and querying databases Program Notes Typecho

Typecho database provides a very easy-to-use API, which is not much different from the native SQL writing method. At the same time, it also handles common SQL security issues, such as SQL injection. From a practical perspective, this article introduces common scenarios for typecho to operate databases and related API usage. Table creation and deletion During the development process of Typecho plug-in, you often need to create your own table. Typecho_… mentioned above
👁 551
Summary of methods for calling popular comment articles and calling latest articles in Typecho

Summary of methods for calling popular comment articles and calling latest articles in Typecho Program Notes Typecho

Typecho articles call the Typecho program. When designing a theme, the sidebar sometimes needs to call popular articles or the latest articles. We can call it directly through the script at the specified location. In this article, we will organize this method of calling articles, which can be directly called and used in templates where needed in the future. In fact, designing a theme is just that. After the static template is completed, it is called directly. The latest article calls <?php $t…
👁 295
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 2