SimplePortal

Customization => Custom Coding => Topic started by: Zirc on August 13, 2011, 04:35:38 PM

Title: Shoutbox issue
Post by: Zirc on August 13, 2011, 04:35:38 PM
Not sure if this is the right section to post this but I have an issue with the shoutbox and a mod for SMF

Okay I use SMF 2.0 and Simpleportal 2.3.3 and the mod is Simple Audio and Video Embedder (http://www.simplemachines.org/community/index.php?topic=395039.0)

The issue is that when somebody posts a link to a video in the shout box it embeds the video into the shoutbox using the mod which doesn't work very well being that the shoutbox is in the left hand column.

I guess my question is.. how can I hard code a <noembed> into the shout box somewhere to prevent it from embedding these things?
Title: Re: Shoutbox issue
Post by: Zirc on August 21, 2011, 02:32:33 PM
Any ideas on this?  I've poked around portalblocks.php and the template but can't seem to find where I could insert <noembed>
Title: Re: Shoutbox issue
Post by: Chen Zhen on August 21, 2011, 07:23:02 PM

file: Sources / PortalAdminShoutbox.php

find:
Code: [Select]
$context['allowed_bbc'] = array(
'b' => $txt['bold'],
'i' => $txt['italic'],
'u' => $txt['underline'],
's' => $txt['strike'],
'pre' => $txt['preformatted'],
'flash' => $txt['flash'],
'img' => $txt['image'],
'url' => $txt['hyperlink'],
'email' => $txt['insert_email'],
'ftp' => $txt['ftp'],
'glow' => $txt['glow'],
'shadow' => $txt['shadow'],
'sup' => $txt['superscript'],
'sub' => $txt['subscript'],
'tt' => $txt['teletype'],
'code' => $txt['bbc_code'],
'quote' => $txt['bbc_quote'],
'size' => $txt['font_size'],
'font' => $txt['font_face'],
'color' => $txt['change_color'],
'me' => 'me',
);

$disabled_tags = array();

You can add it to the $context['allowed_bbc'] array and then in the SP Shoutbox admin edit the specific shoutbox and holding down the ctrl (or apple cmd) button you can disable bbc tags by not highlighting them (enabled ones highlighted).
... or add it to the $disabled_tags array.
Title: Re: Shoutbox issue
Post by: Zirc on August 21, 2011, 07:52:30 PM
Thanks Underdog for the response!  Didn't quite work they way I wanted by adding it to the disabled tag list, it just doesn't post anything at all if the <embed> tag is in there.  If I could write something in the shoutbox code that told it to change <embed> to <url> that might accomplish what i need.  I talked to the mods author and he said to come here for a solution thats why I'm asking here.
SimplePortal 2.3.8 © 2008-2024, SimplePortal