collapse collapse

* User Info

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

* Who's Online

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

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: [Plugin] SP - Extra Shoutbox Permissions/Options  (Read 58751 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
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #40 on: January 29, 2015, 06:43:08 PM »

The mod has been updated to version 1.5 which includes some additional functions & fixes.
Please see the first post for details regarding what the plug-in adds to your Simple Portal shoutbox.
If you are updating from a previous version you must uninstall & delete the old version prior to installing the new one.



PokemonS,
  When applying this update please remember that you recently did a manual edit to one of the files which v1.5 now applies to the same line of code. Imo you may want to change the line back to what it was previous to that edit so the plug-in can install error free.



Ninja ZX-10RR,
  Your request for a shout editor has been added to version 1.5. Admins & shoutbox moderators will always have the option to edit any shout and there is an extra permission setting for membergroups to allow a user to edit their own shouts.

Regards.   
 

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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #41 on: January 31, 2015, 01:06:28 PM »
GREAT! Thanks an awesome LOT! Really appreciated mate, you rock as always at coding :D will test it in the following days, due to the fact that I had to reinstall SimplePortal I got to apply the other changes as well and this one is in queue of course. Very happy to read that!
Cheers!
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

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/Options
« Reply #42 on: February 27, 2015, 11:19:18 PM »
Thanks for the update!

A little wish...
"disable whisper for a shoutbox"

Could you code it? Thanks!

Offline br360

  • Semi Newbie
  • *
  • Posts: 12
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #43 on: March 03, 2015, 10:39:57 PM »
Thanks Chen Zhen for the new features. If you have any thoughts or plans about adding even more features to the shoutbox, three that I personally would like to see would be:

1). Bannings. Being able to ban a user from the shoutbox; and being able to ban them for a specific time. (24 hours, one week, 30 days, etc.)

2). Being able to select text font and color permanently. From what I can see; members are allowed to choose different text and colors, but it is on a per chat basis. If they want to continue to use the same color for example, they have to continue to use the same color tags each time. It would be cool if once they chose a color or font, it would stay that way until they changed it again.

3). Being able to ignore members in the shoutbox. If let's say a member was on someone's ignore list, it would be really cool if when that member posted something in chat, you would see the same "you are ignoring this member" Click this link to see chat.

Just my personal opinion of course, but think they would be great feature additions if you were interested.

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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #44 on: March 04, 2015, 01:36:18 AM »
Hi br360! I'll reply just to the first of your requests since it's possible already.
Create a new membergroup called "Banned from the Shoutbox" or something like that, then put anyone you want to be able to ban people as moderators of that group. In the shoutbox block setting set the permission to see the shoutbox as DENIED for that particular membergroup, you can also show another block just for that membergroup to tell them they had been banned (just the way I did).
Nice to see you here :)
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

Offline br360

  • Semi Newbie
  • *
  • Posts: 12
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #45 on: March 04, 2015, 02:09:03 AM »
Hey Ninja, good to see you here as well. 

Thanks for the tip, but the only issue I have with creating a new "banned from chat" usergroup is that I have chat moderators that mod the shoutbox- but I really don't want to give them permission to actually be able to change membergroups themselves- as although I trust them, there is specific criteria needed to be assigned specific groups, and I don't trust them that much. ;)

Ideally I would hope that there could be permissions that could be given to chat moderators themselves like there are in other shoutbox mods. For example:

Edit messages in Shoutbox   
Delete messages in Shoutbox   
Empty Shoutbox   
Ban users in Shoutbox






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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #46 on: March 04, 2015, 05:21:14 AM »
I was thinking that as well, but the good thing is that if you set certain people to moderators of a membergroup then you don't need to give them the permission to assign membergroups :D Have a look, I was about asking the same thing a while ago but further testing discovered it's easy like this anyway :) basically if someone is moderator of a group it implies 2 things:
1) he doesn't need to be really part of the group to be a moderator for it
2) he can put people into that membergroup ONLY, even without the relative permission since the fact that they are moderating that particular membergroup makes SMF assume they can actually assign the relative membership as well (bear in mind, ONLY that membership, or remove it, not else), which works great for banning in SP.

