| | |
| 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: 13.10.2006 9:09 | |
|
Kód: ############################################### ## Hack Title: The topic user is viewing ## Hack Version: 0.9.9 ## Author: DTTVB (a.k.a. Mechakoopa Revolution) <mechakoopa@gmail.com> ## Description: This hack will show what topic in what forum each user is viewing in Who is Online. ## Compatibility: 2.0.17 ## ## Installation Level: Easy ## Installation Time: ~5 Minutes ## ## Files To Edit: 3 ## includes/sessions.php ## viewonline.php ## viewtopic.php ## ## Included Files: N/A ## ## History: ## N/A ## ## Support: http://www.phpbbhacks.com/forums ## ## Copyright: Copyright (C) 2005 The topic user is viewing 0.9.9 - DTTVB ############################################### ## ## Author Notes: ## There is an unused constant PAGE_TOPIC_OFFSET. ## So I use that constant to make this hack. ## ############################################### ## Always back up all files related to this hack before use! ############################################### ## You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. ## Please visit http://www.phpbbhacks.com/forums for support. ############################################### ## Please visit http://www.phpbbhacks.com/ for updates of this hack. ############################################### ## This hack is released under the GPL License. ## This hack can be freely used, but not distributed, without permission. ############################################### ## You can always contact me via e-mail if you have any questions, suggestions. ## My e-mail is mechakoopa@gmail.com ###############################################
# #-----[ OPEN ]--------------------------------------- # viewonline.php
# #-----[ FIND ]--------------------------------------- # // // Forum info //
# #-----[ AFTER, ADD ]--------------------------------- # $topiq_dataz = array(); $sql = "SELECT topic_title, topic_id, forum_id FROM " . TOPICS_TABLE; if ( $result = $db->sql_query($sql) ) { while( $row = $db->sql_fetchrow($result) ) { $topiq_dataz[$row['topic_id']] = array($row['forum_id'],$row['topic_title']); } } else { message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql); }
# #-----[ FIND ]--------------------------------------- # else { $location_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $row['session_page']); $location = $forum_data[$row['session_page']]; }
# #-----[ AFTER, ADD ]--------------------------------- # if ($row['session_page'] > PAGE_TOPIC_OFFSET) { $location_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . ($row['session_page'] - PAGE_TOPIC_OFFSET)); $location = $topiq_dataz[$row['session_page'] - PAGE_TOPIC_OFFSET][1] . " (In " . $forum_data[$topiq_dataz[$row['session_page'] - PAGE_TOPIC_OFFSET][0]] . ")"; }
# #-----[ OPEN ]--------------------------------------- # viewtopic.php
# #-----[ FIND ]--------------------------------------- # $userdata = session_pagestart($user_ip, $forum_id);
# #-----[ REPLACE WITH ]--------------------------------- # $userdata = session_pagestart($user_ip, PAGE_TOPIC_OFFSET + $forum_topic_data['topic_id']);
# #-----[ OPEN ]--------------------------------------- # # Optional, this will make update session page immediately after click. includes/sessions.php
# #-----[ FIND ]--------------------------------------- # if ( $current_time - $userdata['session_time'] > 60 )
# #-----[ REPLACE WITH ]------------------------------- # if ( $current_time - $userdata['session_time'] > 0 )
# #-----[ SAVE & CLOSE ALL FILES ]--------------------- # # End of hack.
_________________ 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
|
|