| | |
| Stránka: 1 z 1
| [ Príspevok: 1 ] | |
Autor | Správa |
---|
Registrovaný: 01.05.05 Príspevky: 13348 Témy: 1496 Bydlisko: Bratislava | Napísal JanoF: 14.10.2006 15:03 | |
|
Kód: ############################################################## ## MOD Title: Posts in Last 24 Hours ## MOD Author: Throckmorton < lance at cylan dot net > (Lance Clarke) n/a ## MOD Description: Adds number of posts in the last 24 hours to your board stats ## MOD Version: 1.0.1 ## ## Installation Level: Easy ## Installation Time: 3 Minutes ## ## Files To Edit: index.php ## includes/functions.php ## language/lang_english/lang_main.php ## ## Included Files: n/a ## License: http://opensource.org/licenses/gpl-license.php GNU Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## Adds number of posts in the last 24 hours to your board stats ## right after the "Our users have posted a total of XXX articles" line ## ## This MOD adds to the TOTAL_POSTS variable itself and therefore doesn't modify your templates ## which means it should work with any template that displays total posts. ## ############################################################## ## MOD History: ## ## 2005-08-14 - Version 1.0.1 ## Changes to header only, for ModDB compliance ## ## 2005-08-09 - Version 1.0.0 ## - Initial Release ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # index.php # #-----[ FIND ]------------------------------------------ # $total_posts = get_db_stat('postcount'); # #-----[ AFTER, ADD ]------------------------------------------ # $posts_last_24 = get_db_stat('last24'); # #-----[ FIND ]------------------------------------------ # else { $l_total_post_s = $lang['Posted_articles_total']; } # #-----[ AFTER, ADD ]------------------------------------------ #
$l_posted_last_24_hours = $lang['Posted_last_24_hours']; # #-----[ FIND ]------------------------------------------ # 'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts), # #-----[ IN-LINE FIND ]------------------------------------------ # sprintf($l_total_post_s, $total_posts) # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # . sprintf($l_posted_last_24_hours, $posts_last_24) # #-----[ OPEN ]------------------------------------------ # includes/functions.php # #-----[ FIND ]------------------------------------------ # case 'postcount': case 'topiccount': $sql = "SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total FROM " . FORUMS_TABLE; break; # #-----[ AFTER, ADD ]------------------------------------------ # case 'last24': $sql = "SELECT COUNT(post_id) FROM " . POSTS_TABLE . " WHERE post_time > UNIX_TIMESTAMP() - 86400"; break; # #-----[ FIND ]------------------------------------------ # case 'topiccount': return $row['topic_total']; break; # #-----[ AFTER, ADD ]------------------------------------------ # case 'last24': return $row['COUNT(post_id)']; break; # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['Posted_article_total'] = 'Our users have posted a total of <b>%d</b> article'; // Number of posts # #-----[ AFTER, ADD ]------------------------------------------ # $lang['Posted_last_24_hours'] = ', <b>%d</b> of them in the last 24 hours'; // Number of posts in last 24 hours #-----[ SAVE/CLOSE ALL FILES ]-------------------------- # # EoM
_________________ Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF & 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 | iPhone X 256 GB & Pitaka Aramid | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA | Ubuntu Server |
|
| Stránka: 1 z 1
| [ Príspevok: 1 ] | |
| Nemôžete zakladať nové témy v tomto fóre Nemôžete odpovedať na témy v tomto fóre Nemôžete upravovať svoje príspevky v tomto fóre Nemôžete mazať svoje príspevky v tomto fóre
|
|