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: 404
  • 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]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

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

0 Members and 3 Guests are viewing this topic.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • 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
« Reply #20 on: November 29, 2014, 11:06:34 PM »
This plugin now needs manual edits to be plugged in (lol sorry for that words-game), at least in my installation. Will be trying and report it back later, going to bed now :P
Besides I am also bumping this, it's really interesting. Perhaps more permissions could have been added, such as edit messages (there isn't at all, not even for a moderator).
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 Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #21 on: December 27, 2014, 11:09:07 PM »
♦ Ninja ZX-10RR ♦,

  I apologize for overlooking the issue you posted here about a month ago  :0
I have updated the original post with v1.21 which fixes the issue you reported.
Thank you for letting me know of the issue.

Regards.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • 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
« Reply #22 on: January 02, 2015, 01:45:10 PM »
Glad you got it to work then, sorry for the late reply as well, I'm on holiday ;)

Happy new year!
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 Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions
« Reply #23 on: January 05, 2015, 01:58:37 AM »
SP - Extra Shoutbox Permissions users,

This plug-in has been updated to version 1.32.
The newest option includes inputs and membergroup settings for filtering shoutbox text/input via a regex callback.
This will allow you to alter the filtering of specific membergroup text within the shoutbox.
Some knowledge of regular expressions may be required to use this feature.

Regards.
« Last Edit: January 07, 2015, 12:55:29 AM by Chen Zhen »

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 #24 on: January 07, 2015, 04:22:44 PM »
Thanks for the release!

btw, It has been half of year since I ask about the read-only chatbox.
But I am still getting this error:

Quote
2: array_intersect() [<a href='function.array-intersect'>function.array-intersect</a>]: Argument #2 is not an array

The code is still original as v1.3

Code: [Select]
$read_only = (count(array_intersect($user_info['groups'], $context['SPortal']['shoutbox']['groups_read_only'])) > 0) ? true : false;
The problem seems doesn't impact anything,
but the error logs are filled continously.



Halp? 'w'

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • 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
« Reply #25 on: January 07, 2015, 08:08:14 PM »
Thanks for the release!

btw, It has been half of year since I ask about the read-only chatbox.
You can easily set it up by unchecking the post shouts permissions :)

As regards the other issue you gotta wait Chen Zhen, I'm not a coder :/
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 Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #26 on: January 10, 2015, 10:00:15 PM »

This plug-in has been updated to version 1.4.
It includes some fixes, new regex pattern + callback, updated copyright, slight name change, option of restricting the amount of consecutive shouts (by membergroup) and the option of allowing guests to post shouts.

PokemonS,
  The error you reported should not have been occurring as the variable in question is configured as an array but I put in some logic to fix that possible issue anyway. Please uninstall your current version + delete it, clear your error log and then install the newer version 1.4 of the plug-in. Please let me know if it solves the issue. Btw - the option of restricting the amount of consecutive shouts has been added as per your request in the other topic.

Regards.

 

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • 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 #27 on: January 11, 2015, 04:27:10 PM »
Besides I am also bumping this, it's really interesting. Perhaps more permissions could have been added, such as edit messages (there isn't at all, not even for a moderator).
Anything about this? :/
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 Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #28 on: January 11, 2015, 06:16:16 PM »

You are requesting that one can edit their own shouts if they have the permission to do so?

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • 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 #29 on: January 12, 2015, 06:48:44 AM »
2 different ones, edit own and edit any. It could be very useful for moderators instead of just blindly fully deleting a shout.
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 #30 on: January 13, 2015, 04:30:23 PM »

This plug-in has been updated to version 1.4.
It includes some fixes, new regex pattern + callback, updated copyright, slight name change, option of restricting the amount of consecutive shouts (by membergroup) and the option of allowing guests to post shouts.

PokemonS,
  The error you reported should not have been occurring as the variable in question is configured as an array but I put in some logic to fix that possible issue anyway. Please uninstall your current version + delete it, clear your error log and then install the newer version 1.4 of the plug-in. Please let me know if it solves the issue. Btw - the option of restricting the amount of consecutive shouts has been added as per your request in the other topic.

