collapse 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: 158
  • 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]

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

Author Topic: [Shoutbox] Combining multiple plugins - on going  (Read 17573 times)

0 Members and 1 Guest are viewing this topic.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
[Shoutbox] Combining multiple plugins - on going
« on: February 07, 2015, 07:36:20 AM »
 hello! :)

I downloaded "sp-xtra-shoutbox_options-v1.5x.zip" and went to install but get the following test fails:


Code: (Find) [Select]
if (!empty($_REQUEST['shout']))
Code: (Replace) [Select]
if (!empty($count) && $count >= $context['SPortal']['shoutbox']['consecutive'])
$context['SPortal']['shoutbox']['warning'] = str_replace('[#]', $context['SPortal']['shoutbox']['consecutive'], $context['SPortal']['shoutbox']['consecutive_msg']);
elseif (!empty($_REQUEST['shout']) && !$read_only)



and


Code: (Find) [Select]
<li class="smalltext">', !$shout['is_me'] ? '<strong>' . $shout['author']['link'] . ':</strong> ' : '', $shout['text'], '<br />', !empty($shout['delete_link_js']) ? '<span class="shoutbox_delete">' . $shout['delete_link_js'] . '</span>' : '' , '<span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';
Code: (Replace) [Select]
<li class="smalltext">', !$shout['is_me'] ? '<strong>' . $shout['author']['link'] . ':</strong> ' : '', '<span style="word-wrap: break-word;overflow-y: auto;overflow-x: hidden;">' . $shout['text'], '</span><br /><span class="shoutbox_delete">', (!empty($shout['edit_link_js']) ? $shout['edit_link_js'] : '&nbsp;'), (!empty($shout['delete_link_js']) ? $shout['delete_link_js'] : '&nbsp;'), '</span><span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';

I've already got the colour drop down, shoutbox sound and PM member plugin's installed..
« Last Edit: February 09, 2015, 06:07:01 PM by 420connect »

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: [Shoutbox] xtra options - failing on test install
« Reply #1 on: February 07, 2015, 07:50:43 AM »
[...] Hint: attach the faulty file(s), provide a screeenshot of the failing tests.
Parsing the modifications is ok as well but still missing the files ;D and I don't have the power to fix it without seeing it :P
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: [Shoutbox] xtra options - failing on test install
« Reply #2 on: February 07, 2015, 02:24:52 PM »
Sorry, I never realised I was being so non-specific to which files..
Okay, I tried manually adding in the code but for whatever reason the package manager wasn't finding:

this part:
Code: [Select]
if (!empty($_REQUEST['shout']))on ./Sources/PortalShoutbox.php

but I was able to make that change manually.



I'm now just left with the second one that I'm struggling to make manually as it's already been changed by the other plugins.

So I'm looking to combine the 2 of these into one:
I currently have:
Code: [Select]
<li class="smalltext">', !$shout['is_me'] ? '<strong>' . $shout['author']['link'] . ':</strong> ' : '', '<span style="word-wrap: break-word;overflow-y: auto;overflow-x: hidden;">' . $shout['text'], '</span><br /><span class="shoutbox_delete">',

(!empty($shout['edit_link_js']) ? $shout['edit_link_js'] : '&nbsp;'), (!empty($shout['delete_link_js']) ? $shout['delete_link_js'] : '&nbsp;'), '</span><span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';

Package manager wants to find:

Code: [Select]
<li class="smalltext">', !$shout['is_me'] ? '<strong>' . $shout['author']['link'] . ':</strong> ' : '', $shout['text'], '<br />', !empty($shout['delete_link_js']) ? '<span class="shoutbox_delete">' . $shout['delete_link_js'] . '</span>' : '' , '<span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';
and replace with:

Code: [Select]
<li class="smalltext">', !$shout['is_me'] ? '<a href="javascript:void(0);" title="'.$txt['sp_shoutbox_pm_title'].'" onclick="document.getElementById(\'new_shout_'. $shoutbox['id']. '\').value=\'@' . $shout['author']['name'] . ': \'">@</a>

<strong>' . $shout['author']['link'] . ':</strong> ' : '', $shout['text'], '<br />', !empty($shout['delete_link_js']) ? '<span class="shoutbox_delete">' . $shout['delete_link_js'] . '</span>' : '' , '<span class="smalltext shoutbox_time">', $shout

['time'], '</span></li>';

(this is in PortalShoutbox.template.php)



updated
« Last Edit: February 07, 2015, 02:30:45 PM by 420connect »

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: [Shoutbox] xtra options - failing on test install
« Reply #3 on: February 07, 2015, 03:03:51 PM »
My php knowledge is not enough to do that so I'd suggest to wait for Chen Zhen or another competent coder for this one :)
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: [Shoutbox] xtra options - failing on test install
« Reply #4 on: February 07, 2015, 03:25:20 PM »

