noahy / q2a-embed Goto Github PK
View Code? Open in Web Editor NEWAllows embedding YouTube videos in Question2Answer
Allows embedding YouTube videos in Question2Answer
qa-embed-layer.php, line 61
'<iframe src="http://player.vimeo.com/video/22775189?title=0&byline=0&portrait=0&wmode=transparent" width="'.$w.'" height="'.$h.'" frameborder="0"></iframe>')
should be:
'<iframe src="http://player.vimeo.com/video/$1?title=0&byline=0&portrait=0&wmode=transparent" width="'.$w.'" height="'.$h.'" frameborder="0"></iframe>')
Thanks NoahY :)
Twitter Embed Please
However it happened in the following article. Not literally :(
http://www.sorularimvar.net/505/hizli-ve-ofkeli-8-cikis-tarihi-vizyon-gosterim-tarihi
Can't get this to embed on vimeo.
Hi Noahy,
I added the feature to embed PDFs.
Here is the news post: http://www.question2answer.org/qa/33644/pdf-embed-now-possible-with-extended-q2a-embed-plugin
You might want to include it into your code.
I will inform Scott to change the core qa-blob.php, because it needs a change to deliver PDFs as inline and not as attachment.
Greetings,
Kai
Failed to load resource: the server responded with a status of 404 (Not Found)
/images/loadingAnimation.gif on thickbox.js
Soundcloud.com is getting more popular, they provide a nice embed widget.
I did the embed by js, but probably for some users it is more suitable to have the embed code generated server side. The js code:
// javascript: parse soundcloud link to embed widget
function parse_soundcloud_links() {
$('a[href*="soundcloud.com"]').each(function(){
var $link = $(this);
$.getJSON('http://soundcloud.com/oembed?format=js&url=' + $link.attr('href') + '&iframe=true&callback=?', function(response){
$link.replaceWith(response.html);
});
});
}
When q2a is accessed over https, embeds with http are not displayed -- as a result of Mixed content (http://www.w3.org/TR/mixed-content/) blocking which is on by default in Firefox since some time (and in other browsers, too).
I was able to work around the issue for a site using https exclusively by replacing the protocol in by hand (e.g. in https://github.com/NoahY/q2a-embed/blob/master/qa-embed-layer.php#L51).
The code should find out whether it is accessed through an encrypted connection or not, and use http
or https
for embedded URLs based on that.
'(https*:\/\/maps.google.com\/?[^< ]+)',
will not parse links from other google maps domains, such as google.de or google.co.uk or ...
Suggestion, use '(https*:\/\/maps.google.\/?[^< ]+)',
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.