Question about admi...
 
Notifications
Clear all

Question about admin level names...

7 Posts
4 Users
0 Reactions
1,549 Views
(@undrockroll)
Posts: 41
Eminent Member
Topic starter
 

URL to your eFiction: http://fiction.tokiohotelfiction.com
Version of eFiction: 3.4.3
Have you bridged eFiction, if so with what?: n/a
Version of PHP: n/a
Version of MySQL: n/a
Have you searched for your problem: yes
If so, what terms did you try: change admin levels name
State the nature of your problem: n/a
Do you have a test account for us? n/a

I have a question - is it possible to change the admin level names? for example, right now it's, you know, Admin -1, Admin -2, etc. is it at all possible for us to change Admin - 1 to "Founder" and Admin - 2 to "Head Admin" and stuff like that? or this is something that can't be done?

just wondering - thank you very much for your time. πŸ™‚


 
Posted : 19/08/2008 4:00 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

I think it's located in the language file:

define ("_ADMINISTRATOR", "Administrator"); (line ~384)

The code for the actual {userlevel} is this:

$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);

You could probably edit it that way, too. (i.e. if($userinfo['level'] == 1))


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 19/08/2008 5:25 pm
(@undrockroll)
Posts: 41
Eminent Member
Topic starter
 

well, I understood the first part but I think the second part goes beyond my skill - I can't even find it. :B so thank you anyway. πŸ™‚ πŸ™‚ I just don't think I'll be able to do this.


 
Posted : 19/08/2008 5:48 pm
(@becca)
Posts: 553
Honorable Member
 

What Jenny means is that you can open up en.php (I believe) in Notepad or some other text editor for example (not Wordpad or Word) if you're using a pc. And go to that line (384) and change "Administrator" to what you would like "Administrator" to be called. For example it would look like this if you wanted to change Administrator to Owner or something.

define ("_ADMINISTRATOR", "Owner");

You wouldn't change _ADMINISTRATOR, just "Administrator", so that it would now display 'Administrators' as 'Owners'. I hope that's a little clearer. That should be all you would have to change I think. And go on changing the other admin level names to whatever you'd like, just not the underscored, capital ones, as the script would be reading that in order for it to output whatever text would be after the comma in parenthesis.


 
Posted : 19/08/2008 8:28 pm
(@undrockroll)
Posts: 41
Eminent Member
Topic starter
 

That should be all you would have to change I think. And go on changing the other admin level names to whatever you'd like, just not the underscored, capital ones, as the script would be reading that in order for it to output whatever text would be after the comma in parenthesis.

Yes, I understand how to change "Administrator" to something different, but I am stumped on how to change "Admin-2" to "Mod" and so forth. It seems like if I change it, then it must carry on with that title for every type of admin/mod. :


 
Posted : 21/08/2008 3:05 am
(@tammy)
Posts: 2577
Member Moderator
 

It's not defined anywhere.  You'd have to code it into profile.php


 
Posted : 21/08/2008 5:43 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

well, I understood the first part but I think the second part goes beyond my skill - I can't even find it. :B so thank you anyway. πŸ™‚ πŸ™‚ I just don't think I'll be able to do this.

In profile.php, instead of the code above (which is the original) I use this:

if (isset($userinfo['level'])) {
if ($userinfo['level'] == 1) $custom_userlevel = 'Administrator (Founder)';
elseif ($userinfo['level'] == 2) $custom_userlevel = 'Administrator (Head Admin)';
elseif ($userinfo['level'] == 3) $custom_userlevel = 'Moderator';
else $custom_userlevel = _MEMBER;
}

$tpl->assign("userlevel", $custom_userlevel);

It's longer than the original, but that's the general gist. πŸ˜€

It checks to see if the user level is "set" (which it should be all the time, I suppose?), and then it runs through if/elseif/else.

If the user level for user is 1 (the highest) then I have the "custom userlevel" variable set up to output: "Administrator (Founder)", and so forth. You duplicate the line of code for a level four administration, but in this I didn't bother. For the last line (else $custom_userlevel = _MEMBER), it means that if the user level ISN'T 1, 2 or 3 ... then it should output _MEMBER instead.

I can explain more if you want, or if you still have trouble.


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 22/08/2008 2:18 pm
Share: