Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does Imperial CMS invoke Custom list names

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

How does Imperial CMS invoke custom list names? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

How does Imperial CMS call custom list names?

This article describes how Imperial CMS invokes custom list names, and script House provides two implementations here, involving modifications to the underlying code of Imperial CMS. The details are as follows:

I. description of the problem:

You need to call up the custom list name, as shown in the following figure:

Using the original tag of Imperial CMS, you can only call the page title, but not the list name.

2. Solution:

Method 1:

First of all, you need to implement a custom list to call up the current column ID

If you can get the current column ID through $navclassid in the custom list, the problem becomes very simple. The SQL call using the smart tag is as follows:

The code is as follows:

[eParloop = {"select * from [! db.pre!] enewsuserlist where listid=$navclassid", 1Magne24recover0}] [/ e:loop]

So you can call up the list name!

Method 2:

Modify the Imperial CMS source code and add the call field to call the name directly.

The specific operations are as follows:

Step 1:

Open the e\ admin\ other\ ListUserlist.php file and find the refresh custom list function on approximately 147lines

Function DoReUserlist ($add,$userid,$username) {

Find this code in the find call database fields section of the function:

It is as follows:

$ur=$empire- > fetch2 ("select listid,pagetitle,filepath,filetype,totalsql,listsql,maxnum,lencord,listtempid,pagekeywords,pagedescription from {$dbtbpre} enewsuserlist where listid='". $listid [$I]. "'")

Add the listname field and change it to the following form:

The code is as follows:

$ur=$empire- > fetch2 ("select listid,listname,pagetitle,filepath,filetype,totalsql,listsql,maxnum,lencord,listtempid,pagekeywords,pagedescription from {$dbtbpre} enewsuserlist where listid='". $listid [$I]. "'")

As shown in the following figure:

Step 2:

Open e\ class\ functions.php and find the generating information list function function ListHtml ($classid,$fields,$enews=0,$userlistr= "") {on line about 2467

Add custom fields:

The code is as follows:

$GLOBALS ['navclasslistname'] = $enews==4?$userlistr [' listname']: "

As shown in the following figure:

At this point, you can use $GLOBALS ['navclasslistname'] to invoke the custom list name in the list template.

Thank you for reading! After reading the above, do you have a general idea of how Imperial CMS invokes custom list names? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report