Closed GoogleCodeExporter closed 9 years ago
Hmm, good to know. Will take alook at it tomorrow.
Original comment by wilson.steven10@gmail.com
on 2 May 2010 at 9:35
I took a look at the code, and honestly, the original person who wrote this
script
did a poor job. This might get fixed in the future, but for now you just have
to take
it as it is :)
Original comment by wilson.steven10@gmail.com
on 5 May 2010 at 11:42
No worries... I will see if I can recode it myself. I am giving myself a crash
course on PHP to see if I can assist you on this and a few other suggestions I
have.
I was thinking of a search option in VOTE and DONATION for sites hosting large
amounts of rewards so you can SEARCH/FILTER based on keywords.
Original comment by Stanbargers@gmail.com
on 6 May 2010 at 12:45
I have fixed this code so it pulls the latest entry for each realmid ONCE the
realm
has been restarted. Would you like me to attach the file, or can I submit it
from
TortoiseHG?
Original comment by Stanbargers@gmail.com
on 6 May 2010 at 8:46
[deleted comment]
[deleted comment]
Have you tested this code yet?
Original comment by wilson.steven10@gmail.com
on 6 May 2010 at 12:34
Yes, I have periodically taken down a server and restarted it and only ITS
uptime
resets on the status screen
The biggest issue with the original code is it was realm NON-specific. It
simply
took the latest timestamp and used it for each instance.
What I did was create a new variable which stored the realmid of the realm it
is
pulling the data for and only pick the latest UPTIME timestamp for that realmid.
Original comment by Stanbargers@gmail.com
on 6 May 2010 at 11:35
Also wanted to let you know I am rewriting the VOTE system so that it tracks
individual vote link timestamps per account number and NOT IP address (Why did
they
use IP to begin with for vote tracking? Yes, it is what casts the vote, but the
account number is more crucial to keeping tabs on the votes themselves, right??
Original comment by Stanbargers@gmail.com
on 8 May 2010 at 1:05
The only current issue I have seen is whenever you take down or restart a
realm, it
resets its `icon` in the $DB to 1 (PVP). I went through all of the code and
there is
no place that "$DB->select("UPDATE..." exists in regards to the realm type. Is
it
possible this problem is in the TC code itself, not the website PHP?
Original comment by Stanbargers@gmail.com
on 9 May 2010 at 9:00
I would say yes it is a trinity problem
Original comment by wilson.steven10@gmail.com
on 11 May 2010 at 5:27
Also, about the vote system, i think using the account number is good too, but
IP
address prevents people from taking advantage of the vote system because vote
sites
use IP address, so it made sense for the site to use the IP address as well
Original comment by wilson.steven10@gmail.com
on 11 May 2010 at 5:29
I looked over your code here and cant really see what you did. When it gets the
Uptime, its still not realm specific:
your code:
$uptime = time () - $DB->selectCell("select starttime FROM 'uptime' ORDER BY
starttime DESC LIMIT 9");
Original code:
$uptime = time () - $DB->selectCell("select starttime FROM uptime ORDER BY
starttime
DESC LIMIT 1");
Original comment by wilson.steven10@gmail.com
on 11 May 2010 at 5:41
I took down the updated code because I didn't want to bombard the whole site
with
it. Here is the snippit with the two corrections:
$population=0;
if($res_color==1)$res_color=2;else$res_color=1;
$realm_type = $realm_type_def[$result['icon']];
$realmnumber = $result['id']; //---- Create a RealmID Variable to test against.
if(check_port_status($result['address'], $result['port'])===true)
{
$res_img = './templates/WotLK/images/uparrow2.gif';
if($WSDB_EXTRA&&$CHDB_EXTRA) {
$population = $CHDB_EXTRA->selectCell("SELECT count(*) FROM `characters`
WHERE online=1");
$uptime = time () - $DB->selectCell("select `starttime` FROM `uptime`
WHERE `realmid`=$realmnumber ORDER BY `starttime` DESC LIMIT 1"); //-- Only
pull
from Uptime for the current realm. --//
}
}
Original comment by Stanbargers@gmail.com
on 13 May 2010 at 3:48
And yeah, for some reason, it did not upload the correct code in the file.
I will upload a pic of the working format. Take note that the servers are on
different machines from each other all linking into a common REALMD database.
Original comment by Stanbargers@gmail.com
on 14 May 2010 at 10:03
Attachments:
You will notice in the image everything but TEST CENTER (RealmID 1) reverted to
PVP
(Icon 1) when I rebooted them. It should be Chaos and Order (RealmID 2&3) PVP,
Purity (RID-4) Normal, Azeroth (RID-5) RP, and Tournament (RID-6) FFA_PvP.
Original comment by Stanbargers@gmail.com
on 14 May 2010 at 10:08
I have made a fix on this based on your code. Waiting for my internet to come
back on and I will upload the fix :) ... May take a couple days though
Original comment by wilson.steven10@gmail.com
on 15 Jul 2010 at 2:29
fixed. Thank you for you code submission :)
Original comment by wilson.steven10@gmail.com
on 24 Jul 2010 at 3:20
Original issue reported on code.google.com by
Stanbargers@gmail.com
on 1 May 2010 at 5:48