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

Summary of commonly used tags in Empire CMS

Nov 26, 2019 pm 02:22 PM
Empire cms

Summary of commonly used tags in Empire CMS

Determine whether the member is logged in

<?php
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}]<title><? =$bqr[bname]?></title>[/e:loop]

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

<?php
$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
<title>[!--pagetitle--] </title> or <title><?=$class_r[$GLOBALS[navclassid]][bname]?></title>
<meta name="keywords" content="[!--pagekey--]" />
<meta name="description" content="[!--pagedes--]" />
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:

<?php
//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 (например, файл находится в корневом каталоге)

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

<?php include(ECMS_PATH."./bottom.php");?> ;

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

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

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

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

<?php
$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]'");
?>
<?=$favas?>Это список количества коллекций этого сообщения

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

<?
if($GLOBALS['num']=='0'){
?>
<p>Извините, временно Ни одной новости! </p>
<?
}else{
?>
[!--empirenews.listtemp--]<!--list.var1-->[! --empirenews.listtemp--]
<?
}
?>
[/code]

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

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

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

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

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

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

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

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

<?php
$string=$ navinfor['newstext'];//Поле контента
$some="<img ";
$num=explode( $some,$string);
if(count($num)> 1){//Определить, есть ли в контенте картинки
?>
[!--newstext--]
<?
}else{
?>
&lt ;div id="ad">Я реклама</div>
[!--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 of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Where is the imperial cms website map? Where is the imperial cms website map? Apr 17, 2024 am 10:48 AM

Where is the imperial cms website map?

Where are the settings for the mobile version of Empire CMS? Where are the settings for the mobile version of Empire CMS? Apr 17, 2024 pm 12:12 PM

Where are the settings for the mobile version of Empire CMS?

Where is the imperial cms resource network template? Where is the imperial cms resource network template? Apr 17, 2024 am 10:00 AM

Where is the imperial cms resource network template?

Where can I put the empire cms template file for easy use? Where can I put the empire cms template file for easy use? Apr 17, 2024 am 07:22 AM

Where can I put the empire cms template file for easy use?

Where to find the empire cms database configuration file Where to find the empire cms database configuration file Apr 17, 2024 am 06:42 AM

Where to find the empire cms database configuration file

Where is the automatic publishing interface of Empire CMS? Where is the automatic publishing interface of Empire CMS? Apr 17, 2024 am 09:03 AM

Where is the automatic publishing interface of Empire CMS?

Is empire cms free? Is empire cms free? Apr 17, 2024 am 11:24 AM

Is empire cms free?

Where is the Imperial CMS member center? Where is the Imperial CMS member center? Apr 17, 2024 am 04:45 AM

Where is the Imperial CMS member center?

See all articles