What is the core class TypeLink.class.php of Dreamweaver?
What is the core class TypeLink.class.php of Dreamweaver?
DreamWeaver DEDECMS core class TypeLink.class.php
Recommended learning: DreamWeavercms
DedeCMS Summary notes of the core class TypeLink.class.php. Learning PHP is about reference and analysis, so that you can master more.
Note: '//' represents an additional comment added by myself
Class TypeLink { var $typeDir; var $dsql; var $TypeID; //+ 类别ID var $baseDir; //+ 站点根网址 var $modDir; //+ 模板目录 var $indexUrl; //+ 主页链接地址 var $indexName; //+ 主页链接名 var $TypeInfos; //+ 类目信息 var $SplitSymbol; //+ 栏目位置的间隔符号 var $valuePosition; //+ 主页 > 国内 > 两会动态 > (带连接) var $valuePositionName; //+ 主页 > 国内 > 两会动态 > (不带连接) var $OptionArrayList; //+ 类目下拉列表
Function 1, get a link to a certain category
The code is as follows:
//获得某分类连接的URL function GetOneTypeUrl($typeinfos) { return GetTypeUrl(); } //获得某个类目的超链接信息 function GetOneTypeLink($typeinfos) { $typepage = $this->GetOneTypeUrl($typeinfos); $typelink = "<a href='".$typepage."'>".$typeinfos['typename']."</a>"; return $typelink; }
Function 2: Get a link list of a certain category, such as: 'Category 1>Category 2>'.
The code is as follows:
//islink 表示返回的列表是否带连接 //+ SplitSymbol 栏目位置的间隔符号 dede系统默认为'-' function GetPositionLink($islink=true) { //+ 获得 主页链接名 $indexpage = "<a href='".$this->indexUrl."'>".$this->indexName."</a>"; …… …… else { if($islink) { $this->valuePosition = $this->GetOneTypeLink($this->TypeInfos); if($this->TypeInfos['reid']!=0) { //调用递归逻辑 $this->LogicGetPosition($this->TypeInfos['reid'],true); } $this->valuePosition = $indexpage.$this->SplitSymbol.$this->valuePosition; return $this->valuePosition.$this->SplitSymbol; } else { $this->valuePositionName = $this->TypeInfos['typename']; if($this->TypeInfos['reid']!=0) { //调用递归逻辑 $this->LogicGetPosition($this->TypeInfos['reid'],false); } return $this->valuePositionName; } } } //获得某类目的链接列表,递归逻辑部分 function LogicGetPosition($id,$islink) { $this->dsql->SetQuery(" SQL查询语句 "); $tinfos = $this->dsql->GetOne(); if($islink) { //+ 列表带连接 $this->valuePosition = $this->GetOneTypeLink($tinfos).$this->SplitSymbol.$this->valuePosition; } else { //+ 列表不带连接 $this->valuePositionName = $tinfos['typename'].$this->SplitSymbol.$this->valuePositionName; } if($tinfos['reid']>0) { //+ 递归 $this->LogicGetPosition($tinfos['reid'],$islink); } }
Function three, to obtain the advanced search function of category list, that is, highsearch.php, this function is used
The code is as follows:
//hid 是指默认选中类目,0 表示“请选择类目”或“不限类目” //oper 是用户允许管理的类目,0 表示所有类目 //channeltype 是指类目的内容类型,0 表示不限频道 function GetOptionArray($hid=0,$oper=0,$channeltype=0,$usersg=0) { return $this->GetOptionList($hid,$oper,$channeltype,$usersg); } function GetOptionList($hid=0,$oper=0,$channeltype=0,$usersg=0) { return $this->OptionArrayList; } //+ 为下级类目递归加上 '-' function LogicGetOptionArray($id, $step, $oper=0) { }
Function four,
//Get the categories related to this class, this function is applied to
//$typetype in template tag {dede:channel}{/dede:channel} The value is: sun lower-level classification self same-level classification top top-level classification
The code is as follows:
function GetChannelList($typeid=0,$reid=0,$row=8,$typetype='sun',$innertext='', $col=1,$tablewidth=100,$myinnertext='') { } }
The above is the detailed content of What is the core class TypeLink.class.php of Dreamweaver?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to import css into DreamWeaver: 1. Place the HTML template file in the "templets" folder; 2. Change the suffix of the HTML file to ".htm"; 3. Add "{dede:" in front of the original style path: global.cfg_templets_skin/}" can be used.

It is a common situation to encounter problems when installing Dreamweaver. One of the possible problems is that php7.0 cannot be successfully installed. In this article, we will explain how to solve this problem.

Dreamweaver is a very famous CMS. It is used by many websites due to its simplicity and ease of use. Its backend is developed using PHP, and the latest official version is Dreamweaver PHP 5.7. In this article, we will explore the new features and advantages of DreamWeaver PHP 5.7 version.

The database is the core of website operation and stores important information such as user data and article content. Therefore, the backup and recovery of database files is particularly important during website operation. For websites built using Dreamweaver CMS, the recovery of database files is also a critical task. This article will introduce in detail the recovery method of Dreamweaver CMS database files, and provide specific code examples to help users quickly restore website data and ensure the normal operation of the website. 1. Back up the database file. Before restoring the database file, you first need to ensure that it has been

DreamWeaver is a very popular website construction system, and its architecture is based on the PHP language. Therefore, Dreamweaver requires PHP to run. So, specifically, how many PHPs are needed to weave dreams? This is not a simple question. This article will introduce the PHP version and number of components required for Dreamweaver from the following aspects.

cms is not Dreamweaver, cms refers to content management system, and Dreamweaver is just a kind of cms; Dreamweaver cms refers to Dreamweaver content management system, and content management system is a kind of WEB front-end and back-end office system or process. A software system between websites; cms has many excellent designs based on templates, which can speed up website development and reduce development costs.

Dreamweaver CMS is an open source content management system developed based on PHP5 and is widely used in the field of website construction. It is very important for developers to master the key points of Dreamweaver PHP5. This article will introduce some key points and provide specific code examples to help readers better understand and apply DreamWeaver PHP5. 1. Files included in the development of DreamWeaver CMS often require data sharing and code reuse between different files. PHP's file inclusion feature is an effective way to solve this problem. In DreamWeaver CMS, often

Dreamweaver requires PHP version 5.2 and above. The installation method: 1. First install PHP and configure the environment; 2. Download the DedeCMS installation package and extract it to the root directory of the website; 3. Open the website URL and follow the prompts to complete the installation; 4. After the installation is complete, you can access the Dreamweaver backend through http://localhost/yourwebsite.