Regards.

Thanks for the new feature and fixes! Works perfectly. 'w'

Just a little note, there are lots of error logs about ENT_XHTML in Subs-Portal.php.
Fix: change ENT_XHTML to 'ENT_XHTML'.

EDIT:
Oh also there are still minor errors:

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #31 on: January 13, 2015, 05:02:06 PM »

PokemonS,

  I do not see those errors on a live nor a local installation. Also the lines of code you speak of are off a bit compared to the default files (after my plug-in edits them). This gives me the inclination that you have some other plug-in or manual edits that you may not have mentioned.


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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #32 on: January 13, 2015, 10:51:25 PM »

You are requesting that one can edit their own shouts if they have the permission to do so?

It sure would beat having to delete the post, then repost it, corrected.
Could add an edited message with time, if wanted to keep track of an edited post, so people would know.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #33 on: January 13, 2015, 11:47:28 PM »
It sure would beat having to delete the post, then repost it, corrected.
Could add an edited message with time, if wanted to keep track of an edited post, so people would know.

  Yes I already thought of adding an edited msg of some sort similar to how posts are done.
You'll have to wait until I find the free time to work on the options you have requested but I will do them for the next update.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • 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 #34 on: January 14, 2015, 07:41:09 AM »
That's awesome, thanks as always :)
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 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: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #35 on: January 14, 2015, 12:28:30 PM »


 

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 #36 on: January 17, 2015, 10:05:02 AM »

PokemonS,

  I do not see those errors on a live nor a local installation. Also the lines of code you speak of are off a bit compared to the default files (after my plug-in edits them). This gives me the inclination that you have some other plug-in or manual edits that you may not have mentioned.

Okay,

When I look again Error Logs, there are bunch of undefined errors lol.



PortalShoutbox.php

- 8: Undefined index: warning (Line 70)
- 8: Undefined index: num_show (Line 168)
- 8: Undefined index: allowed_bbc (Line 169)
- 8: Undefined index: reverse (Line 170)
- 8: Undefined index: caching (Line 171)



Code: [Select]

