collapse collapse

* User Info

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

* Who's Online

  • Dot Guests: 87
  • 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

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]


Re: blocks showing user avatars by hulapyk
[November 15, 2018, 01:47:11 PM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: [Plugin] SP - Extra Shoutbox Permissions/Options  (Read 58692 times)

0 Members and 1 Guest 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
[Plugin] SP - Extra Shoutbox Permissions/Options
« on: August 22, 2012, 12:42:13 AM »
[Plugin] SP - Extra Shoutbox Permissions/Options

This will install:
  • extra options within each unique Simple Portal shoutbox settings
  • membergroup permissions under the heading of SimplePortal
 
The extra permissions can be enabled/disabled for any existing membergroup and the extra options can be specific to each shoutbox which will allow a forum administrator more control over shoutbox functions.   



      Simple Portal Extra Shoutbox Options v1.7
      Developed for SMF 2.0.X forums c/o Chen Zhen @ web-develop.ca
      Copyright 2013, 2014, 2015, 2016 webdev@web-develop.ca
      This software package is distributed under the terms of the GNU General Public License
      http://www.gnu.org/licenses/gpl.txt



Constituents

New Features

These are additional features that are available within each shoutbox unique settings.
  • Custom Permissions -> Read Only [R]
  • Force Lowercase (possibly used for regex)
  • Regex filter (flavour/pattern)
  • Regex callback (PHP)
  • Reset regex to defaults option
  • Exempt Administrators from the regex filter
  • Consecutive shout limit
  • Consecutive limit exceeded warning (BBCode parsed)
  • Maximum single shout input characters setting
  • Disallowed hyperlink warning (BBCode parsed)

Permissions

These are site wide permissions meaning they affect all Simple Portal shoutboxes on your website.
Unique shoutbox permissions work in conjunction with these although the newer permission set has authority.
They are available in your membergroup permission settings.
  • Allow/Disallow viewing of shouts
  • Allow/Disallow posting of shouts
  • Allow/Disallow posting links
  • Allow/Disallow deletion of own shouts
  • Allow/Disallow editing of own shouts
  • Allow/Disallow whispering option
  • Enable/Disable filter of shout text via regex & callback (configurable)
  • Enable/Disable limiting amount of consecutive shouts
  • The above settings are available for Guest permissions (<- can opt guests to use the shoutbox)

General Features

These are general features that were added and/or changed from the shoutbox default behaviour.
They do not require any change of options as they are automatically applied.
  • Word-wrap added to css of each shout to prevent possible horizontal scroll bar
  • General warning displayed in some circumstances instead of fatal error message




Default behaviour relies on this setting:
Enable: Force Lowercase Text

Default regex for v1.5+
Code: [Select]
(?:^|[\.\!\?]\s+)\w|([^:]\b[i|o]\b)

Default callback for v1.5+
Code: [Select]
mb_strtoupper($m[0], $encoding)


Annotation:
  • the globals:  ~ $context, $smcFunc & $modSettings  ~ are already available within your callback
  • $encoding is also available (default forum character encoding) which may be necessary within some php functions
  • Unicode is automatically configured for all regex usage so long as UTF-8 encoding is being used
  • SMF 2.0.X branch uses XHTML therefore the constant of ENT_XHTML is used within some PHP functions
  • PHP 5.4+ is required to use this plug-in







If you are updating this modification, you will need to uninstall/delete the older version prior to installing the updated version.
The default regex may change with version updates so be sure to check them if you use the defaults.
« Last Edit: March 15, 2018, 01:03:42 PM by Chen Zhen »

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #1 on: August 22, 2012, 03:08:23 AM »
awesome! :)
This permissions should be by default in SP package :)

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #2 on: June 26, 2013, 12:07:57 AM »

SP-xtra_shout-perms_v1.1x.zip

Changes:

+ SMF 2.0x support only
+ Added ability to allow selected membergroups to delete their own shouts

Offline inter

  • Translator
  • *
  • Posts: 32
  • Gender: Male
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #3 on: June 27, 2013, 07:54:05 AM »
awesome! :)
This permissions should be by default in SP package :)
+ 1

