search
HomeCMS TutorialEmpire CMSHow does the list of Empire CMS display the number of clicks in real time? (code example)

The following article will introduce to you how Empire CMS displays the number of clicks in a list in real time. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How does the list of Empire CMS display the number of clicks in real time? (code example)

Related recommendations: "Empire cms tutorial"

Empire CMS list display and real-time display of clicks

1. Browse: [!--onclick--] times

2. Add Jquery code

<script>
window.onload = function(){
$(&#39;.clicknum&#39;).each(function(i){
//列表中所有的新闻点击数标签
var url="[!--news.url--]e/public/ViewClick?&down=0&nojs=1&classid="+$(this).attr("data-class")+"&id="+$(this).attr("data-id");
$(this).load(url);
});
}  
</script>

3. Modify the end of /e/public/ViewClick/index.php

$nojs=(int)$_GET['nojs'];
//参数判断输出方式 1=直接输出数字 0=JS输出
if ($nojs==1){
	echo $shownum;
}else{
	echo"document.write('".$shownum."');";
}

For more programming-related knowledge, please visit: Programming Teaching! !

The above is the detailed content of How does the list of Empire CMS display the number of clicks in real time? (code example). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. 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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

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

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment