[TF2] Item Logger (With Web Panel)
3 Attachment(s)
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:
Changelog: 2.04: 2.02:
2.01: 1.1Cvars:
rack_gothroach - Massive amount of help with the web panel :3 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; |
Re: [TF2] Item Logger (With Web Panel)
nice work
drinking_hat.png can't download and you should add pagination to the page |
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
Updated the web panel:
|
Re: [TF2] Item Logger (With Web Panel)
you forgot teh function again
Quote:
i did add my servers ip address but still unknown server, i check the database and it says the right ports but all localhost:27015(6)(7), i am hosting web, mysql and tf2 on the same pc, maybe i have to use my external ip in database.cfg? edit: possible to just view avatars directly from steam instead of downloading them first? |
Re: [TF2] Item Logger (With Web Panel)
I can't see anywhere in first post where is the MYSQL Query that needs to be run in order to create the tables/columns??
Also when I go to http://www.brotherhoodofgamers.com/tf2itemlogger/ I get the error: Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/brother6/public_html/tf2itemlogger/index.php on line 45 |
Re: [TF2] Item Logger (With Web Panel)
Quote:
What are the Ip's being logged as on your mysql? - The array should match the ones specified there. If it does, can you post up/PM the full array at the top of index.php It is possible to get steam avatars without first downloading them, but it requires the use of Javascript (or a very long load time), which the in-game browser doesn't support. @Bouncer: The Tables are created by the plugin when it successfully connects to your database Anyway, Reuploaded the web panel, sorry for the mistakes :wink: |
Re: [TF2] Item Logger (With Web Panel)
Great system, found a few issues though.
Line 189 of index.php needs the / in the beginning of the string removed. In avatars_cron.php there are a few issues: $path_to_avatars should have "avatars/" added on directly in the variable. The first time $xml is set should be removed, as it's switched to use the web api below it. Then the correct way to get the avatar would be $profile->players->player->avatarmedium. |
Re: [TF2] Item Logger (With Web Panel)
Quote:
(Issues with avatar_cron are purely because I quickly adapted it from our, GamingMaster's, Daemon which is a lot more dated and complicated then what is included) |
Re: [TF2] Item Logger (With Web Panel)
Thanks, no major problems yet. Great job.
http://bfused.com/?page_id=272 Now all I need to setup a cron job |
Re: [TF2] Item Logger (With Web Panel)
nnCron and wget works well for the avatars cron job i set it to 5 minutes
also Geit can you also add item search as well? |
Re: [TF2] Item Logger (With Web Panel)
Sooo... does this require a lot of constant mysql use or does it send the data on map end so it doesnt lag users during gameplay.
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
plugin hooks item_found event and logs it instantly when someone finds,crafts,unboxes,trades,earns,gifts,purch ases,refunds something...
so ya it constantly uses your mysql db and not just on map change edit: i couldn't wait so i edited a few things and added item search myself also made it search the whole db not just from midnight of that day notice ip localhost was related to how you got ip in your plugin, so i changed the ip cvar to my outside ip all should be better i hope http://uberz.servegame.com/drops |
Re: [TF2] Item Logger (With Web Panel)
It keeps saying:
Quote:
EDIT: I manually ran: Quote:
I am getting errors though when using update.php Quote:
http://drops.forcepit.com/ I'm pretty sure everything is set correctly in the database.cfg file. No errors within the sourcemod logs.. Plus, Number of items found/crafted today: 0 That's 0 per hour! It's not updating. Does the plugin show any kind of SQL errors within the error log if it can't connect? |
Re: [TF2] Item Logger (With Web Panel)
found the rimmed raincatcher (aka drinking_hat.png) lulz
heres the pack for people who couldn't use update.php for whatever reason |
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
fixed, here again
|
Re: [TF2] Item Logger (With Web Panel)
Who's the owner of http://69.204.254.155/drops/?
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
thx for this. link.
any idea how to fix the utf8 issue? |
Re: [TF2] Item Logger (With Web Panel)
nvm this post
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
I get a error saying missing "items.php" there's no items.php on the zip file
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
I'd really like to run this, but am running windows servers. I'm trying to get this to run, and have had mostly success, but I'm getting very odd rendering issues, and can't get the images to display, not having proper variables filled in by php. Should I be able to get this to run on a windows box?
-Aox |
Re: [TF2] Item Logger (With Web Panel)
Can anyone tell me how to disable the daily reset? I want the logs to be kept.
|
Re: [TF2] Item Logger (With Web Panel)
The data is still in the database, you just need to remove all the checks for the time being later than midnight from the SQL queries.
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
EDIT: Replacing "midnight" with "-1 day" seems to work.. Got anything better though? Or will this work just fine? EDIT: Number of items found, traded or crafted in total: 1340 Even when using -1 day, it still display 1340 total.. while it should be much more. |
Re: [TF2] Item Logger (With Web Panel)
woah woah woah...
i want that spray tracker plugin! where can i get this!? :) |
Re: [TF2] Item Logger (With Web Panel)
OK, so I got this working, with some fudgery... Turns out I didn't have "short open tags" enabled in my php config. When I turned this on, it accepted the short tags in the code, and fixed my rendering issues.
On Windows, I still have issues with setting the correct path in the avatar_cron.php file. I can't seem to get a path to work at all. The avatar files ALWAYS end up in the root of the drops site. I ended up modifying the index.php to remove the avatars/ for $av and now everything is working great. I suppose I may have also been able to fix this by running the avatar_cron.php from the avatars directory itself. I do have one final tuning issue I'd like to fix. Can one of you PHP gurus tell me how I can modify the query in the index.php to give me time -8 hours, to show my west coast USA time zone times properly? I figure it's got to be something simple. I see a $CorrectedTime variable in there, but not sure what I'd change to make it reflect -8 off of GMT. Also, in windows, is there a way to run the avatars_cron as a schedule task from a command line, without having to set up a scheduled task to actually open up a browser window? Thanks for any help! Site is up and online at http://aoxbox.ciscofreak.com/drops/ -Aox |
Re: [TF2] Item Logger (With Web Panel)
Ok, worked around the php windows path issue by setting up a scheduled task to run "cURL" every 5 min to call the avatars_cron.php directly from the avatars folder. I'm not sure why the update.php would work fine with the images/ variable, but in the avatars_cron.php, I couldn't set $path_to_avatars = avatars/ and have it dump the images to avatars/. There must be something else in the code I don't understand that I don't have my server configged properly for, like the short open tag setting, or a path issue that keeps it from dumping to the subdirectory.
Only remaining issue that eludes me is how do I get the page to show server time, and not UCT/GMT? http://aoxbox.ciscofreak.com/drops/ Thanks again for the cool app! I've learned more about php, apache, and mysql in the past two days than I ever thought a network guy like me would know. -Aox |
Re: [TF2] Item Logger (With Web Panel)
Whats the best way to have the web interface not clear @ midnight?
To have multiple pages to view. Thanks |
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
Quote:
|
Re: [TF2] Item Logger (With Web Panel)
So... I seem to have an odd bug I don't understand.
Randomly, it appears the steam2friend function will generate the TF2items link, OR the avatar image link, with a .0000000000. between the friend code and the .jpg extension of the image file, or will append a ".0000000000" to the end of the TF2 items link. It happens in the avatars_cron as well. Sometimes it pulls the files down with the proper name of friendcode.jpg, sometimes it re-writes all those files with friendcode.0000000000.jpg, which then causes the avatars in displayed in the index.php to default to that questionmark file, since the if exist can't file the proper filename. Any ideas why this would be happening? Anyone? -Aox |
Re: [TF2] Item Logger (With Web Panel)
Ok, so I re-wrote this function:
This theoretically will strip the weird .tenzeros out of my links/avatars when it happens, I think. function steam2friend($steam_id){ $steam_id=strtolower($steam_id); if(substr($steam_id,0,7)=='steam_0'){ $tmp=explode(':',$steam_id); if((count($tmp)==3) && is_numeric($tmp[1]) && is_numeric($tmp[2])){ $id_fix=bcadd((($tmp[2]*2)+$tmp[1]),'76561197960265728'); $id_fix=str_replace(".0000000000.","",$id_fix ); $id_fix=str_replace(".0000000000","",$id_fix) ; return $id_fix; } else { I know you linux guys probably don't give a sh*t, but maybe this will help some other win-dink XD -Aox |
Re: [TF2] Item Logger (With Web Panel)
This programming stuff is kind of cool...
It's all working!!!! No more bugs, no issues other than HOW IN THE HECK DO I DISPLAY GMT -8 ON THE PAGE?!??! Hehehhe. Woot! http://aoxbox.ciscofreak.com/drops -Aox |
All times are GMT -4. The time now is 15:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.