This topic was marked solved by Nao, on March 27th, 2014, 07:43 PM
[Aeva] Soundcloud

CerealGuy

  • Posts: 343
[Aeva] Soundcloud
« on January 26th, 2014, 03:50 PM »
Im waiting for Wedge to release since a year or probably more and im really happy that it happend :D
Therefore played a bit with it and im really amused. It's awesome :yahoo:
Ok here we go:
I was trying to add a new embed thing to aeva but i failed and dont really know why.
Code: (end of Subs-Aeva-Sites.php) [Select]
array(
'id' => 'scld',
'title' => 'Soundcloud',
'website' => '[url]http://www.soundcloud.com[/url]',
'type' => 'pop',
'plugin' => 'html',
'pattern' => 'http://(?:www\.)?soundcloud\.com/([0-9a-zA-Z-\/]{0,})',
'movie' => '<iframe width="{int:width}" height="{int:height}" scrolling="no" frameborder="no" src="[url]https://w.soundcloud.com/player/?url=[/url]$1&color=ff6600&auto_play=false&show_artwork=true"></iframe>',
'size' => array(
'normal' => array(480, 385),
'ws' => array(640, 385),
),
'ui-height' => 0,
'show-link' => true,
'lookup-title' => '<title>(.*?)</title>',
),

I changed a lot and therefore theres much useless stuff in it (tried with less, didnt helped :D).
The problem is that the regex looks to work, i get that href stuff (show-link & lookup-title) and the link is working how it should. But for some reasons, i dont have the iframe and dont know why. Its not in page source?! But how could that be if show-link works? It's enabled in ACP.

Thanks in advance :)

PS: I dont know why but i pasted the code without the [url] tag but it appeared. Looks like a bug?!

Posted: January 22nd, 2014, 10:50 PM

Would be nice if someone could help :angel:

Nao

  • Dadman with a boy
  • Posts: 16,063
[Aeva] Re: Soundcloud
« Reply #1, on January 27th, 2014, 10:27 AM »Last edited on March 27th, 2014, 06:42 PM
First, let me reproduce your bug...

Code: (end of Subs-Aeva-Sites.php) [Select]
'website' => '[url]http://www.soundcloud.com[/url]',

Hmm. That's unsettling. I'll look into it when I have more time. This is one of the usual 'bugs' in BBC parsing in SMF and forks, BTW. I've fixed this kind of bug many times. It pretty much warrants a rewrite of the protection code, but parse_bbc is a behemoth that no one likes, but still is more efficient than early SMF 1.0 regex versions.

Now, when it comes to iframes, I would recommend that you use the current code in the YouTube embed array. It's more solid, because it's responsive. Then, come back to me. ;)
[Aeva] Re: Soundcloud
« Reply #2, on March 27th, 2014, 06:55 PM »Last edited on March 27th, 2014, 07:32 PM
Testing.

Hmm.

Fuck, Google Maps is also broken. New version has different URLs... -_-
[Aeva] Re: Soundcloud
« Reply #3, on March 27th, 2014, 07:41 PM »
Okay, my conclusions...

- I haven't played with Aeva embedding regex in YEARS, literally. Now I remember why I asked people to pay me for custom embeds. Even if it only took me minutes to include a site, some of them were a bitch to make behave. Not only that, but if you don't know shit about this all, or if like me you lost track of how to do it, then you're stuck.

- Seriously, it's always very tempting to remove all sites, and just keep the 'big' ones, with a promise that I'll ensure they always work. That way, perhaps I wouldn't have to deal with site lists, obscure fixes like 'fix-html-pattern' or whatever, and just make it work on YouTube, Dailymotion, Vimeo, Google Maps, and a few others.

- Regarding Google Maps, they have two embed code types. The old one probably still works, but the new one is definitely broken. I spent 20 minutes on it, and couldn't get it to work. I'm upset.

- It looks like Aeva doesn't support https links. It only supports them if they're in embed code, I guess. Oh, my... -_-

- SoundCloud got me, I suppose. I couldn't get it to work, either the share URL or the embed HTML. Without any kind of payment, I won't look any further into it. I like SoundCloud, it's where I go for new Sexy-Synthesizer mixes (I love that guy!! SQ Live sets FTW!!), but I'm not going to waste more time on this. History tells me that 99% of people don't give a damn about embedding data directly into a post, except when it comes to YouTube, which is pretty much 'expected' as an embed. For the rest, they'll happily just post a link to the page in question.

Like this.

SEXY-SYNTHESIZER's sounds on SoundCloud - Hear the world’s sounds

Plus, that way you don't have to point to a particular song. :P

:edit: Well, at least the 'would-be' embed code gave me a title on the link above... ^^

CerealGuy

  • Posts: 343
[Aeva] Re: Soundcloud
« Reply #4, on March 27th, 2014, 07:52 PM »
I understand you totally ^^ Some debug features for aeva would be nice, otherwise its just try and error. But perhaps a small plugin is easier to embed soundcloud, same like twitter. Thanks for having a look at it :)

Nao

  • Dadman with a boy
  • Posts: 16,063
[Aeva] Re: Soundcloud
« Reply #5, on March 27th, 2014, 07:54 PM »
Well, there's always the... hmm... possibility of doing per-site embed functions, and then allow plugins to add their own custom functions.
That way, we could still get rid of the site list. ;)

Pandos

  • Living on the edge of Wedge
  • Posts: 635
# dpkg-reconfigure brain
error: brain is not installed or configured

Nao

  • Dadman with a boy
  • Posts: 16,063
[Aeva] Re: Soundcloud
« Reply #7, on March 27th, 2014, 08:22 PM »
That would mean dropping Aeva entirely, wouldn't it..? :^^;:

I may no longer be the Aeva genius I used to be, but it's still my high point in my SMF career... :lol: