collapse collapse

* User Info

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

* Who's Online

  • Dot Guests: 140
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {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
  • phantomm: and from what I see only patch is broken, full install package is fine
    October 21, 2016, 03:44:44 PM

* Recent Posts

Where is the code for these elements, where are they stored? by danmsmith018f
[Yesterday at 04:23:44 PM]


Re: v 2.3.3 to v2.3.7 by ♦ Ninja ZX-10RR ♦
[December 11, 2018, 04:14:48 PM]


v 2.3.3 to v2.3.7 by rollingrock
[December 11, 2018, 09:36:20 AM]


[Block] Help with editing few lines on Simpleportal by Wallen
[December 09, 2018, 05:10:34 AM]


Re: LinkTree by Chen Zhen
[November 15, 2018, 02:24:51 PM]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

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

0 Members and 2 Guests are viewing this topic.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
SP - Add membergroups to the staff block - Plug-In
« on: November 26, 2011, 02:58:58 PM »
Add membergroups to the Simple Portal staff block

Compatible with Simple Portal v2.3.5 and SMF 1.1x or SMF 2.0x

This will install an extra permission under the heading of SimplePortal onto your SMF Forum.
This permission can be added to any existing membergroup and will allow that membergroup to appear in your Simple Portal staff block.
« Last Edit: July 10, 2013, 03:03:26 PM by Underdog »

Offline ZiFFeL

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: None
  • SP Version: None
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #1 on: November 28, 2011, 11:52:15 AM »
Hi thank you.
Do this MOD let me short the member group as i want?
regards

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #2 on: November 28, 2011, 01:24:48 PM »
Hi thank you.
Do this MOD let me short the member group as i want?
regards

It allows you to add whom you wish to your Simple Portal staff block.

  • Enabling the permission for a membergroup will allow all users in that membergroup to appear on the staff block.
  • To allow individual user additions, create a low ranked (1 star) membergroup (based off of regular permissions/unique permissions), enable the SP staff permission for it and then add users to that member group.
   
« Last Edit: August 16, 2012, 11:42:23 AM by Underdog »

Offline XGraf

  • Newbie
  • Posts: 3
  • SMF Version: 2.0
  • SP Version: 2.3.3
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #3 on: December 10, 2011, 12:45:23 PM »
Nice but how to remove some membergroups from Staff List block?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #4 on: December 10, 2011, 12:55:09 PM »
Nice but how to remove some membergroups from Staff List block?

??

In the permission settings for each membergroup there is a checkbox under the Simple Portal header that reads:
Enable SP staff permission

You enable it to make that entire membergroup show on the staff list and of course disable it if you do not want the users from that membergroup to appear in the staff block.
If you want to add individuals look at my last post.
Administrators will always show. 

Offline Kaede Akamatsu

  • Hero Member
  • *****
  • Posts: 2176
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: None
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #5 on: December 10, 2011, 12:56:04 PM »
Strange how SP doesn't have this by default

Offline ZiFFeL

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: None
  • SP Version: None
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #6 on: December 14, 2011, 04:45:38 PM »
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!!

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #7 on: December 15, 2011, 06:00:34 PM »
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.


Offline XGraf

  • Newbie
  • Posts: 3
  • SMF Version: 2.0
  • SP Version: 2.3.3
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #8 on: December 16, 2011, 08:16:09 AM »
I cant uderstand you very good(Im from Croatia). I have SP 2.3.4 and I want to remove hiden admins from staff list. Is it possible?

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #9 on: December 16, 2011, 10:20:26 AM »
Works well ... thanks.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #10 on: December 16, 2011, 05:38:30 PM »
I cant uderstand you very good(Im from Croatia). I have SP 2.3.4 and I want to remove hiden admins from staff list. Is it possible?

The last edit was not directed at you unless you want it to be in the same order.

For what you requested, try this:

File: Sources / PortalBlocks.php

find:
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
m.id_member, m.real_name, m.avatar, mg.group_name,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN m.id_group = {int:reg_group_id} THEN m.id_post_group ELSE m.id_group END)
WHERE m.id_member IN ({array_int:staff_list})',
array(
'staff_list' => $all_staff,
'reg_group_id' => 0,
)
);

