'member oEmbed? I 'member! (https://www.elkarte.net/community/index.php?topic=2442.0)This is version 1.0.6 which is the forumsearch0r version of "0.0.7 pre-alpha". It works but it could be more beautiful.
Obligatory add-on screenshot:
(Link-5754) The README:
Maybe I'll find out how Twitter's CSS can be fetched automatically or something. ::)
Source code (https://code.rosaelefanten.org/ElkArte/dir?name=OEmbed) for the curious ones. Pull requests are appreciated unless they suck.
Enjoy or don't or whatever.
Change log etc. (will be updated):
version 1.0.1:
It seems like ElkArte supports the URL tag. OEmbed didn't. Now it does.
version 1.0.2:
A $ slipped in. PHP did not care, the code logic did though.
version 1.0.3:
Fixed a PCRE mistake introduced in 1.0.1.
version 1.0.4:
Completed dependency checking.
version 1.0.5:
Fixed the "empty message" error after trying to post a OEmbed-capable link.
version 1.0.6:
Added a cURL timeout flag.
Hi!
I just tried to install the addon twice. After the installations, I can not call/open the index page of the forum. Neither with link "Forum", nor by clicking on the house icon. Instead, this error message appears: preg_match_all (): Unknown modifier 'g'
What went wrong?
Try 1.0.3.
Thank you, now it works!
And thanks for the addon. :)
You're welcome!
How to embed Facebook posts? I tried it in different ways, but nothing was successful.
How can I embed such URLs, for example?
https://www.facebook.com/fontawesome/posts/1300194723417903
https://www.facebook.com/fontawesome/photos/a.905912386179474.1073741825.905911176179595/1300188240085218/?type=3
Does Facebook support OEmbed for that in the first place?
I thought Facebook would do that, but apparently that's not the case.
I found this page and thought I just have to insert a simple link, but it's a bigger thing and I don't know if that works in forums anyway.
https://developers.facebook.com/docs/plugins/oembed-endpoints?locale=en_US
Which pages officially support OEmbed?
.
Twitter and YouTube were both tested by me, some board software supports it as well (so does WordPress IIRC), otherwise there is no "official" list since anyone can just add OEmbed support to their site if they feel like it.
ElkArte does not, by the way.
Aha, okay.
It works with Instagram as well. Just like with Twitter with the date link.
Thank you
@forumsearch0r2 , it works perfectly.
One issue is that, when i post YouTube link it shows
"The message has the following error or errors that must be corrected before continuing:
The message body was left empty."
Which video have you tried? So I can reproduce it.
Any youtube video, gives me the same error.
Url: https://www.youtube.com/watch?v=3nQNiWdeH2Q
(Link-5818)
Welcome to "things I had not tested" ... :D
Turns out that it is (mostly) impossible to have an ElkArte post which only contains HTML text without any extra text. There is no obvious way to circumvent that.
I'm on it.
@forumsearch0r2 any updates on the Addon?
I haven't heard back from @emanuele yet - I asked him on the IRC about a possible solution and I am still waiting. :)
Because I - personally - don't know the internals of ElkArte well enough.
Do you happen to have an idea?
Can you not just add a  ?
It’s not a pretty way I’ll give you that but it ‘should’ work. I think anyway...
I would assume that " " would appear as plain text in the posting...
It should appear as a space, I would of thought?
No, that does not work - seems to be counted as "no text" by ElkArte's emptiness parser.
You could try
⁣
that may not strip out
Oh .. in addition to curl you should check for xml_parser_create ... see the Ubuntu note here http://php.net/manual/en/xml.installation.php
It does not, indeed. Thank you. (Now this is an ugly workaround... I'd like to request a plug-in hook to allow empty messages, please?)
I updated the add-on to version 1.0.4, reflecting changes that worked in my test installation. :)
Oh, Ubuntu. Never cease to de-amaze me.
I'm updating to 1.0.5 which checks for the "xml" extension as well...
So long as php is properly installed, an ubuntu server should work just fine as any others. :P
@forumsearch0r2 So i can download the addon again from first post and use it?
Uhm... probably.
@forumsearch0r2 i asked that assuming you have updated the addon. If not no use in downloading it again.
I did - to 1.0.5. :)
I forgot to update the change log though.
Thank you so much, let me try it and update you!
Looking forward to the next bugs to fix!
is this add-on compatible with elkarte 1.1? If so, please update the first post of this topic.
Also, can you add it to Elkarte Add-ons https://addons.elkarte.net/ ?
could be that your add-on is difficult to find
It should. (As I am currently not running an ElkArte instance - which I plan to change soon -, I'd be glad about any feedback.)
How does adding add-ons work? I haven't checked that yet.
Have a look at this https://www.elkarte.net/community/index.php?topic=2325.0
I can't help since I'm not a coder and don't know how github works, if you have problems ask on forum, I'm sure that someone will answer.
Ew, Git...
Submitted a PR. Now waiting.
edit: Didn't have to wait long.