And yeah I'm here, enjoying this place and the italian support forum (3rd major poster, turning 2nd :P) much more than sm.org :)
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

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #47 on: April 03, 2015, 04:15:58 AM »
I'm having trouble getting this to work again after rebuilding my forum from a copy of my database..

I'm finding when I install it, it essentially breaks the 'post' functionality of the shoutbox..

Any suggestions where things could be going wrong?

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/Options
« Reply #48 on: April 03, 2015, 07:59:17 PM »
420connect,

  What do you mean by "post"? Are you referring to another plugin that is conflicting or are you referring to shouting in general?
Did you change the regex settings? Try adjusting it to the default value.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #49 on: April 04, 2015, 05:35:53 AM »
Yeah, - generally shouting/posting wouldn't work?
- No changes before or after to regex settings.

(For now I have opted to use the @PM mod in it's place but I'd love to eventually have a fully modded shoutbox with all of the fancy options in one mod but I know you will have other priorities!)

Offline Aquafan

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 2 RC1.2
  • SP Version: 2.3
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #50 on: August 01, 2015, 10:13:35 AM »
thanks but i got this error

 Use of undefined constant ENT_XHTML - assumed 'ENT_XHTML

   

'regex' => isset($row['regex']) ? sportal_checkaddslashes($row['regex'], ENT_QUOTES | ENT_XHTML) : '(?:^|[\.\!\?]\s+)\w|([^:]\b[i|o]\b)',

and

   

$str = htmlspecialchars_decode($str, ENT_QUOTES | ENT_XHTML);

   

'nolinks_msg' => !empty($row['nolinks_msg']) ? sportal_checkaddslashes($row['nolinks_msg'], ENT_QUOTES | ENT_XHTML) : (!empty($txt['error_sp_shoutbox_nolinks_msg']) ? $smcFunc['htmlspecialchars']($txt['error_sp_shoutbox_nolinks_msg']) : ''),


   

'regex_callback' => isset($row['regex_callback']) ? sportal_checkaddslashes($row['regex_callback'], ENT_QUOTES | ENT_XHTML) : 'mb_strtoupper($m[0], $encoding)',

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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #51 on: August 01, 2015, 11:37:48 AM »
Aquafan,
Please explain your issue more clearly, as I have no idea about what you mean with that post :/

Regards
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

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #52 on: August 01, 2015, 11:48:17 AM »
ENT_XHTML constant was added with PHP 5.4, so if you are running an older version of PHP, you'll get that undefined constant error. Chen Zhen would know better if that option is really necessary or find an alternative to support older PHP versions.
And slowly, you come to realize... It's all as it should be...

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/Options
« Reply #53 on: August 03, 2015, 12:19:33 AM »
Aquafan,

  Simply remove:
Code: [Select]
| ENT_XHTML from all the lines you referenced.

Regards.

Offline player.samp

  • Translator
  • *
  • Posts: 50
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #54 on: August 08, 2015, 10:45:44 AM »
I installed the mod successfully with one error which I fixed by myself for sure.

I get an error when I try to edit a shout of someone else, as a forum administrator.

"Parse error: syntax error, unexpected T_FUNCTION in /Sources/PortalEdit.php on line 151"

EDIT: I also cannot see the chat history and it seems like removing any shout is not possible too.

Error when I try to see the chat history:

"Parse error: syntax error, unexpected T_FUNCTION in /Sources/PortalShoutbox.php on line 81"
« Last Edit: August 08, 2015, 10:49:04 AM by player.samp »

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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #55 on: August 08, 2015, 10:52:53 AM »
You forgot to attach the files ;)
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

Offline player.samp

  • Translator
  • *
  • Posts: 50
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #56 on: August 08, 2015, 11:02:35 AM »

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/Options
« Reply #57 on: August 09, 2015, 12:21:55 AM »
player.samp,

  Due to the use of anonymous functions (closures) & the ENT_XHTML constant, PHP 5.4 (+) is required to use this plug-in.
The current latest version is PHP 5.6 whereas your host should be updating beyond what you seem to have available.
Do you use a free host, shared host, VPS or dedicated? 

Regards.
« Last Edit: August 09, 2015, 12:28:48 AM by Chen Zhen »

Offline Yahmez

  • Semi Newbie
  • *
  • Posts: 20
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #58 on: October 12, 2015, 09:42:31 AM »
Hello everyone,

I wanted to post an update to this plugin that was created by a friend. This update fixes an error where the time of the last edit is not calculated correctly for users with a time offset. It has been packaged up and we are using it currently. I was not sure if it was in good form to post another package here so here are a list of edits made to address the issue. If it is acceptable to attach the package here I can do that as well.

Quote
filename: add_db_columns.php:
Below the other db_add_column's:

$smcFunc['db_add_column'](
   '{db_prefix}sp_shouts',
   array(
       'name' => 'modified_time',
       'type' => 'int',
       'size' => 10,
       'default' => 0,
       'null' => false
   ),
   array(),
   'ignore',
   'fatal'
);

$smcFunc['db_add_column'](
   '{db_prefix}sp_shouts',
   array(
       'name' => 'modified_name',
       'type' => 'varchar',
       'size' => 255,
       'default' => '',
       'null' => false
   ),
   array(),
   'ignore',
   'fatal'
);



filename: install.xml
In the "<file name="$sourcedir/Subs-Portal.php">" section add:

   <operation>
      <search position="replace"><![CDATA[mg.online_color AS member_group_color, pg.online_color AS post_group_color
         FROM {db_prefix}sp_shouts AS sh]]></search>
      <add><![CDATA[mg.online_color AS member_group_color, pg.online_color AS post_group_color,
            sh.modified_time, sh.modified_name
         FROM {db_prefix}sp_shouts AS sh]]></add>
   </operation>
   <operation>
      <search position="before"><![CDATA['text' => parse_bbc($row['body'], true, '', $bbc),]]></search>
      <add><![CDATA[
            'modified_time' => $row['modified_time'],
            'modified_name' => $row['modified_name'],]]></add>
   </operation>
   <operation>
      <search position="before"><![CDATA[$shouts[$shout['id']]['text'] = censorText($shouts[$shout['id']]['text']);]]></search>
      <add><![CDATA[
      if ($shouts[$shout['id']]['modified_time'] != 0) {
         $logged_edit = str_replace('%$#@', timeformat($shouts[$shout['id']]['modified_time']), $txt['sp_shoutbox_who_edit_shout']) . $shouts[$shout['id']]['modified_name'];
         $shouts[$shout['id']]['text'] .= '<div id="edit_shout_' . $shout['id'] . '" style="display: inline;"><br /><span class="smalltext shoutbox_time" style="font-style: italic;">' . $logged_edit . '</span></div>';
      }]]></add>
   </operation>



filename: PortalEdit.php
Update the "UPDATE {db_prefix}sp_shouts" to look like this:

               UPDATE {db_prefix}sp_shouts
               SET body = {string:body},
               modified_time = {string:modified_time},
               modified_name = {string:modified_name}
               WHERE id_shout = {int:shout_id}',
               array(
                  'body' => $bodyShout,
                  'modified_time' => $shout_data['modified_time'],
                  'modified_name' => $shout_data['modified_name'],
                  'shout_id' => (int)$shout_id,
               )

Update the "$logged_edit = " to this:

   $modified_time = time();
   $modified_name = (!empty($user_info['name']) ? $user_info['name'] : $user_info['username']);
   $logged_edit = str_replace('%$#@', timeformat($modified_time), $txt['sp_shoutbox_who_edit_shout']) . $modified_name;

Update the return array of the "sportal_edit_shout" function to include these:

      'modified_time' => $modified_time,
      'modified_name' => $modified_name,


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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #59 on: October 12, 2015, 09:46:01 AM »
Yahmez,

Thanks for posting that, I am sure Chen Zhen will look into it when he logs in ;)

Regards
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