Raised This Month: $51 Target: $400
 12% 

[TF2] Item Logger (With Web Panel)


Post New Thread Reply   
 
Thread Tools Display Modes
Obsidian
Senior Member
Join Date: Jun 2011
Old 09-23-2011 , 08:37   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #141

Nevermind, I did a quickie look-through since there isn't much code.

You should be using htmlspecialchars with the ENT_QUOTES flag and the 'UTF-8' charset for proper UTF-8 handling. Other than that, looks like everything is decently protected (unlike some of the other web interfaces I've come across).
Code isn't pretty though. :\
__________________
TF2 Stats plugin alternative web interface - profile @ Github
(tf2stats-webui latest release: 1.1.1)


"If you're not willing to do it right, don't get involved with security or Explosive Ordinance Disposal."
Obsidian is offline
BBG_Theory
Veteran Member
Join Date: Oct 2010
Location: NC USA
Old 09-24-2011 , 01:06   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #142

Hate to have to report this, but there is a bug. OK I installed the new version ( love the layout ) and I was the first one on my trrade server to make a craft. It reported the craft correctly and what the hat was, but it also reported the wrong person's name.

Plus I dont see that the update.php works. It looks like you are pulling all item images from off site???? what is the point of the images folder if we are not going to host the images ourselves.
I sure wish vlave had not broken the old version, becasue after I got the old update.php fixed.... it worked great. I do like the layout of this version better, but I think there are a few bugs still.

Last edited by BBG_Theory; 09-24-2011 at 01:19.
BBG_Theory is offline
Geit
Senior Member
Join Date: Oct 2009
Location: Home
Old 09-24-2011 , 14:55   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #143

Quote:
Originally Posted by Obsidian View Post
Nevermind, I did a quickie look-through since there isn't much code.

You should be using htmlspecialchars with the ENT_QUOTES flag and the 'UTF-8' charset for proper UTF-8 handling. Other than that, looks like everything is decently protected (unlike some of the other web interfaces I've come across).
Code isn't pretty though. :\
I know the code is quite bad, As I said, I did most of it in a rush on a train! D: - I've changed the DocType to HTML5, but bar the html tag itself it is XHTML compliant now.

Also, the htmlspecialchars wasn't working at all due to a rouge semicolon on the foreach. - Again, fixed in V2.02.

There is currently one issue with the web panel I need to look into, and after I've fixed that I will be releasing 2.02 after some testing, current changelog is:
  • (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!
EDIT:
Update Released, See OP for downloads.

I've done some fairly quick profiling tonight and have noted that this does appear to suffer from quite some fairly slow queries on larger databases - Plans for 2.03 will be to try and fix that up a little and implement the player avatars at last, following that will be the extra pages I promised before.


Quote:
Originally Posted by BBG_Theory View Post
Hate to have to report this, but there is a bug. OK I installed the new version ( love the layout ) and I was the first one on my trrade server to make a craft. It reported the craft correctly and what the hat was, but it also reported the wrong person's name.

Plus I dont see that the update.php works. It looks like you are pulling all item images from off site???? what is the point of the images folder if we are not going to host the images ourselves.
I sure wish vlave had not broken the old version, becasue after I got the old update.php fixed.... it worked great. I do like the layout of this version better, but I think there are a few bugs still.
Did you restart the server after installing the upgraded copy of the plugin? - If you did, it may have been the insert bug kicking in and can be safely ignored (I Think) on v2.02

Update.php is now far faster and reliable. - When I made the original ItemLogger it wasn't clear that Valve permitted the direct linking of the images on their media servers, however the TF2 Wiki states that it is okay now... In the long run using these images makes my life less of a headache (No permission woes!) and saves you bandwidth. - I'll be removing the images folder when the avatar loading implementation is done.

Last edited by Geit; 09-24-2011 at 18:43.
Geit is offline
BBG_Theory
Veteran Member
Join Date: Oct 2010
Location: NC USA
Old 09-24-2011 , 20:50   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #144

server was restarted, yes. I just unboxed 30 crates on the server and the items are correctly shown, but associated with the wrong person. No question there is a bug, I’m guessing in the plug in.
As for remote linked item images, slight bandwidth savings at the expense of the performance loss having to remotely get images. I would much rather local host the images. Not a complaint, just a comment thinking out loud.
I definitely appreciate your efforts, just hope the existing bugs can be figured out.
I had problems running the update.php by the way. The page didn’t seem to run

I will try v2.02 now and see whats up

edit = no echo (page output?) on update.php ??

my page
http://www.tradingunusuals.com/drops/index.php

Last edited by BBG_Theory; 09-24-2011 at 21:18.
BBG_Theory is offline
Obsidian
Senior Member
Join Date: Jun 2011
Old 09-24-2011 , 21:24   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #145

@BBG_Theory - if the server that hosts the item images sends strong caching headers, the time to load can be virtually unnoticeable after the first image load. If that's the case, I wouldn't worry about it.
__________________
TF2 Stats plugin alternative web interface - profile @ Github
(tf2stats-webui latest release: 1.1.1)


"If you're not willing to do it right, don't get involved with security or Explosive Ordinance Disposal."
Obsidian is offline
ltgenkd
AlliedModders Donor
Join Date: Sep 2008
Old 09-25-2011 , 02:42   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #146

I really don't know what is going on here. I updated to 2.02, nothing is being logged. Updated the web panel, added new plugin to both servers, traded a couple items and found some items. There are no errors anywhere in the logs.
When I ran the update.php, nothing was echoed. Just a blank page.
Restarted the server and changed the map multiple times, nothing.
Everything is filled out in the config.php. Everything just stopped logging on Sept 20th. Well gonna get some sleep and give it a go in the morning.

Database is set to "itemlogger2" for both servers also.
ltgenkd is offline
BBG_Theory
Veteran Member
Join Date: Oct 2010
Location: NC USA
Old 09-25-2011 , 12:59   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #147

Obsidian, no worries ... as I said, I was not complaining. Its just my preference to locally host all images I use on my web pages. That way I don't have to rely of other servers being available other than my own. As you said, the page loads fast.
ltgenkd, I could be wrong, but I don’t think the update.php does echo anything as it behaved the same way for me and I glanced through it and did not see any code to page output. I am guessing all of this will be polished up in later releases as I bet Geit was trying to get us something working as quickly as his time allowed ( just a guess )
When I get more time, I’m going to try to work on this project also, as I love the features it provides. Cant say I understand the point of the player count column, as IMO avatar would be better

GEIT - we need to be able to auto prune the logs like before to prevent a huge database IMO
hate to have to use a cron job to do this

Last edited by BBG_Theory; 09-25-2011 at 13:02.
BBG_Theory is offline
Obsidian
Senior Member
Join Date: Jun 2011
Old 09-25-2011 , 15:18   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #148

Quote:
Originally Posted by BBG_Theory View Post
Obsidian, no worries ... as I said, I was not complaining. Its just my preference to locally host all images I use on my web pages. That way I don't have to rely of other servers being available other than my own. As you said, the page loads fast.
ltgenkd, I could be wrong, but I don’t think the update.php does echo anything as it behaved the same way for me and I glanced through it and did not see any code to page output. I am guessing all of this will be polished up in later releases as I bet Geit was trying to get us something working as quickly as his time allowed ( just a guess )
When I get more time, I’m going to try to work on this project also, as I love the features it provides. Cant say I understand the point of the player count column, as IMO avatar would be better

GEIT - we need to be able to auto prune the logs like before to prevent a huge database IMO
hate to have to use a cron job to do this
Honestly, the only way TO do it is with a cronjob. A pseudocron system can be pretty problematic if nobody accesses the web UI regularly.
__________________
TF2 Stats plugin alternative web interface - profile @ Github
(tf2stats-webui latest release: 1.1.1)


"If you're not willing to do it right, don't get involved with security or Explosive Ordinance Disposal."
Obsidian is offline
ltgenkd
AlliedModders Donor
Join Date: Sep 2008
Old 09-25-2011 , 15:51   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #149

Geit made a debug version for me, (thanks Geit much appreciated).
With this debug version, drops are being recorded on the website.
This version produces a lot of spam in chat. Without the debug
version the drops are not being recorded on the website.
I guess its something with the data base.

Any Ideas anyone?
ltgenkd is offline
ltgenkd
AlliedModders Donor
Join Date: Sep 2008
Old 09-25-2011 , 18:39   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #150

@ BBG_Theory:

What version of Sourcemod are you running?
ltgenkd is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode