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

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 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 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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

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 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

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.

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

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.

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

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.

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

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

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

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

Where is the Baidu active push plug-in for Imperial CMS? Where is the Baidu active push plug-in for Imperial CMS? Apr 17, 2024 am 11:00 AM

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.

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

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.

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

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.

See all articles