50:
51: if ($m[0] === ':O')
52: return mb_strtolower($m[0], $encoding);
53: else
54: return mb_strtoupper($m[0], $encoding);
55: }
56: function sportal_shoutbox()
57: {
58: global $smcFunc, $context, $modSettings, $scripturl, $txt, $sourcedir, $user_info;
59:
60: $shoutbox_id = !empty($_REQUEST['shoutbox_id']) ? (int) $_REQUEST['shoutbox_id'] : 0;
61: $request_time = !empty($_REQUEST['time']) ? (int) $_REQUEST['time'] : 0;
62:
63: $context['SPortal']['shoutbox'] = sportal_get_shoutbox($shoutbox_id, true, true);
64: $context['SPortal']['shoutbox']['groups_read_only'] = (!empty($context['SPortal']['shoutbox']['groups_read_only'])) && is_array($context['SPortal']['shoutbox']['groups_read_only']) ? $context['SPortal']['shoutbox']['groups_read_only'] : (!empty($context['SPortal']['shoutbox']['groups_read_only']) ? (array)$context['SPortal']['shoutbox']['groups_read_only'] : array());
65: $read_only = (count(array_intersect($user_info['groups'], $context['SPortal']['shoutbox']['groups_read_only'])) > 0) ? true : false;
66:
67: if (empty($context['SPortal']['shoutbox']))
68: fatal_lang_error('error_sp_shoutbox_not_exist', false);
69:
==>70: $context['SPortal']['shoutbox']['warning'] = parse_bbc($context['SPortal']['shoutbox']['warning']);
71:
72: $can_moderate = allowedTo('sp_admin') || allowedTo('sp_manage_shoutbox');
73: if (!$can_moderate && !empty($context['SPortal']['shoutbox']['moderator_groups']))
74: $can_moderate = count(array_intersect($user_info['groups'], $context['SPortal']['shoutbox']['moderator_groups'])) > 0;
75:
76: if (!empty($_REQUEST['shout']))
77: {
78: if (!allowedTo('spshout_link_perm'))
79: {
80: $search = array('/\[url\](.*?)\[\/url\]/is'  . ($context['utf8'] ? 'u' : ''), '/\[url\=(.*?)\](.*?)\[\/url\]/is'  . ($context['utf8'] ? 'u' : ''), '/\<a(.*)\>(.*)\<\/a\>/iU'  . ($context['utf8'] ? 'u' : ''), "/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))/"  . ($context['utf8'] ? 'u' : ''));
81: $newShout = preg_replace($search, "$2", $_REQUEST['shout']);
82: if ($newShout !== $_REQUEST['shout'])
83: $context['SPortal']['shoutbox']['warning'] = !empty($context['SPortal']['shoutbox']['nolinks_msg']) ? parse_bbc($context['SPortal']['shoutbox']['nolinks_msg']) : (!empty($txt['error_sp_shoutbox_nolinks_msg']) ? parse_bbc($txt['error_sp_shoutbox_nolinks_msg']) : parse_bbc($context['SPortal']['shoutbox']['warning']));
84:
85: $_REQUEST['shout'] = $newShout;
86: }
87: $exempt = !empty($context['SPortal']['shoutbox']['admin_exempt']) && $user_info['is_admin'] ? true : false;
88: $encoding = !empty($context['character_set']) ? $context['character_set'] : 'UTF-8';
89: if (allowedTo('spshout_regex_perm') && !empty($context['SPortal']['shoutbox']['lowercase']) && !$exempt)
90: {




150: if (!empty($_REQUEST['delete']))
151: {
152: checkSession('request');
153:
154: /* if (!$can_moderate)
155: fatal_lang_error('error_sp_cannot_shoutbox_moderate', false); */
156:
157: $_REQUEST['delete'] = (int) $_REQUEST['delete'];
158:
159: if (!empty($_REQUEST['delete']))
160: sportal_delete_shout($shoutbox_id, $_REQUEST['delete']);
161: }
162:
163: loadTemplate('PortalShoutbox');
164:
165: if (isset($_REQUEST['xml']))
166: {
167: $shout_parameters = array(
==>168: 'limit' => $context['SPortal']['shoutbox']['num_show'],
==>169: 'bbc' => $context['SPortal']['shoutbox']['allowed_bbc'],
==>170: 'reverse' => $context['SPortal']['shoutbox']['reverse'],
==>171: 'cache' => $context['SPortal']['shoutbox']['caching'],
172: 'can_moderate' => $can_moderate,
173: );
174: $context['SPortal']['shouts'] = sportal_get_shouts($shoutbox_id, $shout_parameters);
175:
176: $context['sub_template'] = 'shoutbox_xml';
177: $context['SPortal']['updated'] = empty($context['SPortal']['shoutbox']['last_update']) || $context['SPortal']['shoutbox']['last_update'] > $request_time;
178:
179: return;
180: }
181:
182: $request = $smcFunc['db_query']('', '
183: SELECT COUNT(*)
184: FROM {db_prefix}sp_shouts
185: WHERE id_shoutbox = {int:current}',
186: array(
187: 'current' => $shoutbox_id,
188: )
189: );
190: list ($total_shouts) = $smcFunc['db_fetch_row']($request);


PortalShoutbox.template.php

- 8: Undefined index: id (Line 204)

Code: [Select]
184: </div>
185: <div class="smalltext centertext">
186: <a href="javascript:window.close();">' . $txt['more_smileys_close_window'] . '</a>
187: </div>
188: </div>
189: </body>
190: </html>'), '
191: }';
192: }
193:
194: echo '
195: // ]]></script>';
196: }
197:
198: function template_shoutbox_xml()
199: {
200: global $context, $txt, $memberContext, $settings;
201:
202: echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
203: <smf>
==>204: <shoutbox>', $context['SPortal']['shoutbox']['id'], '</shoutbox>';
205:
206: if ($context['SPortal']['updated'])
207: {
208: echo '
209: <updated>1</updated>
210: <error>', empty($context['SPortal']['shouts']) ? $txt['sp_shoutbox_no_shout'] : 0, '</error>
211: <warning>', !empty($context['SPortal']['shoutbox']['warning']) ? htmlspecialchars($context['SPortal']['shoutbox']['warning']) : 0, '</warning>
212: <reverse>', !empty($context['SPortal']['shoutbox']['reverse']) ? 1 : 0, '</reverse>';
213:
214: foreach ($context['SPortal']['shouts'] as $shout)
215: {
216: loadMemberData($shout['author']['id']);
217: loadMemberContext($shout['author']['id']);
218: if (empty($memberContext[$shout['author']['id']]['avatar']['href']))
219: $avatarSB = 'http://pokemonstars.com/forum/avatars/Pikachu.png';
220: else
221: $avatarSB = $memberContext[$shout['author']['id']]['avatar']['href'];
222:
223: echo '
224: <shout>

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #37 on: January 17, 2015, 09:16:40 PM »
PokemonS,

  I believe you misunderstood my statement. I did not say that I did not know which part of the code was causing the undefined errors but rather that I can tell by the differing line numbers that the file has been edited by you or another plug-in.

What other edits have been done to the file? Did you do manual edits to this file at some point or is there perhaps another plug-in (mod) that has edited the file. What was done to it or which plug-in was it that edited that file? If you take a default installation of Simple Portal & apply only this specific plug-on, the line numbers are not the same as what you are posting and that is how I can tell that the file has been edited outside what my plug-in applies.

There is no way the code should continue without showing the shoutbox does not exist error when no shoutbox id exists as your errors seem to imply.

I can suggest that you find (line 67 of your code?!):
Code: [Select]
if (empty($context['SPortal']['shoutbox']))

and change it to:
Code: [Select]
if (empty($context['SPortal']['shoutbox']['id']))

.. but this does not explain my questions.

Regards.

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 #38 on: January 22, 2015, 05:26:41 AM »
PokemonS,

  I believe you misunderstood my statement. I did not say that I did not know which part of the code was causing the undefined errors but rather that I can tell by the differing line numbers that the file has been edited by you or another plug-in.

What other edits have been done to the file? Did you do manual edits to this file at some point or is there perhaps another plug-in (mod) that has edited the file. What was done to it or which plug-in was it that edited that file? If you take a default installation of Simple Portal & apply only this specific plug-on, the line numbers are not the same as what you are posting and that is how I can tell that the file has been edited outside what my plug-in applies.

There is no way the code should continue without showing the shoutbox does not exist error when no shoutbox id exists as your errors seem to imply.

I can suggest that you find (line 67 of your code?!):
Code: [Select]
if (empty($context['SPortal']['shoutbox']))

and change it to:
Code: [Select]
if (empty($context['SPortal']['shoutbox']['id']))

.. but this does not explain my questions.

Regards.

Ah, sorry for my misunderstood. =="

I didn't use any other SP's plug-ins than your mod, Extra Shoutbox Permissions.
I have manually edit some files to display avatar in shoutbox.
And also other minor edits, I don't remember.

Code: [Select]
if (empty($context['SPortal']['shoutbox']))

and change it to:
Code: [Select]
if (empty($context['SPortal']['shoutbox']['id']))

That code was completely fix the problem, tested for 3 days and no error logs about shoutbox.

Thanks! 'w'

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Plugin] SP - Extra Shoutbox Permissions/Options
« Reply #39 on: January 22, 2015, 03:16:52 PM »

PokemonS,

  Recently I had the same behaviour on a live installation therefore I will be applying that edit to this plug-in's next release.
Thank you for the report and glad to hear your issue has been resolved.

Regards.