Logs item interactions (finds, crafts, trades, purchases, unboxings, giftings, earnings and refunds) to database for statistical analysis.
Working Examples:
http://items.degree-gaming.com/
http://www.bigbanggamers.com/drops/
Updating to 2.02 from 1.11:
- Upload the web panel files
- Fill out system/includes/config.php
- Run update.php
- Run convert.php
- Delete update.php and convert.php
- Rename the "feedback" database config to "itemlogger2"
- Upload a new copy of the plugin
- Restart server.
Changelog:
2.04:
- (Plugin) Made sure FetchRow is called successfully before attempting to retrieve values.
- (Web) Updated Item Methods
- (Web) Fixed updater script - thanks PolyQuad!
2.03:
- (Plugin) Will now attempt to reconnect to the database server if the handle becomes invalid.
- (Plugin) Removed the use of GetInsertID in favor of just doing another threaded query: as it does not appear to function correctly on local result sets in some cases.
2.02:
- (Web) Added Pagination
- (Web) Fixed (X)HTML non-compliance
- (Web) Escaping output now (Critical)
- (Web) Updated Jquery to 1.6.4
- (Plugin) Fixed sourcemod errors on player/server inserts
- (Plugin) Fixed a required server restart for plugin updates/reloads - still recommended though!
2.01:
- Rewrote the web panel with numerous improvements
- Less barebones, comes with dedicated style.
- Improved Speed
- Improved update.php
- Redesigned the database schema to be more efficient
- Rewrote the plugin from scratch around Valve changes.
- Changed the database config from "feedback" to "itemlogger2"
- Probably some other stuff I don't remember.
1.11
- Added a check to prevent the plugin from logging two sets of item notifications when using my Fast Item Hook plugin
1.1
- Fixed a UTF-8 Issue with the plugin
- Numerous web panel fixes
Cvars:
- sm_item_logger_version - Version
Plugin Installation
- Create a configuration named "itemlogger2" in your databases.cfg like so:
Code:
"itemlogger2"
{
"driver" "mysql"
"host" "localhost"
"database" "sourcemod"
"user" "user"
"pass" "password"
}
- Drop the compiled plugin into your plugins dir
Web Panel Installation
- Fill in the variables in system/includes/config.php - You can get an API key from here: http://steamcommunity.com/dev/apikey
- Navigate to update.php in your browser, wait for it finish loading (can take up to 2 minutes)
- Delete update.php and convert.php
- Index.php should now be working.
- (When the game is updated with new items, simply rerunning update.php will update your panel with the new items)
Credits
rack_gothroach - Massive amount of help with the web panel
Darkimmortal - Daemon and Original Web code
Geit - Updated Plugin/Web code
Nineaxis - Web panel design for >2.0
Troubleshooting:
If you get a table does not exist error upon visiting the web panel, ensure that your database details in config.php match those you set for the plugin then use this query:
Code:
CREATE TABLE IF NOT EXISTS `itemlogger2_finds` (`id` int(11) unsigned NOT NULL AUTO_INCREMENT,`player_id` int(11) unsigned NOT NULL DEFAULT '0',`server_id` int(11) unsigned NOT NULL DEFAULT '0',`player_count` tinyint(3) unsigned NOT NULL DEFAULT '0',`item_index` int(11) NOT NULL DEFAULT '0' COMMENT 'signed int, 32 bit',`method` tinyint(2) NOT NULL DEFAULT '0',`quality` tinyint(2) NOT NULL DEFAULT '0',`time` int(11) unsigned NOT NULL DEFAULT '0',PRIMARY KEY (`id`),KEY `actual_time` (`time`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `itemlogger2_items` (`id` int(11) unsigned NOT NULL DEFAULT '0',`item_name` tinytext,`proper_name` tinyint(1) DEFAULT NULL,`item_slot` varchar(16) DEFAULT NULL,`image_url` tinytext,`material_type` varchar(16) DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `itemlogger2_players` (`id` int(11) unsigned NOT NULL AUTO_INCREMENT,`steam_id` varchar(25) NOT NULL DEFAULT '',`name` varchar(32) DEFAULT NULL,`avatar` tinytext,`avatar_last_updated` int(11) DEFAULT NULL,PRIMARY KEY (`id`),UNIQUE KEY `steam_id` (`steam_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `itemlogger2_qualities` (`id` tinyint(3) unsigned NOT NULL,`name` varchar(32) DEFAULT '0',`raw_name` varchar(32) DEFAULT '0',PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `itemlogger2_servers` (`id` int(11) unsigned NOT NULL AUTO_INCREMENT,`ip` varchar(16) DEFAULT '127.0.0.1',`port` smallint(5) unsigned DEFAULT '27015',`name` tinytext,PRIMARY KEY (`id`),UNIQUE KEY `ip_port` (`ip`,`port`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;