TinyPortal

Development => Support => Topic started by: Kimmen on November 28, 2012, 01:04:39 PM

Title: Shoutbox and Aeva MOD
Post by: Kimmen on November 28, 2012, 01:04:39 PM
Hi there guys c",)

Is it possible to fix the shoutbox, so that it does not embedd video links from the Aeva Mod? It is really annoying when it happens inside the shoutbox, since i use it on my left block. I use new version of smf 2 and newest tp. my site: www.efclan.eu


Hope for response  ^-^
Title: Re: Shoutbox and Aeva MOD
Post by: IchBin on November 28, 2012, 04:03:19 PM
If I remember right, Aeva ties into the parse_bbc() function, which of course translates all the BBC codes into HTML etc. Probably the only way to do this is to remove the BBC parsing, unless Aeva has some setting that we can use to disable it for the shout. I don't know the mod to know if that exists though.
Title: Re: Shoutbox and Aeva MOD
Post by: Kimmen on December 04, 2012, 10:54:58 PM
I see. It is not a huge issue though, i am also not sure how it all is tied together and how to solve it, maybe not the correct plaze to ask for help either, as the aeva mod is not yours  :/
Title: Re: Shoutbox and Aeva MOD
Post by: IchBin on December 05, 2012, 02:47:07 AM
If you'd like to attach your Subs.php file I can see if there is something that I can find out to do in the code. Assuming that is where Aeva modifies the parse_bbc() function.
Title: Re: Shoutbox and Aeva MOD
Post by: Maxx1 on December 05, 2012, 03:02:40 PM
Kimmen,

Nice looking site you have... looks great!

I have Avea but the shout is for staff only, too many question in the shout that should be on the boards! :)

regards,
Maxx
Title: Re: Shoutbox and Aeva MOD
Post by: Kimmen on December 05, 2012, 09:40:41 PM
The subs.php is included, good luck to you mister :)

@Max
Thanks for your kind reply :)
Title: Re: Shoutbox and Aeva MOD
Post by: IchBin on December 10, 2012, 05:55:07 AM
I don't know if $context['current_action'] is available at this point in SMF, but you can give this a try. Make sure to test if aeva functions properly in other places after you do this. Find this code in the Subs.php file:
// Aeva Media changes
if (empty($parse_tags) && empty($context['uninstalling']))
{
// Do the actual embedding
if (!function_exists('aeva_parse_bbc2'))
require_once($sourcedir . '/Aeva-Embed.php');
aeva_parse_bbc2($message, $smileys, $cache_id);

if (function_exists('aeva_parse_bbc') && stripos($message, '[smg') !== false)
aeva_parse_bbc($message, $cache_id);
}
// End Aeva Media changes


Add a check to see if tpmod is set. That should probably keep it from parsing the code "I think". Like this:

// Aeva Media changes
if (empty($parse_tags) && empty($context['uninstalling']))
{
if (isset($context['current_action']) && $context['current_action'] != 'tpmod')
{
// Do the actual embedding
if (!function_exists('aeva_parse_bbc2'))
require_once($sourcedir . '/Aeva-Embed.php');
aeva_parse_bbc2($message, $smileys, $cache_id);

if (function_exists('aeva_parse_bbc') && stripos($message, '[smg') !== false)
aeva_parse_bbc($message, $cache_id);
}
}
Title: Re: Shoutbox and Aeva MOD
Post by: Kimmen on December 11, 2012, 03:46:20 PM
hmm, my page wont load after this edit. So i guess that is not working. Tried several times and all i get is that the page is configured wrong and that it cannot be loaded.  ::)
Title: Re: Shoutbox and Aeva MOD
Post by: IchBin on December 11, 2012, 09:41:34 PM
Sorry about that, I missed a closing ")" character. Fixed it above in the last part, try it again if you want to.
Title: Re: Shoutbox and Aeva MOD
Post by: Kimmen on December 12, 2012, 10:36:43 AM
After edit, look at picture in attachment.
Everything below Topbar is missing :D

Title: Re: Shoutbox and Aeva MOD
Post by: IchBin on December 13, 2012, 12:37:03 AM
haha awesome. Sorry, but without any way to test it I don't think I'll get this figured out. Don't have the time to install aeva and test etc.

Was there any errors in the smf log from putting that code into your file?
Title: Re: Shoutbox and Aeva MOD
Post by: Kimmen on December 13, 2012, 01:10:28 PM
It is okay, ill just remove those links  :)
Thanks for trying IchBin.