Home  >  Article  >  CMS Tutorial  >  Summary of commonly used tags in Empire CMS

Summary of commonly used tags in Empire CMS

silencement
silencementforward
2019-11-26 14:22:212785browse

Summary of commonly used tags in Empire CMS

Determine whether the member is logged in

if(!$_COOKIE[ecmsmlusername]){
$srr="Login Visible";
}else{
$srr="[!--lbsly--]";
}
?>
[!--news.url--]skin /default/

[e:loop={"select classid,classname,bname from phome_enewsclass where classid='$GLOBALS[navclassid]'",1,24,0}]<? =$bqr[bname]?>[/e:loop]

[e:loop={"select * from phome_enewsclass where classid='$GLOBALS[navclassid]'",1 ,24,0}]<?=$bqr[bname]?>[/e:loop]

$fcr=explode ('|',$class_r[$GLOBALS[navclassid]][featherclass]);
$topbclassid=$fcr[1]?$fcr[1]:$GLOBALS[navclassid];//Get the top level of the current column Column ID
$rs=$empire->fetch1("select * from phome_enewsclass where classid=$topbclassid");
?>
_ Top-level column name website title

Get the name of the current column
[!--pagetitle--] or <?=$class_r[$GLOBALS[navclassid]][bname]?>


isgood=1 First-level recommendation

firsttitle=1 First-level headline

[e:loop={10,3,0,0}] 10Current column, 3 displays the number of items,

[e:loop={4,1000,0,1,'leib="Property Market News"','id DESC'}] 1 has pictures displayed.

[e:loop={"select * from phome_ecms_xtgg where firsttitle=1 order by id DESC limit 20",6,24,0}]




[/e:loop]

Time call tag:


List page

Your current location :[!--newsnav--]

[!--no.num--]

[!--show.listpage--]

content page

[!--info.next--]Next post[!--info.pre--]Previous post

Use [!--onclick--] smart tags for universal tags Use Clicks

The code is as follows:

$titleurl=sys_ReturnBqTitleLink($navinfor); Get the URL of the current page
$url = "http://".$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF']; Get the URL of the current page

sql statement

The code is as follows:

//Number of applicants
$num=$empire->gettotal("select count(*) as total from phome_enewsfeedback where kft='".$navinfor[title]."'" );
?>

The calling sql statement often used by Empire CMS:

Please note that if it is version 7.0 of Empire, you need to remove checked=1

The code is as follows:

1. Select * from [!db.pre!]ecms_news where checked=1 order by newstime desc limit 10
1. Select * from [! db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc limit 10
 3, select * from [!db.pre!]ecms_news where checked=1 order by onclick desc limit 10# based on popular articles ## 4. Select * from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc limit 10
 5. Select * from [!db.pre!] based on comment ranking ecms_news where checked=1 order by plnum desc limit 10
 6, select according to digg ranking * from [!db.pre!]ecms_news where checked=1 order by diggtop desc limit 10
 7, select according to voting ranking * from [!db.pre!]ecms_news where checked=1 order by votenum desc limit 10
 8, select according to download ranking * from [!db.pre!]ecms_news where checked=1 order by totaldown desc limit 10
 9, select * from [!db.pre!]ecms_news where checked=1 order by infopfen desc limit 10

Tips included:


php ternary conditions Operator:

The code is as follows:

When calling the editor content in Smart or PHP query, you need to add stripslashes and delete the backslashes. For example:

The code is as follows:

Current information ID of the content page:

The code is as follows:

$navinfor['id']

List content template information ID :

The code is as follows:

$r['id']

Current column name:

The code is as follows:

$class_r [$GLOBALS['navclassid']]['classname'];

The parent column of the current column:

The code is as follows:

$class_r[$GLOBALS['navclassid']]['bclassid'];

Псевдоним текущего столбца:

Код выглядит следующим образом:

$class_r [$GLOBALS ['navclassid']]['bname'];

Подстолбец текущего столбца:

Код следующий:

$class_r[$GLOBALS ['navclassid']][ 'sonclass'];

Оцените, является ли текущий столбец последним столбцом:

Код выглядит следующим образом:

$class_r[$ GLOBALS['navclassid']]['islast '];

Есть ли в текущем столбце проверенная информация:

Код следующий:

$GLOBALS['num ']==0 означает отсутствие информации

Введите метод записи пути php в Empire cms (например, файл находится в корневом каталоге)

Код следующий:

Исключить верх, заголовки, рекомендации и т. д., дополнительные условия sql:

Код следующий:

'istop=0 and isgood=0 и firsttitle=0'

Идентификатор верхнего столбца:

$bclassid =$class_r[$GLOBALS[navclassid]][bclassid];
$bbclassid=$class_r[$bclassid][ bclassid];
echo $bbclassid;
?>
$bbclassid — это идентификатор старшего родительского столбца

Переход на указанную страницу после отправки, входа в систему, отзыва, сообщения и т. д.:

Код выглядит следующим образом:

< input type=hidden name=ecmsfrom value="Адрес возврата">

Количество собранной статистики:

Код следующий:

$favas=$empire->gettotal("выберите count(*) как общее количество из {$dbtbpre}enewsfava, где id='$navinfor[id]' и classid='$GLOBALS[navclassid]'");
?>
Это список количества коллекций этого сообщения

, объединенный с элементами для определения текущего. Информация не предоставляется:

if($GLOBALS['num']=='0'){
?>

Извините, временно Ни одной новости!


}else{
?>
[!--empirenews.listtemp--][! --empirenews.listtemp--]
}
?>
[/code]

Динамическое использование:

Имя веб-сайта:< ;?=$public_r['sitename']?>
Адрес веб-сайта:

Собственная функция преобразования времени империи:

Код выглядит следующим образом:

Эта функция имеет свое собственное решение, которое довольно хорошо и рекомендуется.

Определить, есть ли в контенте картинки. Если картинки нет, то реклама в тексте будет отображаться. Если картинка есть, то она не будет отображаться:

Код такой следует:

$string=$ navinfor['newstext'];//Поле контента
$some="$num=explode( $some,$string);
if(count($num)> 1){//Определить, есть ли в контенте картинки
?>
[!--newstext--]
}else{
?>
< ;div id="ad">Я реклама


[!--newstext--]
}
?>

Перехват и добавление тегов фильтра:

Код следующий:

Content Страница или смарт-тег поддерживает атрибут title
Страница контента:

Код следующий следующий:

Smart label:

Код выглядит следующим образом:

Атрибут заголовка подсчета слов перехвата заголовка:

Код следующий следует:

Выше приведен все содержание этой статьи, надеюсь, вам всем понравится.

The above is the detailed content of Summary of commonly used tags in Empire CMS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:www.word666.com. If there is any infringement, please contact admin@php.cn delete
Previous article:How to use js+css to achieve the highlight effect of the current column in Empire CMSNext article:How to use js+css to achieve the highlight effect of the current column in Empire CMS

Related articles

See more