Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Embed BBCode

Started by Ghislain.Dejoie, December 29, 2016, 10:40:57 AM

Previous topic - Next topic


I would like to give my registered members the opportunity to post their recorded recordings from [nofollow]
2 codes are recoverable
That of the address bar (example): [nofollow]

The one to generate (example):
<iframe src=" [nofollow]" width="100%" height="125" frameborder="0"></iframe>

Could someone help me?
Thanks in advance


This one looks easy (except for the regex expressions....)  I'll just model it on one of my other embedding mods....


Half an hour worth of work, and DONE!!!  Embed SMule BBCode mod!


Congratulations for this work

It works well* with this type of link:

But it does not work with this type of link:

Probably because of %

You can see an example here: [nofollow]

*When it works well, it cuts much of the visual but it is possible to start the reading.
I noted this detail (with Firebug) :
<div style="max-width: 100%px; height: 120px;"><div class="smule-wrapper"><iframe src=" [nofollow]" scrolling="no" frameborder="0"></iframe></div></div>


Uploaded v1.0.1 - December 30th, 2016
o Fixed several capitalization issues with settings and language settings.
o Fixed issue where URLs with percent sign weren't recognized properly.
o Fixed issue with HTML result so that px wasn't appended to 100%.

@Ghislain.Dejoie: I've addressed a few issues, in addition to the ones you brought up.  Hopefully this takes care of everything....


Phew! What reactivity!
Currently, (with Firebug) I find your code like this:
<div style="max-width: 100%; height: 125px;"><div class="smule-wrapper"><iframe src=" [nofollow]" scrolling="no" frameborder="0"></iframe></div></div>

If you can change it to get it, the display is full and correct
<div><div class="smule-wrapper"><iframe src=" [nofollow]" scrolling="no" frameborder="0" style="width: 100%; height: 125px;"></iframe></div></div>

width: 100% without max-

Little question :
Beginning with Simple Machines, before installing the new version, I uninstall the previous version and erase it.
Then "Maintenance" and empty the cache
Is it the right manipulation ?


Good evening,
In the "Subs-BBCode-SMule.php" file, I modified the code as below and it works

$tag['content'] = '<div><div class="smule-wrapper">' .
      '<iframe src="' [nofollow]; . $data .'/frame" scrolling="no" frameborder="' . $frameborder . '" style="width: ' . (empty($width) ? '100%;' : $width . 'px;') . ' height: 125px;"></iframe></div></div>';

I tested in:
IE 11
And there does not seem to be any problem


Sorry, I'm at work right now.  When I get home, I'll make the change that you've suggested..

Regarding upgrading the mod, yes you must uninstall firat before installing the new version.  The rest is optional, but perhaps good practice....


Bizarre, strange, curious, mysterious, fantastic, supernatural
I open a new subject, I paste the address of a smule record (without adding anything, nor the famous BBcode smule) and the recording automatically appears !?


Yeah, isn't auto-embed lovely?  To get around auto-embed, just enclose the link with [nobbc].


Embed SMule BBCode has been approved.  All support and bug reports should be placed in the mod's thread.  Thank you!