News:

Wondering if this will always be free?  See why free is better.

Main Menu

Embed smule.com BBCode

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

Previous topic - Next topic

Ghislain.Dejoie

Hello,
I would like to give my registered members the opportunity to post their recorded recordings from smule.com [nofollow]
2 codes are recoverable
That of the address bar (example):
https://www.smule.com/recording/john-lennon-woman/561965069_892666490 [nofollow]

The one to generate (example):
<iframe src="https://www.smule.com/recording/john-lennon-woman/561965069_892666490/frame [nofollow]" width="100%" height="125" frameborder="0"></iframe>

Could someone help me?
Thanks in advance

dougiefresh

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

dougiefresh

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

Ghislain.Dejoie

Hello,
Congratulations for this work


It works well* with this type of link:
[smule]https://www.smule.com/recording/coeur-de-pirate-mistral-gagnant-fr/884746559_759522678[/smule]

But it does not work with this type of link:
[smule]https://www.smule.com/recording/patricia-kaas-mon-mec-%C3%A0-moi/884746559_777176584[/smule]

Probably because of %

You can see an example here:
http://club-karaoke.org/index.php?board=4.0 [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="https://smule.com/recording/coeur-de-pirate-mistral-gagnant-fr/884746559_759522678/frame [nofollow]" scrolling="no" frameborder="0"></iframe></div></div>

dougiefresh

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....

Ghislain.Dejoie

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="https://smule.com/recording/france-gall-evidemment/469040380_880486539/frame [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="https://smule.com/recording/france-gall-evidemment/469040380_880486539/frame [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 ?

Ghislain.Dejoie

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="https://smule.com/' [nofollow]; . $data .'/frame" scrolling="no" frameborder="' . $frameborder . '" style="width: ' . (empty($width) ? '100%;' : $width . 'px;') . ' height: 125px;"></iframe></div></div>';

I tested in:
Firefox
Safari
IE 11
Edge
Chrome
And there does not seem to be any problem

dougiefresh

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....

Ghislain.Dejoie

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 !?

dougiefresh

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

dougiefresh

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

Advertisement: