Advertisement:

Author Topic: Embed BBCode  (Read 55211 times)

Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Embed BBCode
« on: June 02, 2011, 07:29:55 PM »
Link to Mod

Introduction
This mod allows you to insert media embed code from known websites without any hassle.
Just copy the embed code like <object ... , <embed ... , <iframe ... , short/long url youtube and paste it inside the embed tag and the media will be displayed in your post.

Features
* Creates a bbcode button that inserts streaming media in the post.
* If you uncheck 'Embed flash into posts' from 'Post Settings' you disable the embed as well.

Languages
english
english-utf8
greek
greek-utf8

History
2.0 - Fixed the regex for non http, https on dailymotion and vimeo urls
1.9 - Added wmode parameter to avoid video overlay
1.8 - Fixed the regex for non http, https on youtube url
1.7 - Added slashes on regex for special characters
1.6 - Minor fixes
1.5 - Added HTTPS and privacy-enhanced mode for youtube
1.4 - Added support for SMF 1.1.x
1.3 - Added security checks
      - Now accepts embed code only from: megavideo, metacafe, dailymotion, veoh, vimeo, youtube
1.2 - Reworked and added dailymotion iframe embed code
1.1 - Removed iframe code creation on post and replaced with embed code
      - Added old youtube link insertion
1.0 - Initial release
« Last Edit: September 30, 2014, 08:14:19 AM by nikan »

Offline !RFAN

  • Sr. Member
  • ****
  • Posts: 716
  • Gender: Male
Re: Embed BBCode
« Reply #1 on: June 03, 2011, 12:02:40 AM »
very nice.. thanks :)

Offline OCJ

  • Full Member
  • ***
  • Posts: 494
  • Gender: Male
Re: Embed BBCode
« Reply #2 on: June 04, 2011, 02:07:52 AM »
Worked like a treat but when I tried to embed more than one in a single topic the iframe just enclosed a link to the main index page - cms portal page. I use SMF  embedded in Joomla, perhaps the problem is there.

domain.com/smf  displayed  domain.com/index.php

Useing embed once on a page was ok though.


Offline Eudemon

  • Sr. Member
  • ****
  • Posts: 807
  • An Anime Fan
    • KumaKuni
Re: Embed BBCode
« Reply #3 on: June 18, 2011, 10:12:24 AM »
i kinda like the idea using embed code instead of just the url like the other embed mod does

in reality we don't have to update the pattern when there is a code change and also url embed mod has limited patterns to the video sites

anyway i haven't test this mod yet, still upgrading my site, but doesn't this sorta give member the ability to use html in post?

Offline Adam_Jack

  • Newbie
  • *
  • Posts: 1
Re: Embed BBCode
« Reply #4 on: June 20, 2011, 01:59:24 PM »
i downloaded the MOD, but, how do i install it please ?
am using SMF_v2.0 RC5

Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Re: Embed BBCode
« Reply #5 on: June 26, 2011, 05:39:37 AM »
Quote
i kinda like the idea using embed code instead of just the url like the other embed mod does
There 're mods that don't even have a button to insert the url. Members aren't admins nor psychics to know about it.

Quote
in reality we don't have to update the pattern when there is a code change and also url embed mod has limited patterns to the video sites
True.

Quote
anyway i haven't test this mod yet, still upgrading my site, but doesn't this sorta give member the ability to use html in post?
Doesn't flash button do the same?


Quote
i downloaded the MOD, but, how do i install it please ?
am using SMF_v2.0 RC5
From Admin -> Package Manager -> Download Packages -> Upload a Package

Offline blacktux

  • Newbie
  • *
  • Posts: 1
Re: Embed BBCode
« Reply #6 on: July 08, 2011, 10:49:11 AM »
For some reason after I embed the code into a post, it just shows up on the post as plain text. It does not process the code. I have html and flash enabled on the forum.
I am using SMF version 2.0
I can PM you with a link if you want to see what I am referring too.

Update:
It works with Youtube but not Umapper (a custom map website).
« Last Edit: July 08, 2011, 11:21:33 AM by blacktux »

Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Re: Embed BBCode
« Reply #7 on: July 09, 2011, 01:02:56 AM »
The attachment mod includes the umapper embed code.
Thanks for using it.

Offline k12onos

  • Semi-Newbie
  • *
  • Posts: 22
Re: Embed BBCode
« Reply #8 on: July 17, 2011, 09:40:08 PM »
Will enabling flash really pose a security risk for the forum?

SMF seems to put much emphasize on how enabling flash will create security risks, and I surely don't want that :(

But, this mod is great, I tried different kinds of code including the "youtu.be" link and it still works :D that's why I want to keep it while still understanding the risks. :)

What is the worst thing people could do by exploiting the enabled flash?
« Last Edit: July 17, 2011, 09:48:10 PM by k12onos »

Offline k12onos

  • Semi-Newbie
  • *
  • Posts: 22
Re: Embed BBCode
« Reply #9 on: July 24, 2011, 06:01:19 AM »
Anyone knows anything about this? any answer is much appreciated, thank you in advance :)