thanks
« Last Edit: June 27, 2013, 07:57:55 AM by Inter »

Offline PokemonS

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Female
    • Pokemon Stars Indonesia
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Shout Permission
« Reply #4 on: August 04, 2013, 03:47:50 AM »
SP 2.3.5

Hi,

There are two shoutbox in my forum. One is for member chat, and the other is for news.
Shoutbox for news should not be shoutted by members.

So, how to add shout permission for every shoutbox?
Yes, I have this plugin, and I still use it, but cannot add shout permission for every shoutbox.

Help?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #5 on: August 05, 2013, 12:19:08 AM »
PokemonS,

  I hope you do not mind that I merged your topic with this modification as I deemed it as a request for another feature to be added to it.

v1.2 now includes the feature you asked for. Edit your shoutbox via Admin -> Simple Portal -> Shoutbox -> Modify (wrench) -> Permissions -> Custom. You will now see another heading titled Read Only as R, simply select R for the membergroups you wish to allow read access only of your specific shoutbox. The regular members option will not do anything so just use any other membergroup there including post based groups and it will not allow them to post shouts but will allow them to view it.
 

Offline PokemonS

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Female
    • Pokemon Stars Indonesia
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #6 on: August 05, 2013, 01:10:18 PM »
Awesome! It works!! Thanks a lot!! ;D

But there is a bug,

While install, file SportalAdmin.english.php is not found.
The p should be uppercase, so it must be SPortalAdmin.english.php.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #7 on: August 05, 2013, 03:01:57 PM »

PokemonS,

  The error has been fixed and I thank you for the report.

Offline player.samp

  • Translator
  • *
  • Posts: 50
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #8 on: April 08, 2014, 12:28:28 PM »
It seems to be an awesome plugin and I really want to install it but I get an error. :/

"2.   Replace   ./Sources/ManagePermissions.php   Test failed"

Code: (Find) [Select]
$context['non_guest_permissions'] = array(
'delete_replies',


Code: (Replace) [Select]
$context['non_guest_permissions'] = array(
'delete_replies',
'spshout_shout_perm',
'spshout_link_perm',
'spshout_delete_perm',

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #9 on: April 09, 2014, 12:13:50 AM »
player.samp,

  I just tested this on a default SMF 2.0.7 with Simple Portal installed whereas it installs & works without issue.
Imo you must have some mod that edited that file in the same place this one is attempting to insert its edits.
The solution is for you to parse the edits it is attempting to add to ManagePermissions.php file.

Regards.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #10 on: April 09, 2014, 12:38:20 PM »
player.samp,

The easiest way I can think of to do this is to make careful note of the location of the failed test.  See how the lines in that part of the file might be different from what the installer is expecting to find there.  You might need to refer to a fresh copy of the SMF file to help you find the right place to make the change.

Then go ahead with the install.

Then manually make the necessary changes.
If you find you are confused about how to work around changes that another mod has made, please post your specific questions here.  Someone may be able to advise you.
Or you may need to just test it out for yourself, to see if the changes work.

For more on dealing with installation difficulties, please read the documentation here:
http://simpleportal.net/index.php?action=docs;area=solving_install_problems
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 player.samp

  • Translator
  • *
  • Posts: 50
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #11 on: April 09, 2014, 06:22:58 PM »
I have a big problem...

I cannot edit the SimplePortal package which I installed on the forum.

It's a winrar file and it does not let me edit it. >.<

Is there any way I can?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #12 on: April 10, 2014, 01:05:22 PM »
Do not bother with the archive file.

Here is what to do:
1) Ignore errors and do entire install
2) Go to the file where you have the the install problem
3) Make changes to that single file by hand.

Does that make sense?
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 player.samp

  • Translator
  • *
  • Posts: 50
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #13 on: April 10, 2014, 03:34:00 PM »
Do not bother with the archive file.

Here is what to do:
1) Ignore errors and do entire install
2) Go to the file where you have the the install problem
3) Make changes to that single file by hand.

