Get the App
SLTechnology News&Howtos  ›  Servers  › 

How does Imperial CMS invoke Custom list names

Shulou Source: shulou.com Published: 2022-06-02 03:37:22 11月03日 Update

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.

Tags: Name empire code method content field problem function article label column step home information underlying form data database file more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Xiaomi Apple OPPO Reno NVidia