search
HomeCMS TutorialEmpire CMSSummary of commonly used tags in Empire CMS

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");
?>
_=$rs['bname']?> ;_=$public_r[sitename]?> Top-level column name website title

=$class_r[$GLOBALS[navclassid]][bname]?> 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}]

=$bqno?> ; [!--no.num--] Loop sequence number

=$bqsr['titleurl']?> =$bqr[title]?> =esub ($bqr[title],8)?>

[/e:loop]

=DoWapRepNewstext($r[newstext])?>

Time call tag:=date("Y-m-d",$bqr['newstime'])?>


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=$bqr[onclick]?> 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:

=$bqr['ftitle']?$bqr['ftitle']:$bqr['title']?>

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:

=stripslashes($r['newstext' ])?>

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 — это идентификатор старшего родительского столбца

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

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

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

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


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

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


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

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



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

}
?>
[/code]

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

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

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

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

=format_datetime($bqr[newstime],'Y-m-d')?>

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

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

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

$string=$ navinfor['newstext'];//Поле контента
$some="Summary of commonly used tags in Empire CMS$num=explode( $some,$string);
if(count($num)> 1){//Определить, есть ли в контенте картинки
?>
[!--newstext--]

}else{
?>
< ;div id="ad">Я реклама
[!--newstext--]

}
?>

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

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

=esub (htmlspecialchars(strip_tags($navinfor[newstext])),160)?>

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

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

=DoTitleFont($navinfor[titlefont],$navinfor[title])?>

Smart label:

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

=DoTitleFont($bqr[titlefont],$bqr[title])?>

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

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

=DoTitleFont($bqr[titlefont],esub($bqr[title],32,'...')) ?>

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

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.