Does that make sense?

Maybe I was not clear enough... I have SimplePortal installed already. But I can't find an option how to edit the SimplePortal after I have already downloaded and installed. :/

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #14 on: April 10, 2014, 03:46:11 PM »
Yes.  If you need to edit files which are on your website, you act directly on those files.
For example -- package manager said it could not do the SimplePortal changes to  ./Sources/ManagePermissions.php

Therefore, you:
1) copy that file from your website to your desktop.  Use FTP to do this.
2) edit that file in your favorite editor (notepad ++ for example)
3) copy that file back up to where it came from on your website.

Or have I misunderstood you again?
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 player.samp

  • Translator
  • *
  • Posts: 50
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #15 on: April 11, 2014, 09:28:40 AM »
Yes.  If you need to edit files which are on your website, you act directly on those files.
For example -- package manager said it could not do the SimplePortal changes to  ./Sources/ManagePermissions.php

Therefore, you:
1) copy that file from your website to your desktop.  Use FTP to do this.
2) edit that file in your favorite editor (notepad ++ for example)
3) copy that file back up to where it came from on your website.

Or have I misunderstood you again?

Alright, I will try it as soon as I can. :)

Thank you.




UPDATE:

I tried to do it and changed everything by myself and I still got the same error, but I installed it even wih the error and everything works fine and I haven't found any bug on the forum yet. :P

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #16 on: April 11, 2014, 11:21:03 AM »
I am not sure what "changed everything by myself" means. 
There should only have been one line in one file you needed to change by hand.
If you
1) Did the install (ignoring the errors)
2) Found
Code: [Select]
$context['non_guest_permissions']=and add those 3 simpleportal things to the array
Code: [Select]
'spshout_shout_perm',
'spshout_link_perm',
'spshout_delete_perm',

Then everything should be fine.

If you did not do step 2, then you will run into some problem with the shoutbox at some point.

If everything is working, then congratulations!  you did it!
(but I hope you did it the easy way, instead of a totally manual installation)


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 Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #17 on: April 11, 2014, 12:02:00 PM »
player.samp,

  I do not understand why there is such an issue here. SMF provides documentation on parsing file edits for such issues which gives good guidance. For this plugin you stated only one edit that needed parsing so what you do is install the mod and then do the edit that showed an error manually yourself using FTP.

  An easy way to do this is after installing the mod, you use the browser back button to go back to the mod installation screen and press the small arrows (left side) beside where it showed an editing error. This will allow you to open a popup that shows the edit it is trying to make so at that point you just do it manually yourself using FTP or ie. Cpanel file editor. Then you just close the browser without commencing installation a second time because you already installed it so don't make that mistake. You only go back to see the edit but do not install it again since it has already been installed prior.
 

Offline player.samp

  • Translator
  • *
  • Posts: 50
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #18 on: April 11, 2014, 12:07:41 PM »
I am not sure what "changed everything by myself" means. 
There should only have been one line in one file you needed to change by hand.
If you
1) Did the install (ignoring the errors)
2) Found
Code: [Select]
$context['non_guest_permissions']=and add those 3 simpleportal things to the array
Code: [Select]
'spshout_shout_perm',
'spshout_link_perm',
'spshout_delete_perm',

Then everything should be fine.

If you did not do step 2, then you will run into some problem with the shoutbox at some point.

If everything is working, then congratulations!  you did it!
(but I hope you did it the easy way, instead of a totally manual installation)

That's what I did and as I have already said I have no bugs and everything seems to be working.

I had few more lines except from

'delete_replies'

So I didn't change it to

'delete_replies',
      'spshout_shout_perm',
      'spshout_link_perm',
      'spshout_delete_perm',

I just added these 3 things.

Does the order matter?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #19 on: April 14, 2014, 09:27:48 AM »
player.samp,

Thanks for the careful explanation.
Sounds like you did just the right thing.  It seems you found the correct place in the file and made that one manual change.
I am sorry I did not understand you

I am glad you got it all working!
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?