CS-Reloaded Banner
Welcome, Guest. Please Login or Register.
Download Second Map Pack!
Get more packs here

Home Help Search Login Register

CSReloaded Forums  |  General Category  |  Suggestions (Moderators: Porter, Father Ribs, Surgeon General, Guardian_Tenshi)  |  Topic: just an idea
Pages: [1] Reply Notify of replies
   Author  Topic: just an idea  (Read 91 times)
Fotty
Admin Team
CSR Connoisseur
*****
Karma: +35/-10

Offline

Gender: Male
Posts: 840

ShootMeIntoSpace
View Profile E-Mail
just an idea
« on: January 19, 2004, 02:04:02 PM »
Reply with quote

not sure how much customization you can do with the forum and with the HLStats, but it would be kind of cool if you could go to the forum and it would show your HLStats rank right there which would be a link to your actual full stats page... next to where it says "Hi Fotty you have no messages cause your a loser"

i imagine this could be done by saving your steam ID in your forum profile, so it could link your stats that way...

like i said.. just a suggestion.. but it would be kind of cool.. that way registered forum members always have a quick view of their current rank
Logged

Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:just an idea
« Reply #1 on: January 19, 2004, 02:15:41 PM »
Reply with quote

Yeah, it's possible. I'll add it to my to do list... somewhere towards the bottom. It's a really cool idea too:

[Wumpa] Porter
[Wumpa]
Board Admin
* * * * *
Karma: +127/-127
Ranked 8th in HLstats with 2498pts
Posts: 1430
...

It's not practical right now because our HLstats database is hosted in Illinois, while the forum database and webserver are in Vermont I believe. That means that for every single user in the current thread, we have to make a query to the IL database-- that's gonna slow the forums down A LOT. If I had better access to the RG database, I would move HLstats, but there isn't much hope of that happening soon.

I'll definitely keep the idea around though.
« Last Edit: January 19, 2004, 02:16:44 PM by Porter » Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
slightcrazed
-TWB-
Admin Team
CSR Connoisseur
*****
Karma: +65/-7

Offline

Gender: Male
Posts: 983


View Profile
Re:just an idea
« Reply #2 on: January 19, 2004, 02:33:49 PM »
Reply with quote

Might be possible to do something similar, although the stats would not be real time. You could set up a quick DB on the forums box, and have it querey the HLstats DB on a regular basis (say at 3:00 in the morning) to get the relevant info for all users on the forums. Then the YaBB code could pull off of this DB and that would elliminate any (or at least 99.9% of) lag on the fourms.

Just a thought. My php is as rusty as a russian submarine, but If you want to walk me through some of it I can give it a shot.

slight
Logged

I once beat Drizzt Do'Urden at thumb wrestling.
Deuce
CSR Super Ultra Mega Nerd
Global Moderator
*****
Karma: +169/--41

Offline

Gender: Male
Posts: 2914

DarkRusky
View Profile E-Mail
Re:just an idea
« Reply #3 on: January 19, 2004, 05:35:01 PM »
Reply with quote

yeah vermont
Logged




biggums
Guest

E-Mail
Re:just an idea
« Reply #4 on: January 19, 2004, 06:12:06 PM »
Reply with quote

I second that! yeah vermont
Logged
Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:just an idea
« Reply #5 on: January 19, 2004, 06:43:03 PM »
Reply with quote

Quote from: slightcrazed on January 19, 2004, 02:33:49 PM
Might be possible to do something similar, although the stats would not be real time. You could set up a quick DB on the forums box, and have it querey the HLstats DB on a regular basis (say at 3:00 in the morning) to get the relevant info for all users on the forums. Then the YaBB code could pull off of this DB and that would elliminate any (or at least 99.9% of) lag on the fourms.

Just a thought. My php is as rusty as a russian submarine, but If you want to walk me through some of it I can give it a shot.

slight

Good idea, especially considering the only "stats" we care about are a user's SteamID and their current points. The problem is that I can't "schedule" anything on CSR-- that's all controlled by RG. Somebody would have to manually run a script every morning...


I have an idea on how to work it, but it's UGLY! I can have iCabbit CURL a PHP webpage on CSR every early-morning. The webpage on CSR outputs the results of the database query that transfers the stats to CSR. We can "pseudo-cron" the script by using iCabbit to initiate the PHP script living on RG's webserver.

Ugly, but effective. Plus, nothing gets hurt if it fails-- the points displayed in the fforum just get a day older. I could even add code to the yabb hack I'd already ahve to write to check when the stats were last updated, and if they are older than a certain timeframe, only print a link to HLstats instead of the actual point value.

Any suggestions, modifications?
Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
slightcrazed
-TWB-
Admin Team
CSR Connoisseur
*****
Karma: +65/-7

