First release. Not tested thoroughly. No config options.
View Steve Clay's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Oops, the repo has a small fix to hide embeds in river comments.
Steve, good to see some nice JS action going. Just a quick point, it's best to keep js and css files in the views folder (even if they are vendor libraries)
views/default/vendors or views/default/js/vendors
That will allow plugin authors to include earlier/later versions of libraries if needed.
I am also seeing that you are extending core js. Probably not a good idea, considering your libraries might not be needed across all site pages. Use elgg_register_js / elgg_load_js instead.
Cheers, mate. Good to have you in the community.
I added the elgg_register_js()/elgg_load_js() functions to Elgg 1.8 so that plugins could override the versions of JS libs. What advantage is there to using the views system for that, Ismayil?
I dont have 'title' showing in my elgg 1.8 when I go to embed anything, only if I am uploading a file. Is there another plugin I need to install other than what comes with Elgg 1.8?
I have image URL, image description, alignment, dimensions, border, height and width
Cash, in case of this plugin the views system would be the only way to override the libs, because register/load are not used.
Advantage is also in the ability to extend the views.
Besides, for as long as elgg_load_js when called in xhr, views sometimes is the only convenient way to get the js needed.
Cash/Ismayil: if the plugin should be using elgg_register_* functions or some other improvement, I welcome pull requests ;)
Sure, Steve :) I will be happy to contribute, once (and if I ever) finish working on my plugins and making pull requests for Elgg core :)
does this work on 1.8.3?
is there a chance the coder can look at this page ? https://occupythecomms.cc/pages/view/127241/test-embed
and tell us what's wrong ? why is the oembed "Loading" but not displaying on certain type of content like ustream or bambuser, but it does work on git or youtube..
@Ben it could be that the underlying jQuery library is out of date/does not support those sites. Check your Javascript error log, as all of this plugin is client-side.
is there a way to auto include oembed attribute to the river or to anylink from outside or from inner site posted on the river ? plugin would try to embed based on providers otherwise would display has normal link...?
@Ben, it's possible, and not difficult with jQuery. You'll need to also do this before the oembed plugin JS runs to get the attribute there before the plugin checks for it. What I'd worry about is the client-side overhead of trying to embed links that don't have an oembed handler; I don't know exactly what happens.
you can see it on the page here : https://occupythecomms.cc/pages/view/127241/test-embed
for exemple bambuser has no handler...so it make a Loading... and still display the link, i wish it could degrade better...or check from a list of handler before attritbuting..not sure how I would do this with jquery, but going to research..