Legend of the Green Dragon
Go Back   LotGD.net Forum > Gameplay > Newbie Player Forum - What is this about? How do I do something?
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2004, 12:33 AM
Voratus Voratus is offline
 
Join Date: Dec 2003
Location: New Orleans, LA
Posts: 137
Voratus
Send a message via ICQ to Voratus Send a message via AIM to Voratus Send a message via MSN to Voratus Send a message via Yahoo to Voratus
Default "Hidden" accounts

Does anyone have an idea if it would be possible, and if so how easy, to make user accounts "hidden", in that browsing the users they wouldn't display.
I can only imagine creating a new field in the accounts table called "hidden" (for example), and making it either 1 or 0, 0 being default.
Then in the list.php, adding in to not display users with a ['hidden']==1.
The syntax of the list.php isn't as simple (to me, at least) as other pages, so I don't really know of a way to implement it there.
The reason is I created an account and took away its display name, and I use it to denote simple actions, or to RP the NPCs. However, it still is listed on the warrior list, just with no name (and level 0). I'd like for it to be invisible.
Or, a way for an admin to enter complete text in a "chat" page, instead of "charactername says" or "charactername does".

(edited as I changed the internal wording around)
__________________
Voratus
Devouring souls for fun and profit
LotGD at Domarr's Keep
Reply With Quote
  #2  
Old 01-29-2004, 05:46 PM
rax rax is offline
Banned
Village Idiot
 
Join Date: Dec 2003
Location: Raleigh, NC
Posts: 5
rax
Send a message via ICQ to rax Send a message via AIM to rax Send a message via Yahoo to rax
Default

I've implemented something similar on my server. I added a field in accounts called 'npc' and use it as a boolean that I set to true for accounts I don't want to show up. Then I modified the SQL statements to filter out those characters.

Example:

$sql = "SELECT name,login,alive,location,sex,level,laston,loggedi n,lastip,uniqueid FROM accounts WHERE locked=0 AND npc=0 $search ORDER BY level DESC, dragonkills DESC, login ASC $limit";

I also use this field for keeping tests accounts from appearing in the daily news (when I'm testing things that cause events to be logged) Just put everything inside function addnews() inside an if block:

if($session[user][npc] == 0){
//Code to add to the news here
}



Hope that helps!!
Reply With Quote
  #3  
Old 01-29-2004, 08:53 PM
Voratus Voratus is offline
 
Join Date: Dec 2003
Location: New Orleans, LA
Posts: 137
Voratus
Send a message via ICQ to Voratus Send a message via AIM to Voratus Send a message via MSN to Voratus Send a message via Yahoo to Voratus
Default

I was just tinkering in the files, and I wound up doing exactly what you did, except my field was called "hidden", and I just added a AND hidden=0 to the SQL query to display the warriors, and also added it to where it takes the count.

I'll look into the news thing, too.
__________________
Voratus
Devouring souls for fun and profit
LotGD at Domarr's Keep
Reply With Quote
  #4  
Old 02-07-2004, 10:02 PM
lonestrider's Avatar
lonestrider lonestrider is offline
 
Join Date: Jan 2004
Location: Los Angeles, California
Posts: 52
lonestrider
Default Re: "Hidden" accounts

Quote:
Originally Posted by Voratus
Does anyone have an idea if it would be possible, and if so how easy, to make user accounts "hidden", in that browsing the users they wouldn't display.
(edited as I changed the internal wording around)
What I've got working rather well on LegendGard is pretty simple. Instead of bloating the account database with yet another field (I've enough already), I've gone ahead and added another type of superuser (in this case Superuser4) which I call in my User.php (Admin -stealth)

Then I make sure the HOF, List and the Index don't log Superuser 4.

That is the easiest way to go about it and it works great on
Legendgard Elite.
Reply With Quote
  #5  
Old 02-09-2004, 03:48 PM
rax rax is offline
Banned
Village Idiot
 
Join Date: Dec 2003
Location: Raleigh, NC
Posts: 5
rax
Send a message via ICQ to rax Send a message via AIM to rax Send a message via Yahoo to rax
Default Re: "Hidden" accounts

Quote:
Originally Posted by lonestrider
What I've got working rather well on LegendGard is pretty simple. Instead of bloating the account database with yet another field (I've enough already), I've gone ahead and added another type of superuser (in this case Superuser4) which I call in my User.php (Admin -stealth)

Then I make sure the HOF, List and the Index don't log Superuser 4.

That is the easiest way to go about it and it works great on
Legendgard Elite.
I completely understand what you are trying to do by avoiding excessive fields in the database (I too am trying to keep things as neat and efficient and possible). The only problem I see is that your Superuser4 accounts will all have at least Admin level access (3+), which could create a security risk.

I'm not sure if you could do this, but could you not create a "stealth" account as super user level -1 and just filter off of that? The reason I ask is because my hidden characters aren't really admins, just npcs I use for adding commentary, etc.
Reply With Quote
  #6  
Old 02-14-2004, 09:22 PM
lonestrider's Avatar
lonestrider lonestrider is offline
 
Join Date: Jan 2004
Location: Los Angeles, California
Posts: 52
lonestrider
Default Re: "Hidden" accounts

Quote:
Originally Posted by rax
I'm not sure if you could do this, but could you not create a "stealth" account as super user level -1 and just filter off of that? The reason I ask is because my hidden characters aren't really admins, just npcs I use for adding commentary, etc.

Well, for me, there's no security risk, for I wouldn't GIVE a stealth account to anyone but the HIGHEST level admin. NPCs and such I'd actually WANT to be seen online, but I imagine there's two ways you can do it. First, if you move your admin level to 4 or 5, then your stealth level could be 3.

But then you'd have to go through the entire Superuser accessable code and change the [user][superuser]>3
to >4(or 5)

I don't know if a negative number would work, but I don't see why it wouldn't. It's just an INT field, so it should.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"List Warriors" access in the Land of the Shades X-Kal Newbie Player Forum - What is this about? How do I do something? 1 10-19-2005 01:07 AM
New Series -- "Adventures of the Green Dragon" tilleyrw Village Square 22 08-27-2005 06:58 PM
Please add current level to "View Membership" clan Marusynn Newbie Player Forum - What is this about? How do I do something? 10 07-24-2004 02:49 PM
"Find You" in Hall of Fame yawgodemt Newbie Player Forum - What is this about? How do I do something? 14 12-29-2003 11:24 AM
New forum with "page" access feahyarmen Newbie Player Forum - What is this about? How do I do something? 7 12-14-2003 07:58 PM


All times are GMT -5. The time now is 05:55 PM.


LotGD skin design by Ben 'blarg' Wong
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.