自己也來寫一個 Hack/Mod~ 😊
目的: 統計目前各區 Page(Session) 觀看數目
Hack/MOD Ver: visit_status 0.1.0 (2003/07/20)
=====================================
概念 SQL 是這樣的
=====================================
"SELECT s.session_page, COUNT(*) page_cnt
FROM phpbb_sessions s
WHERE s.session_time >= " . ( time() - 300 ) . "
GROUP BY s.session_page
ORDER BY page_cnt DESC";
下載如附件,歡迎下載使用~
正式文件如下:
#################################################################
## Hack Title: Visit Status
## Hack Version: 0.1.0
## Author:
Http://Vovo2000.Com/ { T.H.Wu }
## Description: This will count each how many people
## are visiting "what" page.
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: templates/subSilver/index_body.tpl
## index.php
##
## Files To Add: templates/subSilver/visit_status.tpl
## visit_status.php
#################################################################
## Security Disclaimer: This Hack Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
##
## FEATURES in current version:
##
#################################################################
## Before Adding This Hack To Your Forum, You Should Back Up All Files Related To This Hack
#################################################################
#
#-----[ COPY visit_status.tpl to $PHPBB$/templates/subSilver/ ]--------------------
#
#
#-----[ COPY visit_status.php to $PHPBB$/ ]--------------------
#
#
#-----[ OPEN templates/subSilver/index_body.tpl ]--------------------
#
#
#-----[ FIND ]------------------------------------------
#
{LOGGED_IN_USER_LIST}</span>
#
#-----[ AFTER, ADD ]------------------------------------
#
<hr class="genmall" />{VISIT_STATUS_OUTPUT}
#
#-----[ OPEN index.php ]--------------------
#
#
#-----[ FIND ]------------------------------------------
#
//
// Generate the page
//
$template->pparse('body');
#
#-----[ AFTER, ADD ]------------------------------------
#
include($phpbb_root_path . 'visit_status.'.$phpEx);
(2003-07-20 21:46)