420connect,

  What you currently have (as stated) is what the mod you referenced (sp-xtra-shoutbox_options-v1.5) changes the code to so I do not see you specifically having an issue with my mod. You seem to be having an issue with whatever mod is attempting to add the last bit of code you posted which is not my plug-in.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Shoutbox] xtra options - failing on test install
« Reply #5 on: February 07, 2015, 03:35:08 PM »
Keep in mind that both those plug-ins will no longer uninstall properly since you are altering the code with manual edits.

find:
Code: [Select]
<li class="smalltext">', !$shout['is_me'] ? '<strong>' . $shout['author']['link'] . ':</strong> ' : '', '<span style="word-wrap: break-word;overflow-y: auto;overflow-x: hidden;">' . $shout['text'], '</span><br /><span class="shoutbox_delete">', !empty($shout['edit_link_js']) ? $shout['edit_link_js'] : '&nbsp;'), (!empty($shout['delete_link_js']) ? $shout['delete_link_js'] : '&nbsp;'), '</span><span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';
replace with:
Code: [Select]
<li class="smalltext">', !$shout['is_me'] ? '<a href="javascript:void(0);" title="'.$txt['sp_shoutbox_pm_title'].'" onclick="document.getElementById(\'new_shout_'. $shoutbox['id']. '\').value=\'@' . $shout['author']['name'] . ': \'">@</a><strong>' . $shout['author']['link'] . ':</strong> ' : '', '<span style="word-wrap: break-word;overflow-y: auto;overflow-x: hidden;">' . $shout['text'], '</span><br /><span class="shoutbox_delete">', (!empty($shout['edit_link_js']) ? $shout['edit_link_js'] : '&nbsp;'), (!empty($shout['delete_link_js']) ? $shout['delete_link_js'] : '&nbsp;'), '</span><span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';
Without knowing exactly which plug-in is displaying the extra link, how it is displayed and with how you posted the code I am not sure if I was supposed to include a space after the @ character, so if it is required just add it.
« Last Edit: February 07, 2015, 03:37:41 PM by Chen Zhen »

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Shoutbox] xtra options - failing on test install
« Reply #6 on: February 07, 2015, 04:17:27 PM »
Thank you very much!
that seems to have worked perfectly!

I'm not worried about undoing any of the plugins.
I plan to keep with the Shoutbox now I've found a reliable one :D

I've just noticed actually, when I click the wrench to edit what was said
after what was originally there this is there:

Code: [Select]
<script type="text/javascript">function spSound(){var beep = document.getElementById("beep");beep.play(1);}</script><object id="beep" type="application/x-shockwave-flash" data="Themes/default/images/sp/shout_sounds.swf" width="0" height="0"><param name="movie" value="Themes/default/images/sp/shout_sounds.swf" /><param name="FlashVars" value="onLoad=spSound" /></object>

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Shoutbox] xtra options - failing on test install
« Reply #7 on: February 07, 2015, 05:39:44 PM »
420connect,

  You can use regex to remove the sound effect code and I suppose it is not necessary to add it back again afterwards.

file: ../Sources/PortalEdit.php

find:
Code: [Select]
$bodyShout = preg_replace('~<div id="edit_shout_' . $shout_id . '" style="display: inline;">(.*?)</div>(?!\s*<div id="edit_shout_' . $shout_id . '" style="display: inline;">)~', '', $bodyShout);

add after above code (next line):
Code: [Select]
$bodyShout = preg_replace('~<script type="text/javascript">function spSound(){var beep = document.getElementById("beep");beep.play(1);}</script><object id="beep" type="application/x-shockwave-flash" data="Themes/default/images/sp/shout_sounds.swf" width="0" height="0"><param name="movie" value="Themes/default/images/sp/shout_sounds.swf" /><param name="FlashVars" value="onLoad=spSound" /></object>~', '', $bodyShout);
  If that does not work properly then I will have to test it myself as I have not done so. Please let me know how that works.

Regards.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Shoutbox] xtra options - failing on test install
« Reply #8 on: February 07, 2015, 07:58:19 PM »
420connect,

  You can use regex to remove the sound effect code and I suppose it is not necessary to add it back again afterwards.

file: ../Sources/PortalEdit.php

find:
Code: [Select]
$bodyShout = preg_replace('~<div id="edit_shout_' . $shout_id . '" style="display: inline;">(.*?)</div>(?!\s*<div id="edit_shout_' . $shout_id . '" style="display: inline;">)~', '', $bodyShout);

add after above code (next line):
Code: [Select]
$bodyShout = preg_replace('~<script type="text/javascript">function spSound(){var beep = document.getElementById("beep");beep.play(1);}</script><object id="beep" type="application/x-shockwave-flash" data="Themes/default/images/sp/shout_sounds.swf" width="0" height="0"><param name="movie" value="Themes/default/images/sp/shout_sounds.swf" /><param name="FlashVars" value="onLoad=spSound" /></object>~', '', $bodyShout);
  If that does not work properly then I will have to test it myself as I have not done so. Please let me know how that works.

Regards.

