Warning: preg_replace_callback(): Requires argument 2, '$func['entity_fix']('\2')', to be a valid callback in /nfs/c01/h06/mnt/10927/domains/dragonprime.net/html/Sources/Load.php(225) : runtime-created function on line 3
Online List pref add
DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 20, 2019, 02:33:47 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Online List pref add  (Read 7148 times)
0 Members and 1 Guest are viewing this topic.
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 1065



View Profile WWW
« on: July 04, 2011, 01:07:09 PM »

So I have the online list for the homepage to split people up from staff and players.  I have a few people set to never expire and I was wondering if someone could help me on the pref needed to put an option in the user editor to either keep them on the list as staff or move them to the player list.  Thats the part I wouldnt know how to go about.  Any help is great.

Thanks
Logged

KaosKaizer
Mod God
*****
Offline Offline

Posts: 1016


Zeno's Arrow never hits the mark.


View Profile
« Reply #1 on: July 04, 2011, 01:54:59 PM »

Are you talking about this module: http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=558
If so, read on.

It's not a pref, it's in the code. Anyone that has a superuser value of 1 or greater is automatically put in the staff list. To change that, you'd have to change the code. It would be more than a little revision, though, as you would not only be changing the check for the SU list, but also changing it for the normal list as well.

EDIT
I would post the change up, but I'm rather busy, sorry. If I had more time, I would change it for you.

EDIT 2
I think I misread... if you are trying to add a pref to do that, then it's still the same. You still need to alter both checks, but with another line or two each.
« Last Edit: July 04, 2011, 01:58:42 PM by KaosKaizer » Logged

My Mods
I'm not currently a fully active member of DP, though I do respond to most PMs.
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 1065



View Profile WWW
« Reply #2 on: July 04, 2011, 07:09:30 PM »

Yea I want a pref so i can change them from staff to player if all they have is never expire.  but i need someone to do it as i dont know how.   i'm kinda clueless  and yes that was the module
Logged

MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #3 on: July 05, 2011, 09:30:07 AM »

Do you have a module installed that allows you to select players as staff? eg: stafflist.php

If so then use the prefs from this instead of adding a pref to the onlinelist module. Smiley
Logged

Check My Modules for the latest versions.
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 1065



View Profile WWW
« Reply #4 on: July 06, 2011, 01:54:39 AM »

But when I go to the homepage they are there and we dont want them there.  We want them under player not staff.  So  thats why i wanted an option in user editor that allowed me to move them from  staff to player  and its for the online list because thats the module doing it
Logged

!Aiden
Captain of the Guard
***
Offline Offline

Posts: 105


Lacking..?


View Profile WWW
« Reply #5 on: July 06, 2011, 01:46:39 PM »

But when I go to the homepage they are there and we dont want them there.  We want them under player not staff.  So  thats why i wanted an option in user editor that allowed me to move them from  staff to player  and its for the online list because thats the module doing it

I need something similar as I have the Gamemaster flag listed as a donation incentive for my roleplayers. A big boom in donations has earned a few people with this flag. It shows them as staff on the home page, and gives them grotto access.

Is there a way I can remove the grotto access and the online as staff.
Logged
backflip
Codemeister
****
Offline Offline

Posts: 278


om nom nom


View Profile WWW
« Reply #6 on: July 14, 2011, 01:24:42 AM »

But when I go to the homepage they are there and we dont want them there.  We want them under player not staff.  So  thats why i wanted an option in user editor that allowed me to move them from  staff to player  and its for the online list because thats the module doing it
Change line 33 to
$sql="SELECT name,alive,location,sex,level,laston,loggedin,lastip,uniqueid FROM " db_prefix("accounts") . " WHERE locked=0 AND loggedin=1 AND superuser > 0 AND superuser != ".SU_NEVER_EXPIRE." AND laston > '".date("Y-m-d H:i:s",strtotime("-".getsetting("LOGINTIMEOUT",900)." seconds"))."' ORDER BY superuser DESC, level DESC";
and line 46 to
$sql="SELECT name,alive,location,sex,level,laston,loggedin,lastip,uniqueid FROM " db_prefix("accounts") . " WHERE (superuser = 0 OR superuser = ".SU_NEVER_EXPIRE.") AND locked=0 AND loggedin=1 AND laston>'".date("Y-m-d H:i:s",strtotime("-".getsetting("LOGINTIMEOUT",900)." seconds"))."' ORDER BY level DESC";

I need something similar as I have the Gamemaster flag listed as a donation incentive for my roleplayers. A big boom in donations has earned a few people with this flag. It shows them as staff on the home page, and gives them grotto access.

