Members Overview

Post bugs or suggestions to the game here. Or discuss development topics.
Post Reply
Mr President
Advanced Member
Posts: 33
Joined: Tue Dec 18, 2007 1:11 am

Post by Mr President »

Seeing i am on such a great role and my ideas are going over sooooo well *laughs*, here is another one that i think would be VERY useful.

An overview priv. This priv would allow leaders and asst leaders (and anyone the leader want to allow) to see other members overviews by clicking a tab. This would help leaders or trainers of a nation keep track and help new members get started. A new member could say ok what do i do now? and the leader could simply click on that members overview tab and see his status and then advise him what to do from there.

User avatar
Death
Furi Kuri
Posts: 641
Joined: Tue Apr 03, 2007 4:34 am
Contact:

Post by Death »

mhm, We have this over at Valhall in all of the games, it's a solid idea.
Dralfith: OH MY GOD
Dralfith: THIS IS TOO MUCH
Dralfith: (Profanity is a sign of Maturity)
Dralfith: WHY DID WE DO THIS?!
Acid Soulxx: I DON'T KNOW, WE MIGHT BE GLUTTONS FOR PUNISHMENT.
FireFrenzy
Advanced Member
Posts: 92
Joined: Tue Jul 17, 2007 8:30 pm

Post by FireFrenzy »

yeah, I've got this working on my game, but I'm not sure of the security aspect, as I've learned programming autodidactically.

So I'm up to doing this myself, but before I make any changes, a quick question to Beatles and whomever else has more comprehensive and formal knowledge of the language:

My thought was to make the country name link to the status page, sending the variable 'user':

code: Select all

<?
 $user = '&user='.$listclan[num]; //to display individual country Status pages
?>
    <a href="?status<?=$user?><?=$authstr?>"><?=$listclan[empire]?></a></th>
And switch the variable 'users' on the status page if the 'user' variable is sent:

code: Select all

if (isset($_GET['user'])) {
	$user = loadUser($_GET['user']);
	if ($users[clan] == $user[clan])
  $users = $user;
}
Would this suffice, or is it insecure? I'm wondering how to go about this in a simple but sensible manner, and I have no knowledge of how other games have gone about this.
User avatar
The Beatles
Fear me for I am root
Posts: 6285
Joined: Tue May 24, 2005 8:12 pm

Post by The Beatles »

I believe loadUser already does database validation. But just to avoid null pointers I would stick in an "if($user)" check in case there isn't such a user.

Also, that is fine, but make sure you restore the $users variable by the time your page ends, or you will print the other user's closing status bar instead of your own. So e.g.
$backupUsers = $users;
...
$users = $backupUsers;

Also, you definitely need to check if $users[clan] is zero! Otherwise any unclanned empire gets free espionages on other unclanned empires.

Finally, it would be nice if the other person had a say in this. Set some sort of flag that is reset every time they join a new clan (say, $user['sharestatus'] if they want to allow the clan leader to be able to view their status). The button for toggling it could be on the status page "Allow clan officers to view" / "Disallow clan officers from viewing" "my status page".
:wq
FireFrenzy
Advanced Member
Posts: 92
Joined: Tue Jul 17, 2007 8:30 pm

Post by FireFrenzy »

Excellent, all good points. I'll work on getting them all programmed on my localhost and then go from there.
Post Reply
  • Members connected in real time

    🔒 Close the panel of connected members