collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 422
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: Ordering Forum Staff Block  (Read 7396 times)

0 Members and 1 Guest are viewing this topic.

Offline Kiwiee

  • Semi Newbie
  • *
  • Posts: 5
  • SMF Version: 2.0.2
  • SP Version: 2.3.4
Ordering Forum Staff Block
« on: April 22, 2012, 12:19:53 PM »
I know it's been asked hundreds of times, however, I can't seem to find the answer that I'm looking for.

I'm on SMF 2.0.2 and I have SP 2.3.4 and I have an issue with the Forum staff block.

I want the block to oder the staff in order of rank authority, starting at Owner, then Senior adminitratior, administrator, and finally operator.

Unfortunatelly I can't seem to do this and it's placing my operators above the Senior Administrators (which looks rather odd)

A link to the site: http://www.area-32.net/index.php

Thanks for the help from anyone, and by the way, I'm not too good at php, i'm still learning, so if it requires an edit, can whoever replies try and be simple? thanks!

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Ordering Forum Staff Block
« Reply #1 on: April 23, 2012, 04:15:43 PM »
I very much encourage you to move up to simpleportal 2.3.5, if at all possible.  It has several nice bug fixes, and some nice features added.

In simpleportal 2.3.5, in PortalBlocks.php, on line 2291, you can see that the key for the array is first -- account type (1=admin, 2=global mod, 3=local mod), and then the user id.

So all admins should come first, followed by all global moderators, followed by all local moderators.
Have you made any chages to portalblocks.php to change this behavior? You have added the operator group to this?
On line 2314, the array is sorted according to the key.




Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Kiwiee

  • Semi Newbie
  • *
  • Posts: 5
  • SMF Version: 2.0.2
  • SP Version: 2.3.4
Re: Ordering Forum Staff Block
« Reply #2 on: April 24, 2012, 11:49:27 AM »
Unfortunately all Admin, Senior Admin, and Operator are global moderators on the forums. Their rank seniority is related to a different server set entirely, they all require global moderation status and are sorted in user id mode. Hence the issue.

Is there a way to sort the users by "Head of Administration" first, "Senior Administrator" second, "Administrator" third, and "Operator" last. And is there a way to sort the users alphabetically after the initial sort, so that all operators are alphabetically ordered as well as being after administrators, for example?

I've also updated to 2.3.5. I must admit I was slow to decide to do so.

Edit: I'm aware since I've changed the administration around a little it looks slightly fixed, but it isn't.
« Last Edit: April 24, 2012, 12:34:17 PM by Kiwiee »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Ordering Forum Staff Block
« Reply #3 on: April 24, 2012, 02:23:44 PM »
Admin would come before the rest of the global mods, which would come before any local mods.

If your group of users is not changing, the easiest way to handle this is to just hard-code a couple of lines to sort them the way you like.

Otherwise, I would say that you could
1) Create different groups for different purposes (senior admin, admin, operator)
2) Add some code in function sp_staff to put every one of these groups in the output array
3) Assign codes 1-whatever based on the group they belong to
4) let sp_staff sort by code/userid as it does now.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Kiwiee

  • Semi Newbie
  • *
  • Posts: 5
  • SMF Version: 2.0.2
  • SP Version: 2.3.4
Re: Ordering Forum Staff Block
« Reply #4 on: April 24, 2012, 02:27:59 PM »
The second option sounds much easier, I have a feeling my staff will change over time.

Just a few questions. If I were to make new groups, what code would I add within sp_staff and order them by code? Really sorry for asking but I'm hopeless at php.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Ordering Forum Staff Block
« Reply #5 on: April 24, 2012, 03:09:00 PM »
I'm confident it could be done, but I haven't worked it out just yet. :)

the way I see it, right before $global_mods=
you would have to add some code to pull back members from a couple of groups, and merge that into the $all_staff array.
Then, during the SQL query pulling back all staff, it would have to pull the mg.group_id as well.

That group id would be used in coming up with $row['type'].

And that's it.

Mind if I move this to a customization board?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Kiwiee

  • Semi Newbie
  • *
  • Posts: 5
  • SMF Version: 2.0.2
  • SP Version: 2.3.4
Re: Ordering Forum Staff Block
« Reply #6 on: April 24, 2012, 03:33:48 PM »
I have no issue with this being moved to a customisation board if it can help other people and myself. If I'm honest I'm tempted to make a suggestion thread to have the forum staff block developed further. IE having the ability to choose which ranks to show, and in which way to order them as I know many people who would wish to have seperate "respected" or "featured" members for different reasons who may not all have moderator status.
« Last Edit: April 24, 2012, 04:06:14 PM by Kiwiee »