The sub-topic for calling Zhimeng arclist is not displayed. There are many solutions to this problem on the Internet, one of which is:
Open/include/taglib/arclist. lib. php with the code in lines 295-296 and find the following two lines of code:
If ($ CrossID = '') $ orwheres [] = 'Arc. typeid IN ('. GetSonIds ($ typeid ).')';
Else $ orwheres [] = 'Arc. typeid IN ('. GetSonIds ($ typeid).', '. $ CrossID .')';
Replace it with the following code:
If ($ CrossID = '') $ orwheres [] = '(arc. typeid IN ('. getSonIds ($ typeid ). ') OR arc. typeid2 IN ('. getSonIds ($ typeid ). '))';
Else $ orwheres [] = '(arc. typeid IN ('. getSonIds ($ typeid ). ','. $ CrossID. ') OR arc. typeid2 IN ('. getSonIds ($ typeid ). ','. $ CrossID. '))';
This method can solve the problem of not displaying secondary columns in the case of typeid = "2". If typeid = "2, 3, 8", it will not work if multiple columns need to be called.
To solve this problem, find row 262, $ orwheres [] = "arc. typeid IN ($ typeid )";
Directly Replace with: $ orwheres [] = "arc. typeid IN ($ typeid) or arc. typeid2 IN ($ typeid )";
For the cause of the problem, see the original code of arclist. lib. php: (typeid is the primary column id, and typeid2 is the secondary column id)
Find row 246:
// If multiple columns are specified, the subclass id is no longer obtained.
If (preg_match ('#, #', $ typeid) // if the typeid field matches a comma, that is, typeid calls multiple columns, for example, typeid = "2, 3, 8"
{
// If the getall attribute or homepage template is specified
If ($ getall = 1 | empty ($ refObj-> Fields ['typeid'])
{
$ Typeids = explode (',', $ typeid );
Foreach ($ typeids as $ ttid ){
$ Typeidss [] = GetSonIds ($ ttid );
}
$ TypeidStr = join (',', $ typeidss );
$ Typeidss = explode (',', $ typeidStr );
$ Typeidssok = array_unique ($ typeidss );
$ Typeid = join (',', $ typeidssok );
}
$ Orwheres [] = "arc. typeid IN ($ typeid)"; // the problem where the secondary topic issue cannot be called when typeid = '2,'
}
Else // if the typeid does not match a comma, it is to call a topic such as typeid = "2"
{
// Process cross columns
$ CrossID = '';
If ($ ctag-> GetAtt ('cross ') = '1 ')
{
$ Arr = $ dsql-> GetOne ("SELECT 'id', 'topid', 'cross ', 'crossid', 'ispart ', 'typename' FROM 'dede _ arctype 'WHERE id =' $ typeid '");
If ($ arr ['cross '] = 0 | ($ arr ['cross'] = 2 & trim ($ arr ['crossid '] ='' )))
{
$ Orwheres [] = 'Arc. typeid IN ('. GetSonIds ($ typeid ).')';
}
Else
{
$ Selquery = '';
If ($ arr ['cross '] = 1 ){
$ Selquery = "SELECT id, topid FROM 'dede _ arctype 'WHERE typename LIKE' {$ arr ['typename']} 'AND id <>' {$ typeid} 'AND topid <>' {$ typeid} '";
}
Else {
$ Arr ['crossid '] = preg_replace (' # [^ 0-9,] # ', '', trim ($ arr ['crossid']);
If ($ arr ['crossid ']! = '') $ Selquery =" SELECT id, topid FROM 'dede _ arctype 'Where id IN ('{$ arr ['crossid']} ') AND id <> '{$ typeid}' AND topid <> '{$ typeid }'";
}
If ($ selquery! = '')
{
$ Dsql-> SetQuery ($ selquery );
$ Dsql-> Execute ();
While ($ arr = $ dsql-> GetArray ())
{
$ CrossID. = ($ CrossID = ''? $ Arr ['id']: ','. $ arr ['id']);
}
}
}
}
If ($ CrossID = '') $ orwheres [] = 'Arc. typeid IN ('. GetSonIds ($ typeid ).')';
Else $ orwheres [] = 'Arc. typeid IN ('. getSonIds ($ typeid ). ','. $ CrossID. ')'; // the problem where the secondary topic cannot be called due to typeid = '2'
}