A change for the worse on RHP?

A change for the worse on RHP?

Only Chess

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.

l

Milton Keynes, UK

Joined
28 Jul 04
Moves
80236
08 Jun 11

Originally posted by yashin
[b]
lausey was correct I think

I found this in the code:

document.write('<a class="loggedInInfo" href="/core/gameserve.php">' + nGamesWaiting + ' game' + (nGamesWaiting>1?'s':''😉 + ' waiting</a><a href="#" onclick="XPopGamesUrgent( event );return false;">

I bet it used to be:

document.write('<a class="loggedInInfo" href="/core/gameser ...[text shortened]... interested in these bug-hunting thingies.[/b][/b]
For a non-programmer, it is very well deduced. You also noticed that it was done in the Javascript rather than the PHP (the PHP code will not be visible to the end user). I think your solution will work. Although this will be more efficient:

document.write('<a class="loggedInInfo" href="/core/gameserve.php">' + nGamesWaiting + ' game' + (nGamesWaiting<>1?'s':''😉 + ' waiting</a><a href="#" onclick="XPopGamesUrgent( event );return false;">

Although my Javascript is a little rusty. I am not sure if "not equals" is <> or !=.

RHP Code Monkey

RHP HQ

Joined
21 Feb 01
Moves
2419
10 Jun 11

What has amused me about this mistake is that someone sent feedback saying "are you EVER going to fix the 1 games waiting" error.

So, I replied saying that after nearly a decade, I probably should, and it was a low risk modification that could be hot fixed, so approx. 3 minutes later the solution was live - but as you discovered, broken in another (and really stupid) way.

If you hit ctrl+refresh in your browser to reload the javascript you will find the problem is fixed. (Or is it...? 😉 )

Joined
08 Apr 09
Moves
19530
10 Jun 11

Originally posted by Russ
What has amused me about this mistake is that someone sent feedback saying "are you EVER going to fix the 1 games waiting" error.

So, I replied saying that after nearly a decade, I probably should, and it was a low risk modification that could be hot fixed, so approx. 3 minutes later the solution was live - but as you discovered, broken in another (and real ...[text shortened]... your browser to reload the javascript you will find the problem is fixed. (Or is it...? 😉 )
How much did it cost to buy the 's' back? ;-)