replace with:
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
m.id_member, m.show_online, m.real_name, m.avatar, mg.group_name,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN m.id_group = {int:reg_group_id} THEN m.id_post_group ELSE m.id_group END)
WHERE m.id_member IN ({array_int:staff_list}) AND m.show_online = 1',
array(
'staff_list' => $all_staff,
'reg_group_id' => 0,
)
);

Offline Yngwiedis

  • Jr. Member
  • **
  • Posts: 67
  • SMF Version: None
  • SP Version: 2.3.3
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #11 on: March 21, 2012, 01:48:28 AM »
Is not working in SimplePortal 2.3.5 RC1. 
Can you please fix it?

Thank you very very much.

Offline Yngwiedis

  • Jr. Member
  • **
  • Posts: 67
  • SMF Version: None
  • SP Version: 2.3.3
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #12 on: March 26, 2012, 05:21:15 PM »
Any help please ?

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #13 on: March 26, 2012, 06:27:11 PM »
Any help please ?

Please have some patience.

Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline Yngwiedis

  • Jr. Member
  • **
  • Posts: 67
  • SMF Version: None
  • SP Version: 2.3.3
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #14 on: March 26, 2012, 06:48:26 PM »
OK. Sorry...

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #15 on: March 26, 2012, 08:28:29 PM »
This modification works fine with SP v2.3.5 RC1.

You would need to uninstall it prior to upgrading SimplePortal and then reinstall it afterward.
This applies to any plugin.



Offline Yngwiedis

  • Jr. Member
  • **
  • Posts: 67
  • SMF Version: None
  • SP Version: 2.3.3
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #16 on: March 27, 2012, 02:07:15 AM »
Hello...

Yes you are right.
This is the only plugin for SP i have and i didn't know that i need to uninstall it before uninstall previous version of SP.

Now everything is ok.

Thank you very very much.

Offline Nilas

  • Just Registered
  • Posts: 1
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #17 on: June 13, 2012, 01:14:48 AM »
Sorry for necroposting but I had a quick question.

I've been using the mod here and I was able to hide/show specific groups on my simple portal Staff List, however I was unable to hide specific board moderators from said list as there is no option to do so. Is there anyway I can hide board moderators? I tried adding the board moderators to another group which I made hidden from the list however they were still not hidden since they're tied to the moderator group. What can I do to hide them?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #18 on: August 15, 2012, 12:38:14 PM »
Sorry for necroposting but I had a quick question.

I've been using the mod here and I was able to hide/show specific groups on my simple portal Staff List, however I was unable to hide specific board moderators from said list as there is no option to do so. Is there anyway I can hide board moderators? I tried adding the board moderators to another group which I made hidden from the list however they were still not hidden since they're tied to the moderator group. What can I do to hide them?

Nilas,

If you edit your staff block you will see the following checkbox option:
Quote
Disable Local Moderators
.. if you check the box it may give you the desired effect.

So you are requesting that I add a feature to not display individuals belonging to a membergroup?
Then if you add user(s) to that group they will simply not appear no matter which other membergroup they belong to?
I may implement this as it gives the admin more control over it but this is also currently possible.
Any group you create to have only those individuals show (except admins always show) should be set to use unique permissions. This way you can control it so only the members added to that group will appear on the block (+ Admins). Do not set this membergroup to inherit any permissions from other groups. The list will show what their primary member group is set to (not this one unless you set it to do so).


« Last Edit: August 15, 2012, 01:54:18 PM by Underdog »

Offline Aquafan

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 2 RC1.2
  • SP Version: 2.3
Re: SP - Add membergroups to the staff block - Plug-In
« Reply #19 on: October 10, 2012, 05:17:41 AM »
How to add the sqll by hand?
i cant seem to find it

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: 1335
  • 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: 1335
  • 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: 1177
  • 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