Simple Audio Video Embedder

Started by SMFHacks.com Team, August 09, 2010, 10:42:47 PM

Previous topic - Next topic

vbgamer45

Check
Administration Center » Posts and Topics » Bulletin Board Code

"Automatically link posted URLs" must be checked
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Dblog

It is already checked.. but still videos are posted as links

vbgamer45

Something is wrong either the mod didn't' get installed. There should be a settings area in the admin to configure which video sites can be embeded.
Or there is another mod that is conflicting with this one.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Dblog

Ok i'll uninstall mod.
manually i parsed the mod and checked all files. They were okay

grzeg8102

@vbgamer45 - I like this mod. It makes embedding various media so easy.
However I'm missing two things:
1. Support for preview - while editing a post one can't determine how will the embedded media look like in a published post
2. Twitter support :)

Any plans to introduce these 2?

vbgamer45

1. Had that option long time ago but it broke other things so was removed. Don't remember what now but it was mentioned in posts a while back.

2. Twitter is complicated. I have a separate mod for that.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

vbgamer45,

The buddy has 24 modifications installed on the forum:

Avatars on Board/MessageIndex 2.0.17
Like Posts 2.2
Download Attachment Permission v2 1.0
ShowBannedMessage 1.6
Ohara YouTube Embed 1.2.10
AJAX Recent Topics 1.1    
SMFPacks Shoutbox Pro 1.4.5    
SimpleColorizer 1.1    
Regbar Warning 1.0.5    
Confirmation message to Mark as Read 1.00
@mention members 1.1.2
Image Upload 1.0.0    
reCAPTCHA for SMF 2.0.0    
Medal Honor For Years 1.0
Admin member list registration date 1.2    
Tapatalk SMF 2.0 Plugin 4.5.7    
Quick Spoiler 1.2.3    
Yet Another Global Announcements Mod 2.7.5
Ultimate Menu 1.0.3    
Change All Subjects 1.3
Drafts 2.2
TinyPortal 1.6.5    
dQuoteSelection 2.6.4

and I wanted to install Simple Audio Video Embedder, but there is test failed:



./Sources/Post.php

Code: (Find)

'<img>'

Code: (Replace)

'<img><object><embed><div><iframe><blockquote>'

I installed Simple Audio Video Embedder on a clean test forum and the modification installed correctly. So I guess any modification that is installed on the forum collides with Simple Audio Video Embedder modification. So I would like to know if I should before installation manually change this code in Post.php?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

However, the Post.php file does not have this code:

'<img>'

vbgamer45

Check the original source files.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

However, I found these codes in the forum file. Only these codes contain: <img>

// Let's see if there's still some content left without the tags.
if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><iframe><video><div>')) === '' && (!allowedTo('admin_forum') || strpos($_POST['message'], '[html]') === false))
$post_errors[] = 'no_message';


if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><iframe><video><div>')) === '')
{
$post_errors[] = 'no_message';
unset($_POST['message']);
}
}
}

vbgamer45

That is it. add to the tag list if it is missing any.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

Well, but where should I add this code exactly?

'<img><object><embed><div><iframe><blockquote>'

These codes contain the following code:

'<img><iframe><video><div>

vbgamer45

The part where <img><iframe><video><div>
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

In this way?

// Let's see if there's still some content left without the tags.
if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><iframe><video><div>'<img><object><embed><div><iframe><blockquote>')) === '' && (!allowedTo('admin_forum') || strpos($_POST['message'], '[html]') === false))
$post_errors[] = 'no_message';


if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><iframe><video><div>'<img><object><embed><div><iframe><blockquote>')) === '')
{
$post_errors[] = 'no_message';
unset($_POST['message']);
}
}
}

vbgamer45

nooo...


Like this....

// Let's see if there's still some content left without the tags.
if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><object><embed><div><iframe><blockquote>')) === '' && (!allowedTo('admin_forum') || strpos($_POST['message'], '[html]') === false))
$post_errors[] = 'no_message';


if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><object><embed><div><iframe><blockquote>')) === '')
{
$post_errors[] = 'no_message';
unset($_POST['message']);
}
}
}
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

Thanks for the explanation, but this video code is from what?

'<img><iframe><video><div>'

From another modification that is installed?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

This code has been added by modification Ohara YouTube Embed:

'<img><iframe><video><div>'

Well, I can't use two modifications to insert a video. 8)

vbgamer45

Well you could... not sure how it will work.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: