Raised This Month: $ Target: $400
 0% 

[TF2] Item Logger (With Web Panel)


Post New Thread Reply   
 
Thread Tools Display Modes
Skyrider
AMX Mod X Beta Tester
Join Date: May 2005
Location: Netherlands
Old 10-19-2010 , 07:25   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #31

Quote:
Originally Posted by asherkin View Post
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.
Mind sharing how? I'm not that much advanced. And yea, I noticed that all data is still in the database. I already tried replacing midnight with, but getting a sql error.

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.
__________________

Last edited by Skyrider; 10-19-2010 at 07:45.
Skyrider is offline
Send a message via AIM to Skyrider Send a message via MSN to Skyrider Send a message via Yahoo to Skyrider
haet
Junior Member
Join Date: Sep 2009
Old 10-19-2010 , 18:40   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #32

woah woah woah...

i want that spray tracker plugin! where can i get this!?
__________________
haet is offline
Aoxmodeus
Junior Member
Join Date: Apr 2010
Location: Irvine, CA
Old 10-19-2010 , 22:00   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #33

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
Aoxmodeus is offline
Aoxmodeus
Junior Member
Join Date: Apr 2010
Location: Irvine, CA
Old 10-20-2010 , 01:28   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #34

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

Last edited by Aoxmodeus; 10-20-2010 at 01:34.
Aoxmodeus is offline
ltgenkd
AlliedModders Donor
Join Date: Sep 2008
Old 10-20-2010 , 06:10   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #35

Whats the best way to have the web interface not clear @ midnight?
To have multiple pages to view.

Thanks
__________________
ltgenkd is offline
Skyrider
AMX Mod X Beta Tester
Join Date: May 2005
Location: Netherlands
Old 10-20-2010 , 08:25   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #36

Quote:
Originally Posted by ltgenkd View Post
Whats the best way to have the web interface not clear @ midnight?
To have multiple pages to view.

Thanks
Change midnight to -1
__________________
Skyrider is offline
Send a message via AIM to Skyrider Send a message via MSN to Skyrider Send a message via Yahoo to Skyrider
ltgenkd
AlliedModders Donor
Join Date: Sep 2008
Old 10-20-2010 , 12:06   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #37

Quote:
Originally Posted by FF|Skyrider View Post
Change midnight to -1
So, change midnight to -1 everywhere it says midnight in index.php?
__________________
ltgenkd is offline
Aoxmodeus
Junior Member
Join Date: Apr 2010
Location: Irvine, CA
Old 10-20-2010 , 14:07   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #38

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
Aoxmodeus is offline
Aoxmodeus
Junior Member
Join Date: Apr 2010
Location: Irvine, CA
Old 10-20-2010 , 16:41   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #39

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
Aoxmodeus is offline
Aoxmodeus
Junior Member
Join Date: Apr 2010
Location: Irvine, CA
Old 10-20-2010 , 17:02   Re: [TF2] Item Logger (With Web Panel)
Reply With Quote #40

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
Aoxmodeus 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 14:18.


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