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}]
[e:loop={"select * from phome_enewsclass where classid='$GLOBALS[navclassid]'",1 ,24,0}]
$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
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
$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]'");
?>
=$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="$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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The mobile settings of Empire CMS are located in the "Mobile Template" of the "Template Management" module. The specific steps include: enabling the template, selecting the application channel, editing the template content, and saving the settings.

The Empire CMS sitemap can be found by accessing the config.inc.php file and checking the dositemap settings. If set to "on", sitemap is enabled. The sitemap path is located in the sitemapurl setting and can be accessed via a browser or downloaded via FTP.

The ideal location for the Empire CMS template file is /e/template/default/skin/default/. Secondly, it can also be placed in /e/data/skins/ and /e/skin/. You need to pay attention to maintaining the folder structure and setting file permissions. and regular backups.

The Imperial CMS database configuration file is located in the website root directory e/config/db.inc.php. It contains the following configuration information: $dbhost: database server address $dbuser: database user name $dbpass: database password $dbname: database name $dbport :Database port $dbcharset: Database character set

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

The imperial cms Baidu active push plug-in is located in the root directory /e/api/baidu/push.php. The specific configuration steps are as follows: 1. Upload the plug-in file to the specified path. 2. Configure the "Baidu Active Push" option in the Imperial CMS background, including push address, API Key and push interval. 3. Get Baidu push information: Push address: https://data.zz.baidu.com/urls?site=YOUR_SITE&token=YOUR_API_KEY, API Key: log in to Baidu search resource platform to obtain. 4. Update the API Key regularly and set a reasonable push interval.

The automatic publishing interface of Empire CMS is located at /e/api/web/postinfo.php. The usage steps are as follows: visit /e/api/web/postinfo.php address and use HTTP POST to submit the article title, column ID, category ID, author and article The content and other data interfaces will return a response in JSON format, which contains the publishing results and article ID.

Yes, Empire CMS is a free and open source content management system (CMS). It is a lightweight CMS that is feature-rich and easy to use. Empire CMS is licensed under the GNU General Public License (GPL), which means it is free to download, install and use. For commercial use, it offers a paid version that offers additional features and support such as ad management, online payments, and premium technical support.
