collapse collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 146
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • ♦ 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
  • phantomm: and from what I see only patch is broken, full install package is fine
    October 21, 2016, 03:44:44 PM
  • phantomm: they say it for over 3 weeks now..
    October 21, 2016, 03:43:52 PM

* Recent Posts

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: SP - Add membergroups to the staff block - Plug-In  (Read 21215 times)

0 Members and 2 Guests are viewing this topic.

Offline Snoopix

  • Semi Newbie
  • *
  • Posts: 26
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #20 on: July 08, 2013, 04:26:04 AM »
how i can change icon of additional staff membergroups?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1325
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #21 on: July 08, 2013, 09:55:40 PM »
Snoopix,

  It shows the member's avatar and a small icon which is the global mod icon.  Sinan only provided 3 icons to choose from which is admin, global and local moderator.

  Are you asking to change it to local moderator or are you asking me to add the option of a custom icon?
Perhaps a like icon that is the color that you chose for the membergroup?

  The attachment is an example that will use the membergroup color to opt a specific colored icon. Please peruse the readme during installation to see which 9 color options it will accept.

Uninstall and delete the previous version of this mod prior to using the attachment below.
 
« Last Edit: July 09, 2013, 02:12:17 AM by Underdog »

Offline Burke Knight

  • Sr. Member
  • ****
  • Posts: 394
  • Gender: Male
  • I tell it how I see it. Don't like it? Hit Alt+F4
    • BurkeKnight Enterprises
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #22 on: December 13, 2013, 08:22:28 AM »
Ok, i have already install the mod, but i hace 3 member groups for the staff block, and i want to put first webmaster, then admins and finally super moderator, if i put the permission on admins a super they appear mixed, but i want to appear separatley.

Is there any way to short members by name or something like that?

Regards and thank you before hand!!

Make a copy of the noted file before editing it so that when I update this mod you can replace it back again beforehand.
 
File: Sources / PortalBlocks.php
Find:
Code: [Select]
WHERE m.id_member IN ({array_int:staff_list})',

Replace with:
Code: [Select]
WHERE m.id_member IN ({array_int:staff_list}) ORDER BY mg.id_group, m.real_name',

Find:
Code: [Select]
ksort($staff_list);

Replace with:
Code: [Select]
/* ksort($staff_list); */

That should put it in order of membergroup id & then alphabetical.
When I adjust it some more I will update the mod.



I tried this, yet it still lists the groups the same order as before doing it.
My groups I want to show:
Administrators
Global Moderators
Support Team

How it shows it, before and after editing the PortalBlocks.php file:
Administrators
Support Team
Global Moderators


Any idea on why it wont reorder them after doing the above?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1325
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #23 on: December 13, 2013, 11:42:32 PM »
BurkeKnight,

File: Sources / PortalBlocks.php
Find:
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
m.id_member, m.real_name, m.avatar, mg.group_name, mg.online_color,
a.id_attach, a.attachment_type, a.filename

replace with (add m.id_group to the query):
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
m.id_member, m.real_name, m.avatar, mg.group_name, mg.online_color,
a.id_attach, a.attachment_type, a.filename, m.id_group


find:
Code: [Select]
'type' => $row['type'],

replace with (add group_id to the array):
Code: [Select]
'type' => $row['type'],
                        'group_id' => $row['id_group'],

find:
Code: [Select]
$staff_list = sp_sortmultiple($staff_list, 'type', 'ASC');

replace with (sort array by group_id):
Code: [Select]
$staff_list = sp_sortmultiple($staff_list, 'group_id', 'ASC');

That should work for you, if not I have another solution.

Offline Burke Knight

  • Sr. Member
  • ****
  • Posts: 394
  • Gender: Male
  • I tell it how I see it. Don't like it? Hit Alt+F4
    • BurkeKnight Enterprises
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #24 on: December 14, 2013, 08:15:44 AM »
That worked. :)

If you have one that has an array so can custom sort, I really could use that for another site.
Would allow me to use the staff block for that site in a really neat way. :)


Thank you, my friend.

Offline LittleFang

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #25 on: September 11, 2018, 06:46:55 PM »
I really need a mod that does this and I'm failing everywhere I turn.  The zip files are corrupt and I cannot extract them, much less install them.  Is everyone having the same issue, or can I just not download anything from this forum?

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1173
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #26 on: September 13, 2018, 08:51:04 AM »
I really need a mod that does this and I'm failing everywhere I turn.  The zip files are corrupt and I cannot extract them, much less install them.  Is everyone having the same issue, or can I just not download anything from this forum?
Already replied to you on here :)
Same reason, hopefully someone has a copy, with all of those downloads.
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

▼ My job! ▼

No PMs for support unless it's a paid request. Thank you! :)
#OpIsis