Is there a way I can remove the grotto access and the online as staff.
Maybe hook into the village square and shades to blocknav players? That would suck, but so does giving them the game master flag. Is that only for /game?
« Last Edit: July 14, 2011, 01:29:56 AM by backflip » Logged

Bruce Schneier's functions don't have parameters. They have arguments, and they always win them.
Frodolin LoGD
JollyGG
Mod God
*****
Offline Offline

Posts: 607


Jolly Good!


View Profile WWW
« Reply #7 on: July 15, 2011, 04:21:08 AM »

Oooh, backflip, you're a god I swear, lol, I spent HOURS poring over that SQL query trying to figure that out for Sara, lol.

Thanks!
« Last Edit: July 15, 2011, 12:25:02 PM by JollyGG » Logged

Senior Staff Coder to: RPGLink
Supporter of: Forbidden Realm and LotGD4Adults2.
Released Modules: Here
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 1065



View Profile WWW
« Reply #8 on: July 15, 2011, 12:23:18 PM »

Woot!  It worked.  So people with only never expire get moved....Woot Tested it!  Thank you thank you thank you so much!
Logged

lil-star2u
Militia
**
Offline Offline

Posts: 28


View Profile WWW
« Reply #9 on: July 15, 2011, 03:24:43 PM »

I have a alt on my game with some flags just in case my main cant get in, how can I hide that alt from the staff list? I use the Alternative Sorting module as well. As of right now the alt shows as staff.
Thanks
Logged




(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
JollyGG
Mod God
*****
Offline Offline

Posts: 607


Jolly Good!


View Profile WWW
« Reply #10 on: July 15, 2011, 08:38:10 PM »

It could prolly be done, maybe a little rewording to backflip's fix
Logged

Senior Staff Coder to: RPGLink
Supporter of: Forbidden Realm and LotGD4Adults2.
Released Modules: Here
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #11 on: July 16, 2011, 06:20:02 AM »

I use the staff module to list people as staff. My onlinelist module uses this to only show those people in the staff category. No SU flags are taken into account. That's what I was saying in my earlier post.

That query above doesn't account for the other flags.
Logged

Check My Modules for the latest versions.
backflip
Codemeister
****
Offline Offline

Posts: 278


om nom nom


View Profile WWW
« Reply #12 on: July 16, 2011, 09:15:10 AM »

I use the staff module to list people as staff. My onlinelist module uses this to only show those people in the staff category. No SU flags are taken into account. That's what I was saying in my earlier post.

That query above doesn't account for the other flags.
It doesn't because it's not supposed to. All it was supposed to do is exclude all members that ONLY have SU_NEVER_EXPIRE from the staff list, which it does.

Quote
I have a alt on my game with some flags just in case my main cant get in, how can I hide that alt from the staff list? I use the Alternative Sorting module as well. As of right now the alt shows as staff.
Thanks
Change the query to exclude certain acctids.
Logged

Bruce Schneier's functions don't have parameters. They have arguments, and they always win them.
Frodolin LoGD
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #13 on: July 16, 2011, 03:06:58 PM »

That query above doesn't account for the other flags.
It doesn't because it's not supposed to. All it was supposed to do is exclude all members that ONLY have SU_NEVER_EXPIRE from the staff list, which it does.

I know this, all I was saying is that it doesn't take into account players with any other flag that aren't on the staff list. Somebody mentioned recently that they allow players to buy the game master flag, then you might also have people who are developers, but not staff.

Yes, your code does what Megan asked for, but I was just making her aware of other situations that might come up. Smiley
Logged

Check My Modules for the latest versions.
JollyGG
Mod God
*****
Offline Offline

Posts: 607


Jolly Good!


View Profile WWW
« Reply #14 on: July 18, 2011, 02:37:30 PM »

Along the lines of something else Marc and Backflip, would this query work for determining if a player is on the staff list or not? If so, I can greatly expand on this for Sara in ways she'd like Tongue

Code:
$sql = "SELECT a.name,a.acctid,alive,location,sex,level,laston,loggedin,lastip,uniqueid FROM " . db_prefix("accounts") . " WHERE locked=0 AND loggedin=1 AND laston > '".date("Y-m-d H:i:s",strtotime("-".getsetting("LOGINTIMEOUT",900)." seconds"))."' AS a INNER JOIN " . db_prefix("module_userprefs") . " AS p ON p.userid = a.acctid WHERE p.modulename = 'stafflist' AND p.setting = 'rank' AND p.value >0 ORDER BY rank DESC";
Logged

Senior Staff Coder to: RPGLink
Supporter of: Forbidden Realm and LotGD4Adults2.
Released Modules: Here
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
76 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search