/
OEmbedPlugin.txt
192 lines (165 loc) · 6.72 KB
/
OEmbedPlugin.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
---+!! %TOPIC%
%SHORTDESCRIPTION%
%TOC%
oEmbed is a format for allowing an embedded representation of a URL on third
party sites. The simple API allows a website to display embedded content (such
as photos or videos) when a user posts a link to that resource, without having
to parse the resource directly.
All you need to do to embed material from one of the supported providers is to
add a link to it. The plugin will contact the provider and use the appropriate
code to add it to the page, e.g. add an iframe for videos and the like.
---++ Supported providers
<noautolink>
1 Amazon (embed.ly)
1 Aol
1 Blib.tv
1 Chirbit
1 CircuitLab
1 Clickthrough
1 Clipfish (embed.ly)
1 CollegeHumor
1 !DeviantArt
1 DailyMotion
1 Dotsub
1 Flickr
1 Foursquare (embed.ly)
1 Geograph Britain
1 Geograph Channel Islands
1 Geograph Germany
1 Google Maps (embed.ly)
1 Hulu
1 IMDB (embed.ly)
1 Instagram (embed.ly)
1 Jest
1 Kinomap
1 MixCloud
1 Nfb
1 PollEverywhere
1 Qik
1 Quiz.biz
1 Revision3
1 Screencast (embed.ly)
1 Screenr
1 Scribd
1 SlideShare
1 SoundCloud (embed.ly)
1 Ted
1 Twitpic (embed.ly)
1 Twitter
1 Viddler
1 Viddler
1 Vimeo
1 Vimeon
1 Washington Post (embed.ly)
1 WordPress
1 Youtube
</noautolink>
A lot of providers are available via http://embed.ly. However, you'll have to register to get an api-key.
Some of the listed providers have already been added to this plugin, yet not all.
---++ Usage
*Syntax*: =%EMBED<nop>{"url" [width="..." height="..."]}%=
* =url=: an external link to the resource to be embedded
* =width=, =height=: optional maximum values for the image/video/... being embedded (note: not all providers properly implement these parameters)
* =format=: a format string to implement a custom renderer
* =template=: the name of a template defined in =oembed.tmpl=; known templates shipped with %TOPIC% are "article" (todo add more)
* =<custom_key>=: any custom key="value" pair may be defined and made use of in the format (or template) using =$custom_key= to expand it;
these have higher precendence than the default values submitted by the oembed provider; for example use a custom =thumbnail_width="100"= parameter
to override the default width.
The keys in the json submitted from the oembed provider can be used in a format string (or a template definition). Some well-known keys are:
* =$author_name=
* =$author_url=
* =$descriptio=
* =$html=
* =$provider_name=
* =$provider_url=
* =$thumbnail_height=
* =$thumbnail_url=
* =$thumbnail_width=
* =$title=
* =$type=
* =$url=
* =$web_page=
In addition all standard format tokens can be used (=$percnt=, =$dollar=, =$nop=, etc).
See the =oembed.tmpl= file on how to use them.
---++ Examples
---+++ Washington Post
<verbatim class="tml">
%EMBED{"http://www.washingtonpost.com/investigations/us-intelligence-mining-data-from-nine-us-internet-companies-in-broad-secret-program/2013/06/06/3a0c0da8-cebf-11e2-8845-d970ccb04497_story.html"
template="article"
thumbnail_width="100"
}%
</verbatim>
%EMBED{"http://www.washingtonpost.com/investigations/us-intelligence-mining-data-from-nine-us-internet-companies-in-broad-secret-program/2013/06/06/3a0c0da8-cebf-11e2-8845-d970ccb04497_story.html"
template="article"
thumbnail_width="100"
}%
---+++ Youbtube
<verbatim class="tml">
%EMBED{"http://www.youtube.com/watch?v=O8e8Ttfz-pY" width="600"}%
</verbatim>
%EMBED{"http://www.youtube.com/watch?v=O8e8Ttfz-pY" width="600"}%
---+++ Soundcloud
<verbatim class="tml">
%EMBED{"http://soundcloud.com/safia-music/listen-to-soul-listen-to-blues" width="600"}%
</verbatim>
%EMBED{"http://soundcloud.com/safia-music/listen-to-soul-listen-to-blues" width="600"}%
---+++ Flickr
<verbatim class="tml">
%EMBED{"http://www.flickr.com/photos/onement/1239189689/" height="400"}%
</verbatim>
%EMBED{"http://www.flickr.com/photos/onement/1239189689/" height="400"}%
---+++ More examples
<verbatim class="tml">
%EMBED{"http://www.jest.com/video/197394/paul-ryan-rap"}%
%EMBED{"http://chirb.it/Jh25OE"}%
%EMBED{"http://dotsub.com/view/10e3cb5e-96c7-4cfb-bcea-8ab11e04e090"}%
%EMBED{"http://geo.hlipp.de/photo/20260"}%
%EMBED{"http://instagram.com/p/Z-u2XxQJ7H/"}%
%EMBED{"http://matt.wordpress.com/2011/07/14/clouds-over-new-york/"}%
%EMBED{"http://pycon.blip.tv/file/2058801"}%
%EMBED{"http://qik.com/video/50925"}%
%EMBED{"http://revision3.com/diggnation/2008-04-17xsanned"}%
%EMBED{"https://twitter.com/nuddlegg/status/330610557793210369"}%
%EMBED{"https://www.circuitlab.com/circuit/e38756/555-timer-as-astable-multivibrator-oscillator/"}%
%EMBED{"http://twitpic.com/cuisl3"}%
%EMBED{"http://vimeo.com/7100569"}%
%EMBED{"http://www.amazon.com/Myths-Innovation-Scott-Berkun/dp/0596527055/"}%
%EMBED{"http://www.clikthrough.com/theater/video/45//en-US"}%
%EMBED{"http://www.clipfish.de/special/boese-maedchen/video/3687388/boese-maedchen-ladys-first/"}%
%EMBED{"http://www.collegehumor.com/video/3922232/prank-war-7-the-half-million-dollar-shot"}%
%EMBED{"http://www.dailymotion.com/video/x5ioet_phoenix-mars-lander_tech"}%
%EMBED{"http://www.geograph.org.gg/photo/773"}%
%EMBED{"http://www.geograph.org.uk/photo/2928776"}%
%EMBED{"http://www.hulu.com/watch/471667"}%
%EMBED{"http://www.kinomap.com/kms-vzkpc7"}%
%EMBED{"http://www.mixcloud.com/johndigweed/transitions-with-john-digweed-30th-may-2013/"}%
%EMBED{"http://www.nfb.ca/film/blackfly/"}%
%EMBED{"http://www.polleverywhere.com/multiple_choice_polls/LTIwNzM1NTczNTE"}%
%EMBED{"http://www.quiz.biz/quizz-182015.html"}%
%EMBED{"http://www.scribd.com/doc/17896323/Indian-Automobile-industryPEST" width="600"}%
%EMBED{"http://www.slideshare.net/haraldf/business-quotes-for-2011"}%
%EMBED{"http://www.ted.com/talks/hendrik_poinar_bring_back_the_woolly_mammoth.html"}%
%EMBED{"http://www.viddler.com/v/1646c55"}%
%EMBED{"http://www.screencast.com/t/jHhhu39t"}%
%EMBED{"http://www.screenr.com/fTK"}%
%EMBED{"http://goo.gl/maps/22OR8"}%
%EMBED{"https://foursquare.com/v/vapiano/4b212bc4f964a520ac3724e3"}%
%EMBED{"http://feigiap.deviantart.com/art/Shop-380055652"}%
</verbatim>
---++ Installation Instructions
%$INSTALL_INSTRUCTIONS%
---++ Info
<!--
* Set SHORTDESCRIPTION = %$SHORTDESCRIPTION%
-->
| Author(s): | Michael Daum|
| Copyright: | © 2013 Michael Daum http://michaeldaumconsulting.com |
| License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order --> |
| 24 Jun 2013 | added format, template and custom params; \
added a few more providers |
| Dependencies: | %$DEPENDENCIES% |
| Home page: | Foswiki:Extensions/%TOPIC% |
| Support: | Foswiki:Support/%TOPIC% |