Offline

Gender: Male
Posts: 983


View Profile
Re:just an idea
« Reply #6 on: January 19, 2004, 09:42:09 PM »
Reply with quote

I think you hit most of it....... Every morning at a given time icabbit (or one of my boxes if you'd like) runs a cron job to pull specific info from the HLstats DB (SQL, I'm assuming) and puts it in a nice tidy format (possibly another very small SQL, or hell, even a TSV or CSV file) that can be used on the RG server by YaBB to print stats for each of the members. Seems simple enough. You could even do an FTP push from icabbit to the RG server, overwriting whatever file holds the values each day.

If I was better with perl it might be possible to write a perl script that could be called via cron job from an outside system to build the DB, and this would push most of the burdeon onto the RG server, but either way would work.

slight
Logged

I once beat Drizzt Do'Urden at thumb wrestling.
Kaoz
Admin Team
CSR Connoisseur
*****
Karma: +80/-59

Offline

Gender: Male
Posts: 913

Tek+Wan+Doh
View Profile E-Mail
Re:just an idea
« Reply #7 on: January 19, 2004, 11:07:19 PM »
Reply with quote

HELL YEAH VERMONT
Logged

Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:just an idea
« Reply #8 on: January 20, 2004, 08:43:02 AM »
Reply with quote

Actually, your second route was more of what I had in mind. let's start with this:

I can write a PHP script that will live here with the CSR site, on RG's webserver. This is the only machine anywhere that has access to both the iCabbit based hlstats database, and the RG based (and firewalled) forum database. The script that sits on the RG webserver knows how to query the icabbit hlstats DB directly, without any intervening scripts, and take the results of the MySQL query and pumps them directly into a table in the RG forum database.

This does everything we need done in one step, and the only problem yet to solve is how to get this PHP script to run every day at a specified time. You can take care of that by having a cronned shell script run curl to fetch the PHP script from RG. The process of fetching it will essentially execute it, causing the DB transfer to run. The output of the PHP script can be any data that the curl process should log. That way we have an event log on icabbit, and all of the actual work is taken care of on the RG end.

We've also minimized our dependency on an outside machine to icabbit running that single shell script (and mysql running, but if it's not then stats aren't tracking anyway), and even that can't be worked around easily. If somebody sees the stats haven't updated themselves for today-- they simply type in the address for the php script themselves. That would update the stats manually.
Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
Fotty
Admin Team
CSR Connoisseur
*****
Karma: +35/-10

Offline

Gender: Male
Posts: 840

ShootMeIntoSpace
View Profile E-Mail
Re:just an idea
« Reply #9 on: January 21, 2004, 11:28:19 AM »
Reply with quote

couldn't you use cookies or a session variable?

because we have 150+ forum members.. probably 50 that post on a regular basis... so when you first hit the forum.. it queries the DB, and holds that value... its not till your session ends that it would need to requery the DB, or make the cookie expire daily or every 12 hours.. something along those lines.. im just spitting out ideas.. that way it would only query the HLStats server a few times instead of on every page load....

i dont know PHP, i program ASP, does PHP have sessions?
Logged

Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:just an idea
« Reply #10 on: January 21, 2004, 01:15:30 PM »
Reply with quote

I think the idea that Slight and I are going after is trying to find a suitable way to cache the SteamIDs and point values only  from the iCabbit server on RG. Querying the RG database is fast enough to be considered trivial-- the forums make so many queries for every page already that one more from the exact same DB isn't going to dent it.

I think we've worked out a good solution too. There's a new update to yabb out as well, so I might just roll this, the karma fix, and a couple other things into updating the forums. I have the new site backend to transition too as well. That's a big job though. Maybe this weekend.
Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
Fotty
Admin Team
CSR Connoisseur
*****
Karma: +35/-10

Offline

Gender: Male
Posts: 840

ShootMeIntoSpace
View Profile E-Mail
Re:just an idea
« Reply #11 on: January 21, 2004, 01:18:59 PM »
Reply with quote

cool. well im glad to see people are interested in the idea... i just thought about it when i was browsing the forum and went to check my stats.. i was like.. hmmm would be nice if they were all in one place

damn im lazy 


but its also a good incentive to join the community
Logged

Pages: [1] Reply Notify of replies 
CSReloaded Forums  |  General Category  |  Suggestions (Moderators: Porter, Father Ribs, Surgeon General, Guardian_Tenshi)  |  Topic: just an idea
Jump to: 

Powered by PHP CSReloaded Forums | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
Powered by MySQL
:[ Site Design by Ryo, scripts and backends by Porter and Ryo, banner by Supafly! Powered by PHP and MySQL ]:
Page created in 10.474 seconds.