Offline Tupsi

  • Semi-Newbie
  • *
  • Posts: 12
Re: Embed BBCode
« Reply #10 on: August 22, 2011, 07:03:09 AM »
I am having problems getting this to work. It says that it has installed successfully, the .gif for the button is in the correct place, the changes in sub and sub-editor are all there, but still I neither see the new button in my editor nor are [embed] tags processed. Totally no clue why. I tested this on 2 different smf boards (both 2.0), one has already some extra stuff installed which maybe could cause a problem, but the other one is a completly vanilla install.

Anyone has an idea where I could log into to find the problem?

Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Re: Embed BBCode
« Reply #11 on: August 22, 2011, 08:42:21 AM »
I am having problems getting this to work. It says that it has installed successfully, the .gif for the button is in the correct place, the changes in sub and sub-editor are all there, but still I neither see the new button in my editor nor are [embed] tags processed. Totally no clue why. I tested this on 2 different smf boards (both 2.0), one has already some extra stuff installed which maybe could cause a problem, but the other one is a completly vanilla install.

Anyone has an idea where I could log into to find the problem?

You have unchecked 'Embed flash into posts' for 'Post Settings'. You must check it to enable both embedded flash and embedded code in to posts.

Offline Tomy Tran

  • Senior Translator
  • Jr. Member
  • *
  • Posts: 317
  • Gender: Male
  • Vietnamese Translator
    • the.tomytran on Facebook
    • tomytran on LinkedIn
    • @_tomytran on Twitter
    • Call to +84 9 0602 6930 or visit www.tomytran.com
Re: Embed BBCode
« Reply #12 on: October 02, 2011, 06:30:07 PM »
You should update file into mod site on Link to mod, or should notify members download new one on Topic support ;)

Offline Tomy Tran

  • Senior Translator
  • Jr. Member
  • *
  • Posts: 317
  • Gender: Male
  • Vietnamese Translator
    • the.tomytran on Facebook
    • tomytran on LinkedIn
    • @_tomytran on Twitter
    • Call to +84 9 0602 6930 or visit www.tomytran.com
Re: Embed BBCode
« Reply #13 on: October 03, 2011, 04:41:40 AM »
I did not have this mod successfully on my localhost smf 2.0.1. All other mod is OK, but this mod is successful installed, show button, added code [embed=425,349][/embed] in post (flash enabled) but when save it show as plant text and disappear your code. Any advice, author?

Offline krash661

  • Jr. Member
  • **
  • Posts: 245
Re: Embed BBCode
« Reply #14 on: October 18, 2011, 12:54:34 PM »
does this work for regular members and subscribers also?

Offline krash661

  • Jr. Member
  • **
  • Posts: 245
Re: Embed BBCode
« Reply #15 on: October 18, 2011, 03:22:35 PM »
I did not have this mod successfully on my localhost smf 2.0.1. All other mod is OK, but this mod is successful installed, show button, added code [embed=425,349][/embed] in post (flash enabled) but when save it show as plant text and disappear your code. Any advice, author?
yeah,im having the same problem. it does not work as a admin or member or subscriber.
« Last Edit: October 18, 2011, 03:50:37 PM by krash661 »

Offline 5p00f3r

  • Semi-Newbie
  • *
  • Posts: 10
Re: Embed BBCode
« Reply #16 on: October 22, 2011, 10:17:33 PM »
I installed the Mod and for some reason the Embed button its not showing..I had to Fix The Language file thats the only manual Mod i made.. any help?

Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Re: Embed BBCode
« Reply #17 on: October 26, 2011, 02:53:11 PM »
I did not have this mod successfully on my localhost smf 2.0.1. All other mod is OK, but this mod is successful installed, show button, added code [embed=425,349][/embed] in post (flash enabled) but when save it show as plant text and disappear your code. Any advice, author?
yeah,im having the same problem. it does not work as a admin or member or subscriber.
Is your video embed code from megavideo, metacafe, dailymotion, veoh, vimeo, youtube?

I installed the Mod and for some reason the Embed button its not showing..I had to Fix The Language file thats the only manual Mod i made.. any help?
Double check the installation.

Offline Tomy Tran

  • Senior Translator
  • Jr. Member
  • *
  • Posts: 317
  • Gender: Male
  • Vietnamese Translator
    • the.tomytran on Facebook
    • tomytran on LinkedIn
    • @_tomytran on Twitter
    • Call to +84 9 0602 6930 or visit www.tomytran.com
Re: Embed BBCode
« Reply #18 on: October 26, 2011, 04:57:27 PM »
From youtube. I had un-installed it then (sorry for bad news but it doesn't work).

Using SMF 2.0+, I can add youtube via flash button by change youtube url from

http://www.youtube.com/watch?v=iTA463bLJsw

to

http://www.youtube.com/v/iTA463bLJsw

(change = to / and remove watch?) and it work very good, not test other media channel.

Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Re: Embed BBCode
« Reply #19 on: October 27, 2011, 12:55:04 AM »
You used the shorturl or the embed code of youtube video for this mod?