That add in worked perfectly, thank you very much!
*e-hugs*

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Shoutbox] xtra options - failing on test install
« Reply #9 on: February 08, 2015, 05:31:10 PM »
sorry, after further testing it appears, the shoutbox isn't updating as it should now :S

a: smftest
pw: smftest
@ 420connect.co.uk

if you'd like to test.

I need to post then refresh to see what I just typed or see new replies.




Surely I can't be the first person to want to combine all the plugins for the shoutbox?  :-X

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: [Shoutbox] xtra options - failing on test install
« Reply #10 on: February 08, 2015, 07:15:46 PM »
Surely I can't be the first person to want to combine all the plugins for the shoutbox?  :-X
I'll get there as well :P I already have 135+ mods, all SP plugins can't be missing ;D

The account you provided doesn't have the permission to write in the shoutbox since I couldn't find the relative input field... LOL
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: [Shoutbox] xtra options - failing on test install
« Reply #11 on: February 08, 2015, 08:22:31 PM »
420connect,

The refresh rate of the shoutbox should be set to ie. 10 or 12 seconds for it to function properly using this plug-in.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Shoutbox] xtra options - failing on test install
« Reply #12 on: February 09, 2015, 01:23:10 AM »
Hmm, strange..

I've just discovered one of the recent changes must have had an unexpected effect.

whilst I'm still able to see the inputbox/shout button etc. as admin
these are missing for regular users although they should be able to see it? :S

My refresh rate is set to 12 secs and correct permissions set for use/view of shoutbox.

:X

(off to work now but I'll attach any files that could be related when I get back!)

many thanks!


Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Shoutbox] xtra options - failing on test install
« Reply #13 on: February 09, 2015, 11:07:13 AM »
Since getting in, I've uninstalled all portal related MOD's/plugins then reinstalled SimplePortal alone.
This has at least fixed the ability to post / have it show fault.


I think I'll hang on until someone who knows what their doing tries out the shoutbox with all avail. plugins :P

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Shoutbox] xtra options - failing on test install
« Reply #14 on: February 09, 2015, 04:08:39 PM »
420connect,

  The options plugin adds extra permissions from within your membergroup permission settings for the shoutbox. These must be enabled/disabled for your various membergroups depending on what you want to allow them to do.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Shoutbox] xtra options - failing on test install
« Reply #15 on: February 09, 2015, 06:06:24 PM »
Hello,

firstly thank you for your replies!
(I'll update the thread title to something more appropriate now this has changed.)

Since removing all the extras I've tried adding the extra options plugin and can now see the "extra options"
I'm able to install the 'colours' mod with no problems as well as the 'options' mod but both the 'PM' mod & 'Sounds' mod have fails.

Would anyone mind trying the combination on their test site if possible and sharing a fix to have them all work smoothly, I'd be super thankful and sure others would like to be able to add these features together too.


Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: [Shoutbox] Combining multiple plugins - on going
« Reply #16 on: February 09, 2015, 06:24:13 PM »
420connect,

  For the shout sounds I was going to write that into the next version of the options mod and for the other plug-ins you are using it would be better for me to also possibly add them to the same plug-in. A link for PM's and membergroup coloured user names is fairly straight forward as far as coding goes. Hopefully I may have time to do this within the next week or so. This will eliminate your need to use more than the single plug-in for all those options.

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: [Shoutbox] Combining multiple plugins - on going
« Reply #17 on: February 09, 2015, 07:55:56 PM »
420connect,

  For the shout sounds I was going to write that into the next version of the options mod and for the other plug-ins you are using it would be better for me to also possibly add them to the same plug-in. A link for PM's and membergroup coloured user names is fairly straight forward as far as coding goes. Hopefully I may have time to do this within the next week or so. This will eliminate your need to use more than the single plug-in for all those options.

Regards.
I second that thing a LOT, thanks VERY much dude! Your help is always much appreciated. A fully modded SP is exactly what I want, yet it's pretty hard to combine everything to make it work properly so it would be truly awesome.
« Last Edit: February 09, 2015, 08:00:28 PM by ♦ Ninja ZX-10RR ♦ »
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: [Shoutbox] Combining multiple plugins - on going
« Reply #18 on: February 10, 2015, 06:47:17 AM »
420connect,

  For the shout sounds I was going to write that into the next version of the options mod and for the other plug-ins you are using it would be better for me to also possibly add them to the same plug-in. A link for PM's and membergroup coloured user names is fairly straight forward as far as coding goes. Hopefully I may have time to do this within the next week or so. This will eliminate your need to use more than the single plug-in for all those options.

Regards.

Hi Chen!

Thank you very much again for the reply and that would be ideal! - You're a star!  :angel:
Excitedly awaiting options v2! :)

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: [Shoutbox] Combining multiple plugins - on going
« Reply #19 on: March 07, 2015, 05:20:14 AM »
Just wondering you have had a chance to play around with this yet?

Many thanks

 

SimplePortal 2.3.7 © 2008-2021, SimplePortal