1 | <?php
|
---|
2 | /*
|
---|
3 | Plugin Name: Wordpress Video Plugin
|
---|
4 | Plugin URI: http://www.daburna.de/blog/2006/12/13/wordpress-video-plugin/
|
---|
5 | Description: A filter for WordPress that displays videos from myvideo.de, youtube, google video, Brightcove, Aniboom, 123video.nl, MyspaceTV, Yahoo! Video, Veoh, Wandeo, Glumbert, Gametrailers, Gamevideos, LiveLeak, sevenload.de, clipfish.de, break.com, Metacafe, dailymotion.com, Vimeo, videotube, blip.tv, revver, IFILM, Tu.tv, grouper, Cellfish.com, Sumo.tv, Last.fm, Vsocial, teachertube, SlideShare, Jumpcut, MSN, GoalVideoz, Guba, wat.tv, Facebook, Flickr Video, Kewego, Smotri.Com...and many more.
|
---|
6 | Version: 0.71
|
---|
7 | Author: Oliver Wunder
|
---|
8 | Author URI: http://www.daburna.de/
|
---|
9 |
|
---|
10 |
|
---|
11 | */
|
---|
12 |
|
---|
13 | // Kewego Code
|
---|
14 |
|
---|
15 | define("KEWEGO_WIDTH", 400); // default width
|
---|
16 | define("KEWEGO_HEIGHT", 300); // default height
|
---|
17 | define("KEWEGO_PLAYERKEY", "9c37f60da51b"); //player key
|
---|
18 | define("KEWEGO_SKINKEY", "71703ed5cea1"); //skin key
|
---|
19 | define("KEWEGO_LCODE", "fr"); //language code
|
---|
20 | define("KEWEGO_REGEXP", "/\[kewego ([[:print:]]+)\]/");
|
---|
21 |
|
---|
22 | define("KEWEGO_TARGET", "<object name=\"iLyROoafJCWA\" id=\"iLyROoafJCWA\" type=\"application/x-shockwave-flash\" data=\"http://sa.kewego.com/swf/p3/epix.swf\" width=\"###WIDTH###\" height=\"###HEIGHT###\"> <param name=\"flashVars\" value=\"language_code=###LCODE###&playerKey=###PKEY###&skinKey=###SKEY###&sig=###URL###&autostart=false\" /> <param name=\"movie\" value=\"http://sa.kewego.com/swf/p3/epix.swf\" /> <param name=\"allowFullScreen\" value=\"true\" /> <param name=\"allowscriptaccess\" value=\"always\" /></object>");
|
---|
23 |
|
---|
24 | function kewego_plugin_callback($match)
|
---|
25 | {
|
---|
26 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
27 | $output = KEWEGO_TARGET;
|
---|
28 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
29 | $output = str_replace("###LCODE###", KEWEGO_LCODE, $output);
|
---|
30 | $output = str_replace("###PKEY###", KEWEGO_PLAYERKEY, $output);
|
---|
31 | $output = str_replace("###SKEY###", KEWEGO_SKINKEY, $output);
|
---|
32 | if (count($tag_parts) > 2) {
|
---|
33 | if ($tag_parts[2] == 0) {
|
---|
34 | $output = str_replace("###WIDTH###", KEWEGO_WIDTH, $output);
|
---|
35 | } else {
|
---|
36 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
37 | }
|
---|
38 | if ($tag_parts[3] == 0) {
|
---|
39 | $output = str_replace("###HEIGHT###", KEWEGO_HEIGHT, $output);
|
---|
40 | } else {
|
---|
41 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
42 | }
|
---|
43 | } else {
|
---|
44 | $output = str_replace("###WIDTH###", KEWEGO_WIDTH, $output);
|
---|
45 | $output = str_replace("###HEIGHT###", KEWEGO_HEIGHT, $output);
|
---|
46 | }
|
---|
47 | return ($output);
|
---|
48 | }
|
---|
49 | function kewego_plugin($content)
|
---|
50 | {
|
---|
51 | return (preg_replace_callback(KEWEGO_REGEXP, 'kewego_plugin_callback', $content));
|
---|
52 | }
|
---|
53 |
|
---|
54 | add_filter('the_content', 'kewego_plugin', 1);
|
---|
55 | add_filter('the_content_rss', 'kewego_plugin');
|
---|
56 | add_filter('comment_text', 'kewego_plugin');
|
---|
57 |
|
---|
58 | // FLICKR CODE by an anonymous user
|
---|
59 |
|
---|
60 | define("FLICKR_WIDTH", 308); // default width
|
---|
61 | define("FLICKR_HEIGHT", 250); // default height
|
---|
62 | define("FLICKR_REGEXP", "/\[flickr ([[:print:]]+)\]/");
|
---|
63 | define("FLICKR_TARGET", "<object type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" data=\"http://www.flickr.com/apps/video/stewart.swf?v=71377\"><param name=\"flashvars\" value=\"intl_lang=en-us&photo_secret=1669be43ac&photo_id=###URL###&hd_default=false\"></param><param name=\"movie\" value=\"http://www.flickr.com/apps/video/stewart.swf?v=71377\" /><param name=\"bgcolor\" value=\"#000000\"></param><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.flickr.com/apps/video/stewart.swf?v=71377\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" bgcolor=\"#0000000\" flashvars=\"intl_lang=en-us&photo_secret=1669be43ac&photo_id=###URL###&hd_default=false\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>");
|
---|
64 |
|
---|
65 | function flickr_plugin_callback($match)
|
---|
66 | {
|
---|
67 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
68 | $output = FLICKR_TARGET;
|
---|
69 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
70 | if (count($tag_parts) > 2) {
|
---|
71 | if ($tag_parts[2] == 0) {
|
---|
72 | $output = str_replace("###WIDTH###", FLICKR_WIDTH, $output);
|
---|
73 | } else {
|
---|
74 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
75 | }
|
---|
76 | if ($tag_parts[3] == 0) {
|
---|
77 | $output = str_replace("###HEIGHT###", FLICKR_HEIGHT, $output);
|
---|
78 | } else {
|
---|
79 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
80 | }
|
---|
81 | } else {
|
---|
82 | $output = str_replace("###WIDTH###", FLICKR_WIDTH, $output);
|
---|
83 | $output = str_replace("###HEIGHT###", FLICKR_HEIGHT, $output);
|
---|
84 | }
|
---|
85 | return ($output);
|
---|
86 | }
|
---|
87 | function flickr_plugin($content)
|
---|
88 | {
|
---|
89 | return (preg_replace_callback(FLICKR_REGEXP, 'flickr_plugin_callback', $content));
|
---|
90 | }
|
---|
91 |
|
---|
92 | add_filter('the_content', 'flickr_plugin',1);
|
---|
93 | add_filter('the_content_rss', 'flickr_plugin');
|
---|
94 | add_filter('comment_text', 'flickr_plugin');
|
---|
95 |
|
---|
96 | // FB Code
|
---|
97 | // Code for FaceBook video
|
---|
98 | // credits: roberto scano http://robertoscano.info
|
---|
99 |
|
---|
100 | define("FB_WIDTH", 470);
|
---|
101 | define("FB_HEIGHT", 306);
|
---|
102 | define("FB_REGEXP", "/\[FB ([[:print:]]+)\]/");
|
---|
103 | define("FB_TARGET", "<object type=\"application/x-shockwave-flash\"
|
---|
104 | data=\"http://www.facebook.com/v/###URL###\" width=\"".FB_WIDTH."\"
|
---|
105 | height=\"".FB_HEIGHT."\"><param name=\"autostart\" value=\"false\" /><param
|
---|
106 | name=\"movie\" value=\"http://www.facebook.com/v/###URL###\" /></object>");
|
---|
107 |
|
---|
108 | function FB_plugin_callback($match) {
|
---|
109 | $output = FB_TARGET;
|
---|
110 | $output = str_replace("###URL###", $match[1], $output);
|
---|
111 | return ($output);
|
---|
112 | }
|
---|
113 |
|
---|
114 | function FB_plugin($content) {
|
---|
115 | return preg_replace_callback(FB_REGEXP, 'FB_plugin_callback',
|
---|
116 | $content);
|
---|
117 | }
|
---|
118 |
|
---|
119 | add_filter('the_content', 'FB_plugin');
|
---|
120 | add_filter('comment_text', 'FB_plugin');
|
---|
121 |
|
---|
122 | // current code
|
---|
123 |
|
---|
124 | define("CURRENT_WIDTH", 400); // default width
|
---|
125 | define("CURRENT_HEIGHT", 342); // default height
|
---|
126 | define("CURRENT_REGEXP", "/\[current ([[:print:]]+)\]/");
|
---|
127 | define("CURRENT_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://current.com/e/###URL###/en_US\"></param><param name=\"wmode\" value=\"transparent\"></param><param name=\"allowfullscreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://current.com/e/###URL###/en_US\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" wmode=\"transparent\" allowfullscreen=\"true\" allowscriptaccess=\"always\"></embed></object>");
|
---|
128 |
|
---|
129 | function current_plugin_callback($match)
|
---|
130 | {
|
---|
131 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
132 | $output = CURRENT_TARGET;
|
---|
133 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
134 | if (count($tag_parts) > 2) {
|
---|
135 | if ($tag_parts[2] == 0) {
|
---|
136 | $output = str_replace("###WIDTH###", CURRENT_WIDTH, $output);
|
---|
137 | } else {
|
---|
138 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
139 | }
|
---|
140 | if ($tag_parts[3] == 0) {
|
---|
141 | $output = str_replace("###HEIGHT###", CURRENT_HEIGHT, $output);
|
---|
142 | } else {
|
---|
143 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
144 | }
|
---|
145 | } else {
|
---|
146 | $output = str_replace("###WIDTH###", CURRENT_WIDTH, $output);
|
---|
147 | $output = str_replace("###HEIGHT###", CURRENT_HEIGHT, $output);
|
---|
148 | }
|
---|
149 | return ($output);
|
---|
150 | }
|
---|
151 | function current_plugin($content)
|
---|
152 | {
|
---|
153 | return (preg_replace_callback(CURRENT_REGEXP, 'current_plugin_callback', $content));
|
---|
154 | }
|
---|
155 |
|
---|
156 | add_filter('the_content', 'current_plugin');
|
---|
157 | add_filter('the_content_rss', 'current_plugin');
|
---|
158 | add_filter('comment_text', 'current_plugin');
|
---|
159 |
|
---|
160 |
|
---|
161 | // screencast-o-matic code
|
---|
162 |
|
---|
163 | define("SCREENCAST_WIDTH", 504); // default width
|
---|
164 | define("SCREENCAST_HEIGHT", 424); // default height
|
---|
165 | define("SCREENCAST_REGEXP", "/\[screencast ([[:print:]]+)\]/");
|
---|
166 | define("SCREENCAST_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\" data=\"http://www.screencast-o-matic.com/embed?sc=###URL###&w=500&np=0&v=2\" type=\"text/html\"></object>");
|
---|
167 |
|
---|
168 | function screencast_plugin_callback($match)
|
---|
169 | {
|
---|
170 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
171 | $output = SCREENCAST_TARGET;
|
---|
172 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
173 | if (count($tag_parts) > 2) {
|
---|
174 | if ($tag_parts[2] == 0) {
|
---|
175 | $output = str_replace("###WIDTH###", SCREENCAST_WIDTH, $output);
|
---|
176 | } else {
|
---|
177 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
178 | }
|
---|
179 | if ($tag_parts[3] == 0) {
|
---|
180 | $output = str_replace("###HEIGHT###", SCREENCAST_HEIGHT, $output);
|
---|
181 | } else {
|
---|
182 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
183 | }
|
---|
184 | } else {
|
---|
185 | $output = str_replace("###WIDTH###", SCREENCAST_WIDTH, $output);
|
---|
186 | $output = str_replace("###HEIGHT###", SCREENCAST_HEIGHT, $output);
|
---|
187 | }
|
---|
188 | return ($output);
|
---|
189 | }
|
---|
190 | function screencast_plugin($content)
|
---|
191 | {
|
---|
192 | return (preg_replace_callback(SCREENCAST_REGEXP, 'screencast_plugin_callback', $content));
|
---|
193 | }
|
---|
194 |
|
---|
195 | add_filter('the_content', 'screencast_plugin');
|
---|
196 | add_filter('the_content_rss', 'screencast_plugin');
|
---|
197 | add_filter('comment_text', 'screencast_plugin');
|
---|
198 |
|
---|
199 | // dotSUB code
|
---|
200 |
|
---|
201 | define("DOTSUB_WIDTH", 420); // default width
|
---|
202 | define("DOTSUB_HEIGHT", 347); // default height
|
---|
203 | define("DOTSUB_REGEXP", "/\[dotsub ([[:print:]]+)\]/");
|
---|
204 | define("DOTSUB_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\" data=\"http://dotsub.com/media/###URL###/e/m\" type=\"text/html\"></object>");
|
---|
205 |
|
---|
206 | function dotsub_plugin_callback($match)
|
---|
207 | {
|
---|
208 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
209 | $output = DOTSUB_TARGET;
|
---|
210 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
211 | if (count($tag_parts) > 2) {
|
---|
212 | if ($tag_parts[2] == 0) {
|
---|
213 | $output = str_replace("###WIDTH###", DOTSUB_WIDTH, $output);
|
---|
214 | } else {
|
---|
215 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
216 | }
|
---|
217 | if ($tag_parts[3] == 0) {
|
---|
218 | $output = str_replace("###HEIGHT###", DOTSUB_HEIGHT, $output);
|
---|
219 | } else {
|
---|
220 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
221 | }
|
---|
222 | } else {
|
---|
223 | $output = str_replace("###WIDTH###", DOTSUB_WIDTH, $output);
|
---|
224 | $output = str_replace("###HEIGHT###", DOTSUB_HEIGHT, $output);
|
---|
225 | }
|
---|
226 | return ($output);
|
---|
227 | }
|
---|
228 | function dotsub_plugin($content)
|
---|
229 | {
|
---|
230 | return (preg_replace_callback(DOTSUB_REGEXP, 'dotsub_plugin_callback', $content));
|
---|
231 | }
|
---|
232 |
|
---|
233 | add_filter('the_content', 'dotsub_plugin');
|
---|
234 | add_filter('the_content_rss', 'dotsub_plugin');
|
---|
235 | add_filter('comment_text', 'dotsub_plugin');
|
---|
236 |
|
---|
237 |
|
---|
238 | // OnSMASH code
|
---|
239 |
|
---|
240 | define("ONSMASH_WIDTH", 448); // default width
|
---|
241 | define("ONSMASH_HEIGHT", 374); // default height
|
---|
242 | define("ONSMASH_REGEXP", "/\[onsmash ([[:print:]]+)\]/");
|
---|
243 | define("ONSMASH_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://videos.onsmash.com/e/###URL###\"></param><param name=\"allowFullscreen\" value=\"true\"><param name=\"allowScriptAccess\" value=\"always\"></param><param name=\"allowNetworking\" value=\"all\"></param><embed src=\"http://videos.onsmash.com/e/###URL###\" type=\"application/x-shockwave-flash\" allowFullScreen=\"true\" allowNetworking=\"all\" allowScriptAccess=\"always\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>");
|
---|
244 |
|
---|
245 | function onsmash_plugin_callback($match)
|
---|
246 | {
|
---|
247 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
248 | $output = ONSMASH_TARGET;
|
---|
249 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
250 | if (count($tag_parts) > 2) {
|
---|
251 | if ($tag_parts[2] == 0) {
|
---|
252 | $output = str_replace("###WIDTH###", ONSMASH_WIDTH, $output);
|
---|
253 | } else {
|
---|
254 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
255 | }
|
---|
256 | if ($tag_parts[3] == 0) {
|
---|
257 | $output = str_replace("###HEIGHT###", ONSMASH_HEIGHT, $output);
|
---|
258 | } else {
|
---|
259 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
260 | }
|
---|
261 | } else {
|
---|
262 | $output = str_replace("###WIDTH###", ONSMASH_WIDTH, $output);
|
---|
263 | $output = str_replace("###HEIGHT###", ONSMASH_HEIGHT, $output);
|
---|
264 | }
|
---|
265 | return ($output);
|
---|
266 | }
|
---|
267 | function onsmash_plugin($content)
|
---|
268 | {
|
---|
269 | return (preg_replace_callback(ONSMASH_REGEXP, 'onsmash_plugin_callback', $content));
|
---|
270 | }
|
---|
271 |
|
---|
272 | add_filter('the_content', 'onsmash_plugin');
|
---|
273 | add_filter('the_content_rss', 'onsmash_plugin');
|
---|
274 | add_filter('comment_text', 'onsmash_plugin');
|
---|
275 |
|
---|
276 |
|
---|
277 | // Smotri.Com code
|
---|
278 |
|
---|
279 | define("SMOTRI_WIDTH", 400); // default width
|
---|
280 | define("SMOTRI_HEIGHT", 330); // default height
|
---|
281 | define("SMOTRI_REGEXP", "/\[smotri ([[:print:]]+)\]/");
|
---|
282 | define("SMOTRI_TARGET", "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://pics.smotri.com/scrubber_custom8.swf?file=###URL###&bufferTime=3&autoStart=false&str_lang=eng&xmlsource=http%3A%2F%2Fpics.smotri.com%2Fcskins%2Fblue%2Fskin_color_lightaqua.xml&xmldatasource=http%3A%2F%2Fpics.smotri.com%2Fskin_ng.xml\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"bgcolor\" value=\"#ffffff\" /><embed src=\"http://pics.smotri.com/scrubber_custom8.swf?file=###URL###&bufferTime=3&autoStart=false&str_lang=eng&xmlsource=http%3A%2F%2Fpics.smotri.com%2Fcskins%2Fblue%2Fskin_color_lightaqua.xml&xmldatasource=http%3A%2F%2Fpics.smotri.com%2Fskin_ng.xml\" quality=\"high\" allowscriptaccess=\"always\" allowfullscreen=\"true\" wmode=\"window\" width=\"###WIDTH###\" height=\"###HEIGHT###\" type=\"application/x-shockwave-flash\"></embed></object>");
|
---|
283 |
|
---|
284 | function smotri_plugin_callback($match)
|
---|
285 | {
|
---|
286 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
287 | $output = SMOTRI_TARGET;
|
---|
288 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
289 | if (count($tag_parts) > 2) {
|
---|
290 | if ($tag_parts[2] == 0) {
|
---|
291 | $output = str_replace("###WIDTH###", SMOTRI_WIDTH, $output);
|
---|
292 | } else {
|
---|
293 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
294 | }
|
---|
295 | if ($tag_parts[3] == 0) {
|
---|
296 | $output = str_replace("###HEIGHT###", SMOTRI_HEIGHT, $output);
|
---|
297 | } else {
|
---|
298 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
299 | }
|
---|
300 | } else {
|
---|
301 | $output = str_replace("###WIDTH###", SMOTRI_WIDTH, $output);
|
---|
302 | $output = str_replace("###HEIGHT###", SMOTRI_HEIGHT, $output);
|
---|
303 | }
|
---|
304 | return ($output);
|
---|
305 | }
|
---|
306 | function smotri_plugin($content)
|
---|
307 | {
|
---|
308 | return (preg_replace_callback(SMOTRI_REGEXP, 'smotri_plugin_callback', $content));
|
---|
309 | }
|
---|
310 |
|
---|
311 | add_filter('the_content', 'smotri_plugin');
|
---|
312 | add_filter('the_content_rss', 'smotri_plugin');
|
---|
313 | add_filter('comment_text', 'smotri_plugin');
|
---|
314 |
|
---|
315 | // wat.tv code by Bertimus (http://www.born2buzz.com/)
|
---|
316 |
|
---|
317 | define("WAT_WIDTH", 430); // default width
|
---|
318 | define("WAT_HEIGHT", 385); // default height
|
---|
319 | define("WAT_REGEXP", "/\[wat ([[:print:]]+)\]/");
|
---|
320 | define("WAT_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.wat.tv/swf2/###URL###\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.wat.tv/swf2/###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowScriptAccess=\"always\" allowFullScreen=\"true\"></embed></object>");
|
---|
321 |
|
---|
322 | function wat_plugin_callback($match)
|
---|
323 | {
|
---|
324 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
325 | $output = WAT_TARGET;
|
---|
326 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
327 | if (count($tag_parts) > 2) {
|
---|
328 | if ($tag_parts[2] == 0) {
|
---|
329 | $output = str_replace("###WIDTH###", WAT_WIDTH, $output);
|
---|
330 | } else {
|
---|
331 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
332 | }
|
---|
333 | if ($tag_parts[3] == 0) {
|
---|
334 | $output = str_replace("###HEIGHT###", WAT_HEIGHT, $output);
|
---|
335 | } else {
|
---|
336 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
337 | }
|
---|
338 | } else {
|
---|
339 | $output = str_replace("###WIDTH###", WAT_WIDTH, $output);
|
---|
340 | $output = str_replace("###HEIGHT###", WAT_HEIGHT, $output);
|
---|
341 | }
|
---|
342 | return ($output);
|
---|
343 | }
|
---|
344 | function wat_plugin($content)
|
---|
345 | {
|
---|
346 | return (preg_replace_callback(WAT_REGEXP, 'wat_plugin_callback', $content));
|
---|
347 | }
|
---|
348 |
|
---|
349 | add_filter('the_content', 'wat_plugin');
|
---|
350 | add_filter('the_content_rss', 'wat_plugin');
|
---|
351 | add_filter('comment_text', 'wat_plugin');
|
---|
352 |
|
---|
353 | // Guba code
|
---|
354 |
|
---|
355 | define("GUBA_WIDTH", 375); // default width
|
---|
356 | define("GUBA_HEIGHT", 360); // default height
|
---|
357 | define("GUBA_REGEXP", "/\[guba ([[:print:]]+)\]/");
|
---|
358 | define("GUBA_TARGET", "<embed src=\"http://www.guba.com/f/root.swf?video_url=http://free.guba.com/uploaditem/###URL###/flash.flv&isEmbeddedPlayer=true\" quality=\"best\" bgcolor=\"#FFFFFF\" menu=\"true\" width=\"###WIDTH###\" height=\"###HEIGHT###\" name=\"root\" id=\"root\" align=\"middle\" scaleMode=\"noScale\" allowScriptAccess=\"always\" allowFullScreen=\"true\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>");
|
---|
359 |
|
---|
360 | function guba_plugin_callback($match)
|
---|
361 | {
|
---|
362 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
363 | $output = GUBA_TARGET;
|
---|
364 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
365 | if (count($tag_parts) > 2) {
|
---|
366 | if ($tag_parts[2] == 0) {
|
---|
367 | $output = str_replace("###WIDTH###", GUBA_WIDTH, $output);
|
---|
368 | } else {
|
---|
369 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
370 | }
|
---|
371 | if ($tag_parts[3] == 0) {
|
---|
372 | $output = str_replace("###HEIGHT###", GUBA_HEIGHT, $output);
|
---|
373 | } else {
|
---|
374 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
375 | }
|
---|
376 | } else {
|
---|
377 | $output = str_replace("###WIDTH###", GUBA_WIDTH, $output);
|
---|
378 | $output = str_replace("###HEIGHT###", GUBA_HEIGHT, $output);
|
---|
379 | }
|
---|
380 | return ($output);
|
---|
381 | }
|
---|
382 | function guba_plugin($content)
|
---|
383 | {
|
---|
384 | return (preg_replace_callback(GUBA_REGEXP, 'guba_plugin_callback', $content));
|
---|
385 | }
|
---|
386 |
|
---|
387 | add_filter('the_content', 'guba_plugin');
|
---|
388 | add_filter('the_content_rss', 'guba_plugin');
|
---|
389 | add_filter('comment_text', 'guba_plugin');
|
---|
390 |
|
---|
391 |
|
---|
392 | // GoalVideoz code
|
---|
393 |
|
---|
394 | define("GOALVIDEOZ_WIDTH", 425); // default width
|
---|
395 | define("GOALVIDEOZ_HEIGHT", 350); // default height
|
---|
396 | define("GOALVIDEOZ_REGEXP", "/\[goalvideoz ([[:print:]]+)\]/");
|
---|
397 | define("GOALVIDEOZ_TARGET", "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"###WIDTH###\" height=\"###HEIGHT###\" id=\"vpod2\ align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"http://www.goalvideoz.com/vpod2.swf?id=###URL###\" /><param name=\"quality\" value=\"high\" /><embed src=\"http://www.goalvideoz.com/vpod2.swf?id=###URL###\" quality=\"high\" width=\"###WIDTH###\" height=\"###HEIGHT###\" name=\"vpod\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>");
|
---|
398 |
|
---|
399 | function goalvideoz_plugin_callback($match)
|
---|
400 | {
|
---|
401 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
402 | $output = GOALVIDEOZ_TARGET;
|
---|
403 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
404 | if (count($tag_parts) > 2) {
|
---|
405 | if ($tag_parts[2] == 0) {
|
---|
406 | $output = str_replace("###WIDTH###", GOALVIDEOZ_WIDTH, $output);
|
---|
407 | } else {
|
---|
408 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
409 | }
|
---|
410 | if ($tag_parts[3] == 0) {
|
---|
411 | $output = str_replace("###HEIGHT###", GOALVIDEOZ_HEIGHT, $output);
|
---|
412 | } else {
|
---|
413 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
414 | }
|
---|
415 | } else {
|
---|
416 | $output = str_replace("###WIDTH###", GOALVIDEOZ_WIDTH, $output);
|
---|
417 | $output = str_replace("###HEIGHT###", GOALVIDEOZ_HEIGHT, $output);
|
---|
418 | }
|
---|
419 | return ($output);
|
---|
420 | }
|
---|
421 | function goalvideoz_plugin($content)
|
---|
422 | {
|
---|
423 | return (preg_replace_callback(GOALVIDEOZ_REGEXP, 'goalvideoz_plugin_callback', $content));
|
---|
424 | }
|
---|
425 |
|
---|
426 | add_filter('the_content', 'goalvideoz_plugin');
|
---|
427 | add_filter('the_content_rss', 'goalvideoz_plugin');
|
---|
428 | add_filter('comment_text', 'goalvideoz_plugin');
|
---|
429 |
|
---|
430 | // mojvideo.com Slovenska Video Skupnost code
|
---|
431 |
|
---|
432 | define("MOJVIDEO_WIDTH", 400); // default width
|
---|
433 | define("MOJVIDEO_HEIGHT", 320); // default height
|
---|
434 | define("MOJVIDEO_REGEXP", "/\[mojvideo ([[:print:]]+)\]/");
|
---|
435 | define("MOJVIDEO_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.mojvideo.com/v/###URL###\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.mojvideo.com/v/###URL###\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>");
|
---|
436 |
|
---|
437 | function mojvideo_plugin_callback($match)
|
---|
438 | {
|
---|
439 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
440 | $output = MOJVIDEO_TARGET;
|
---|
441 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
442 | if (count($tag_parts) > 2) {
|
---|
443 | if ($tag_parts[2] == 0) {
|
---|
444 | $output = str_replace("###WIDTH###", MOJVIDEO_WIDTH, $output);
|
---|
445 | } else {
|
---|
446 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
447 | }
|
---|
448 | if ($tag_parts[3] == 0) {
|
---|
449 | $output = str_replace("###HEIGHT###", MOJVIDEO_HEIGHT, $output);
|
---|
450 | } else {
|
---|
451 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
452 | }
|
---|
453 | } else {
|
---|
454 | $output = str_replace("###WIDTH###", MOJVIDEO_WIDTH, $output);
|
---|
455 | $output = str_replace("###HEIGHT###", MOJVIDEO_HEIGHT, $output);
|
---|
456 | }
|
---|
457 | return ($output);
|
---|
458 | }
|
---|
459 | function mojvideo_plugin($content)
|
---|
460 | {
|
---|
461 | return (preg_replace_callback(MOJVIDEO_REGEXP, 'mojvideo_plugin_callback', $content));
|
---|
462 | }
|
---|
463 |
|
---|
464 | add_filter('the_content', 'mojvideo_plugin');
|
---|
465 | add_filter('the_content_rss', 'mojvideo_plugin');
|
---|
466 | add_filter('comment_text', 'mojvideo_plugin');
|
---|
467 |
|
---|
468 |
|
---|
469 | // ClipSyndicate Code by Antonio SJ Musumeci
|
---|
470 |
|
---|
471 | define("CLIPSYN_WIDTH", 300); // default width
|
---|
472 | define("CLIPSYN_HEIGHT", 265); // default height
|
---|
473 | define("CLIPSYN_REGEXP", "/\[clipsyndicate ([[:print:]]+)\]/");
|
---|
474 | define("CLIPSYN_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://eplayer.clipsyndicate.com/cs_api/get_swf\"></param><param name=\"flashvars\" value=\"swfHome=eplayer.clipsyndicate.com&va_id=###URL###\"></param><embed src=\"http://eplayer.clipsyndicate.com/cs_api/get_swf\" flashvars=\"swfHome=eplayer.clipsyndicate.com&va_id=###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>");
|
---|
475 |
|
---|
476 | function clipsyn_plugin_callback($match)
|
---|
477 | {
|
---|
478 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
479 | $output = CLIPSYN_TARGET;
|
---|
480 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
481 | if (count($tag_parts) > 2) {
|
---|
482 | if ($tag_parts[2] == 0) {
|
---|
483 | $output = str_replace("###WIDTH###", CLIPSYN_WIDTH, $output);
|
---|
484 | } else {
|
---|
485 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
486 | }
|
---|
487 | if ($tag_parts[3] == 0) {
|
---|
488 | $output = str_replace("###HEIGHT###", CLIPSYN_HEIGHT, $output);
|
---|
489 | } else {
|
---|
490 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
491 | }
|
---|
492 | } else {
|
---|
493 | $output = str_replace("###WIDTH###", CLIPSYN_WIDTH, $output);
|
---|
494 | $output = str_replace("###HEIGHT###", CLIPSYN_HEIGHT, $output);
|
---|
495 | }
|
---|
496 | return ($output);
|
---|
497 | }
|
---|
498 | function clipsyn_plugin($content)
|
---|
499 | {
|
---|
500 | return (preg_replace_callback(CLIPSYN_REGEXP, 'clipsyn_plugin_callback', $content));
|
---|
501 | }
|
---|
502 |
|
---|
503 | add_filter('the_content', 'clipsyn_plugin');
|
---|
504 | add_filter('the_content_rss', 'clipsyn_plugin');
|
---|
505 | add_filter('comment_text', 'clipsyn_plugin');
|
---|
506 |
|
---|
507 |
|
---|
508 | // Youreporter Code by Giacomo
|
---|
509 |
|
---|
510 | define("YOUREPORTER_WIDTH", 450);
|
---|
511 | define("YOUREPORTER_HEIGHT", 340);
|
---|
512 | define("YOUREPORTER_REGEXP", "/\[youreporter ([[:print:]]+)\]/");
|
---|
513 | define("YOUREPORTER_TARGET", "<embed src=\"http://www.youreporter.it/player/flv.swf\" width=\"".YOUREPORTER_WIDTH."\" height=\"".YOUREPORTER_HEIGHT."\"allowscriptaccess=\"always\" allowfullscreen=\"true\" flashvars=\"config=http://www.youreporter.it/player/ext/config.xml.php?vkey=###URL###%26colors=youreporter%26size=normale\" menu=\"false\" />");
|
---|
514 |
|
---|
515 | function youreporter_plugin_callback($match) {
|
---|
516 | $output = YOUREPORTER_TARGET;
|
---|
517 | $output = str_replace("###URL###", $match[1], $output);
|
---|
518 | return ($output);
|
---|
519 | }
|
---|
520 |
|
---|
521 | function youreporter_plugin($content) {
|
---|
522 | return preg_replace_callback(YOUREPORTER_REGEXP,
|
---|
523 | 'youreporter_plugin_callback', $content);
|
---|
524 | }
|
---|
525 |
|
---|
526 | add_filter('the_content', 'youreporter_plugin');
|
---|
527 | add_filter('the_content_rss', 'youreporter_plugin');
|
---|
528 | add_filter('comment_text', 'youreporter_plugin');
|
---|
529 |
|
---|
530 | // Generic Flash Code by Francisco Monteagudo
|
---|
531 |
|
---|
532 | define("GENERIC_FLASH_WIDTH", 425);
|
---|
533 | define("GENERIC_FLASH_HEIGHT", 350);
|
---|
534 | define("GENERIC_FLASH_REGEXP", "/\[flash ([[:print:]]+)\]/");
|
---|
535 | define("GENERIC_FLASH_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"###URL###\" width=\"".GENERIC_FLASH_WIDTH."\" height=\"".GENERIC_FLASH_HEIGHT."\" wmode=\"transparent\"/></object>");
|
---|
536 |
|
---|
537 | function generic_flash_plugin_callback($match) {
|
---|
538 | $output = GENERIC_FLASH_TARGET;
|
---|
539 | $output = str_replace("###URL###", $match[1], $output);
|
---|
540 | return ($output);
|
---|
541 | }
|
---|
542 |
|
---|
543 | function generic_flash_plugin($content) {
|
---|
544 | return preg_replace_callback(GENERIC_FLASH_REGEXP, 'generic_flash_plugin_callback', $content);
|
---|
545 | }
|
---|
546 |
|
---|
547 | add_filter('the_content', 'generic_flash_plugin');
|
---|
548 | add_filter('the_content_rss', 'generic_flash_plugin');
|
---|
549 | add_filter('comment_text', 'generic_flash_plugin');
|
---|
550 |
|
---|
551 |
|
---|
552 | // Funny or Die
|
---|
553 |
|
---|
554 | define("FUNNYORDIE_WIDTH", 464); // default width
|
---|
555 | define("FUNNYORDIE_HEIGHT", 388); // default height
|
---|
556 | define("FUNNYORDIE_REGEXP", "/\[funnyordie ([[:print:]]+)\]/");
|
---|
557 | define("FUNNYORDIE_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT####\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"><param name=\"movie\" value=\"http://www2.funnyordie.com/public/flash/fodplayer.swf?6045\" /><param name=\"flashvars\" value=\"key=###URL###\" /><param name=\"allowfullscreen\" value=\"true\" /><embed width=\"###WIDTH###\" height=\"###HEIGHT###\" flashvars=\"key=###URL###\" allowfullscreen=\"true\" quality=\"high\" src=\"http://www2.funnyordie.com/public/flash/fodplayer.swf?6045\" type=\"application/x-shockwave-flash\"></embed></object>");
|
---|
558 |
|
---|
559 | function funnyordie_plugin_callback($match)
|
---|
560 | {
|
---|
561 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
562 | $output = FUNNYORDIE_TARGET;
|
---|
563 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
564 | if (count($tag_parts) > 2) {
|
---|
565 | if ($tag_parts[2] == 0) {
|
---|
566 | $output = str_replace("###WIDTH###", FUNNYORDIE_WIDTH, $output);
|
---|
567 | } else {
|
---|
568 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
569 | }
|
---|
570 | if ($tag_parts[3] == 0) {
|
---|
571 | $output = str_replace("###HEIGHT###", FUNNYORDIE_HEIGHT, $output);
|
---|
572 | } else {
|
---|
573 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
574 | }
|
---|
575 | } else {
|
---|
576 | $output = str_replace("###WIDTH###", FUNNYORDIE_WIDTH, $output);
|
---|
577 | $output = str_replace("###HEIGHT###", FUNNYORDIE_HEIGHT, $output);
|
---|
578 | }
|
---|
579 | return ($output);
|
---|
580 | }
|
---|
581 | function funnyordie_plugin($content)
|
---|
582 | {
|
---|
583 | return (preg_replace_callback(FUNNYORDIE_REGEXP, 'funnyordie_plugin_callback', $content));
|
---|
584 | }
|
---|
585 |
|
---|
586 | add_filter('the_content', 'funnyordie_plugin');
|
---|
587 | add_filter('the_content_rss', 'funnyordie_plugin');
|
---|
588 | add_filter('comment_text', 'funnyordie_plugin');
|
---|
589 |
|
---|
590 |
|
---|
591 | // Trilulilu
|
---|
592 |
|
---|
593 | define("TRILULILU_WIDTH", 448); // default width
|
---|
594 | define("TRILULILU_HEIGHT", 386); // default height
|
---|
595 | define("TRILULILU_REGEXP", "/\[trilulilu ([[:print:]]+)\]/");
|
---|
596 | define("TRILULILU_TARGET", "<script type=\"text/javascript\" language=\"javascript\" src=\"http://www.trilulilu.ro/embed-video/keskifa/###URL###\"></script><script type=\"text/javascript\" language=\"javascript\">show_###URL###(###WIDTH###, ###HEIGHT###);</script>");
|
---|
597 |
|
---|
598 | function trilulilu_plugin_callback($match)
|
---|
599 | {
|
---|
600 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
601 | $output = TRILULILU_TARGET;
|
---|
602 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
603 | if (count($tag_parts) > 2) {
|
---|
604 | if ($tag_parts[2] == 0) {
|
---|
605 | $output = str_replace("###WIDTH###", TRILULILU_WIDTH, $output);
|
---|
606 | } else {
|
---|
607 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
608 | }
|
---|
609 | if ($tag_parts[3] == 0) {
|
---|
610 | $output = str_replace("###HEIGHT###", TRILULILU_HEIGHT, $output);
|
---|
611 | } else {
|
---|
612 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
613 | }
|
---|
614 | } else {
|
---|
615 | $output = str_replace("###WIDTH###", TRILULILU_WIDTH, $output);
|
---|
616 | $output = str_replace("###HEIGHT###", TRILULILU_HEIGHT, $output);
|
---|
617 | }
|
---|
618 | return ($output);
|
---|
619 | }
|
---|
620 | function trilulilu_plugin($content)
|
---|
621 | {
|
---|
622 | return (preg_replace_callback(TRILULILU_REGEXP, 'trilulilu_plugin_callback', $content));
|
---|
623 | }
|
---|
624 |
|
---|
625 | add_filter('the_content', 'trilulilu_plugin');
|
---|
626 | add_filter('the_content_rss', 'trilulilu_plugin');
|
---|
627 | add_filter('comment_text', 'trilulilu_plugin');
|
---|
628 |
|
---|
629 |
|
---|
630 | // d1g.com
|
---|
631 |
|
---|
632 | define("D1G_WIDTH", 400); // default width
|
---|
633 | define("D1G_HEIGHT", 300); // default height
|
---|
634 | define("D1G_REGEXP", "/\[d1g ([[:print:]]+)\]/");
|
---|
635 | define("D1G_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param value=\"#000000\" name=\"bgcolor\"><param name=\"movie\" value=\"http://www.d1g.com/swf/embedded_video_player.swf?id=2378&usefullscreen=false&file=http://www.d1g.com/video/play_video/###URL###&autostart=false&overstretch=false&repeat=false&shuffle=false\"></param><embed src=\"http://www.d1g.com/swf/embedded_video_player.swf?id=2378&file=http://www.d1g.com/video/play_video/###URL###&usefullscreen=false&autostart=false&overstretch=false&repeat=false&shuffle=false\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" bgcolor=\"#000000\"></embed></object>");
|
---|
636 |
|
---|
637 | function d1g_plugin_callback($match)
|
---|
638 | {
|
---|
639 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
640 | $output = D1G_TARGET;
|
---|
641 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
642 | if (count($tag_parts) > 2) {
|
---|
643 | if ($tag_parts[2] == 0) {
|
---|
644 | $output = str_replace("###WIDTH###", D1G_WIDTH, $output);
|
---|
645 | } else {
|
---|
646 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
647 | }
|
---|
648 | if ($tag_parts[3] == 0) {
|
---|
649 | $output = str_replace("###HEIGHT###", D1G_HEIGHT, $output);
|
---|
650 | } else {
|
---|
651 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
652 | }
|
---|
653 | } else {
|
---|
654 | $output = str_replace("###WIDTH###", D1G_WIDTH, $output);
|
---|
655 | $output = str_replace("###HEIGHT###", D1G_HEIGHT, $output);
|
---|
656 | }
|
---|
657 | return ($output);
|
---|
658 | }
|
---|
659 | function d1g_plugin($content)
|
---|
660 | {
|
---|
661 | return (preg_replace_callback(D1G_REGEXP, 'd1g_plugin_callback', $content));
|
---|
662 | }
|
---|
663 |
|
---|
664 | add_filter('the_content', 'd1g_plugin');
|
---|
665 | add_filter('the_content_rss', 'd1g_plugin');
|
---|
666 | add_filter('comment_text', 'd1g_plugin');
|
---|
667 |
|
---|
668 |
|
---|
669 | // ReelzChannel
|
---|
670 |
|
---|
671 | define("REELZCHANNEL_WIDTH", 480); // default width
|
---|
672 | define("REELZCHANNEL_HEIGHT", 300); // default height
|
---|
673 | define("REELZCHANNEL_REGEXP", "/\[reelzchannel ([[:print:]]+)\]/");
|
---|
674 | define("REELZCHANNEL_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://cache.reelzchannel.com/assets/flash/syndicatedPlayer.swf\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"allowScriptAccess\" value=\"always\"/><param name=\"flashvars\" value=\"clipid=###URL###\"><embed src=\"http://cache.reelzchannel.com/assets/flash/syndicatedPlayer.swf\" AllowScriptAccess=\"always\" width=\"###WIDTH###\" height=\"###HEIGHT###\" type=\"application/x-shockwave-flash\" mode=\"transparent\" flashvars=\"clipid=###URL###\"/></object>");
|
---|
675 |
|
---|
676 | function reelzchannel_plugin_callback($match)
|
---|
677 | {
|
---|
678 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
679 | $output = REELZCHANNEL_TARGET;
|
---|
680 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
681 | if (count($tag_parts) > 2) {
|
---|
682 | if ($tag_parts[2] == 0) {
|
---|
683 | $output = str_replace("###WIDTH###", REELZCHANNEL_WIDTH, $output);
|
---|
684 | } else {
|
---|
685 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
686 | }
|
---|
687 | if ($tag_parts[3] == 0) {
|
---|
688 | $output = str_replace("###HEIGHT###", REELZCHANNEL_HEIGHT, $output);
|
---|
689 | } else {
|
---|
690 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
691 | }
|
---|
692 | } else {
|
---|
693 | $output = str_replace("###WIDTH###", REELZCHANNEL_WIDTH, $output);
|
---|
694 | $output = str_replace("###HEIGHT###", REELZCHANNEL_HEIGHT, $output);
|
---|
695 | }
|
---|
696 | return ($output);
|
---|
697 | }
|
---|
698 | function reelzchannel_plugin($content)
|
---|
699 | {
|
---|
700 | return (preg_replace_callback(REELZCHANNEL_REGEXP, 'reelzchannel_plugin_callback', $content));
|
---|
701 | }
|
---|
702 |
|
---|
703 | add_filter('the_content', 'reelzchannel_plugin');
|
---|
704 | add_filter('the_content_rss', 'reelzchannel_plugin');
|
---|
705 | add_filter('comment_text', 'reelzchannel_plugin');
|
---|
706 |
|
---|
707 |
|
---|
708 | // MEGAVIDEO
|
---|
709 |
|
---|
710 | define("MEGAVIDEO_WIDTH", 432); // default width
|
---|
711 | define("MEGAVIDEO_HEIGHT", 351); // default height
|
---|
712 | define("MEGAVIDEO_REGEXP", "/\[megavideo ([[:print:]]+)\]/");
|
---|
713 | define("MEGAVIDEO_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.megavideo.com/v/###URL###.3920544471.0\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.megavideo.com/v/###URL###.3920544471.0\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>");
|
---|
714 |
|
---|
715 | function megavideo_plugin_callback($match)
|
---|
716 | {
|
---|
717 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
718 | $output = MEGAVIDEO_TARGET;
|
---|
719 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
720 | if (count($tag_parts) > 2) {
|
---|
721 | if ($tag_parts[2] == 0) {
|
---|
722 | $output = str_replace("###WIDTH###", MEGAVIDEO_WIDTH, $output);
|
---|
723 | } else {
|
---|
724 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
725 | }
|
---|
726 | if ($tag_parts[3] == 0) {
|
---|
727 | $output = str_replace("###HEIGHT###", MEGAVIDEO_HEIGHT, $output);
|
---|
728 | } else {
|
---|
729 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
730 | }
|
---|
731 | } else {
|
---|
732 | $output = str_replace("###WIDTH###", MEGAVIDEO_WIDTH, $output);
|
---|
733 | $output = str_replace("###HEIGHT###", MEGAVIDEO_HEIGHT, $output);
|
---|
734 | }
|
---|
735 | return ($output);
|
---|
736 | }
|
---|
737 | function megavideo_plugin($content)
|
---|
738 | {
|
---|
739 | return (preg_replace_callback(MEGAVIDEO_REGEXP, 'megavideo_plugin_callback', $content));
|
---|
740 | }
|
---|
741 |
|
---|
742 | add_filter('the_content', 'megavideo_plugin');
|
---|
743 | add_filter('the_content_rss', 'megavideo_plugin');
|
---|
744 | add_filter('comment_text', 'megavideo_plugin');
|
---|
745 |
|
---|
746 | // MSN Video (soapbox)
|
---|
747 |
|
---|
748 | define("MSN_WIDTH", 432); // default width
|
---|
749 | define("MSN_HEIGHT", 364); // default height
|
---|
750 | define("MSN_REGEXP", "/\[msn ([[:print:]]+)\]/");
|
---|
751 | define("MSN_TARGET", "<embed src=\"http://images.video.msn.com/flash/soapbox1_1.swf\" quality=\"high\" width=\"###WIDTH###\" height=\"###HEIGHT###\" base=\"http://images.video.msn.com\" type=\"application/x-shockwave-flash\" allowFullScreen=\"true\" allowScriptAccess=\"always\" pluginspage=\"http://macromedia.com/go/getflashplayer\" flashvars=\"c=v&v=###URL###\"></embed>");
|
---|
752 |
|
---|
753 | function msn_plugin_callback($match)
|
---|
754 | {
|
---|
755 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
756 | $output = MSN_TARGET;
|
---|
757 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
758 | if (count($tag_parts) > 2) {
|
---|
759 | if ($tag_parts[2] == 0) {
|
---|
760 | $output = str_replace("###WIDTH###", MSN_WIDTH, $output);
|
---|
761 | } else {
|
---|
762 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
763 | }
|
---|
764 | if ($tag_parts[3] == 0) {
|
---|
765 | $output = str_replace("###HEIGHT###", MSN_HEIGHT, $output);
|
---|
766 | } else {
|
---|
767 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
768 | }
|
---|
769 | } else {
|
---|
770 | $output = str_replace("###WIDTH###", MSN_WIDTH, $output);
|
---|
771 | $output = str_replace("###HEIGHT###", MSN_HEIGHT, $output);
|
---|
772 | }
|
---|
773 | return ($output);
|
---|
774 | }
|
---|
775 | function msn_plugin($content)
|
---|
776 | {
|
---|
777 | return (preg_replace_callback(MSN_REGEXP, 'msn_plugin_callback', $content));
|
---|
778 | }
|
---|
779 |
|
---|
780 | add_filter('the_content', 'msn_plugin');
|
---|
781 | add_filter('the_content_rss', 'msn_plugin');
|
---|
782 | add_filter('comment_text', 'msn_plugin');
|
---|
783 |
|
---|
784 |
|
---|
785 | // Youtube Playlist Code
|
---|
786 |
|
---|
787 | define("YTPLAYLIST_WIDTH", 470); // default width
|
---|
788 | define("YTPLAYLIST_HEIGHT", 406); // default height
|
---|
789 | define("YTPLAYLIST_REGEXP", "/\[youtubeplaylist ([[:print:]]+)\]/");
|
---|
790 | define("YTPLAYLIST_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://de.youtube.com/p/###URL###\" /><param name=\"wmode\" value=\"transparent\" /><embed src=\"http://de.youtube.com/p/###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" wmode=\"transparent\"></embed></object>
|
---|
791 | ");
|
---|
792 |
|
---|
793 | function ytplaylist_plugin_callback($match)
|
---|
794 | {
|
---|
795 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
796 | $output = YTPLAYLIST_TARGET;
|
---|
797 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
798 | if (count($tag_parts) > 2) {
|
---|
799 | if ($tag_parts[2] == 0) {
|
---|
800 | $output = str_replace("###WIDTH###", YTPLAYLIST_WIDTH, $output);
|
---|
801 | } else {
|
---|
802 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
803 | }
|
---|
804 | if ($tag_parts[3] == 0) {
|
---|
805 | $output = str_replace("###HEIGHT###", YTPLAYLIST_HEIGHT, $output);
|
---|
806 | } else {
|
---|
807 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
808 | }
|
---|
809 | } else {
|
---|
810 | $output = str_replace("###WIDTH###", YTPLAYLIST_WIDTH, $output);
|
---|
811 | $output = str_replace("###HEIGHT###", YTPLAYLIST_HEIGHT, $output);
|
---|
812 | }
|
---|
813 | return ($output);
|
---|
814 | }
|
---|
815 | function ytplaylist_plugin($content)
|
---|
816 | {
|
---|
817 | return (preg_replace_callback(YTPLAYLIST_REGEXP, 'ytplaylist_plugin_callback', $content));
|
---|
818 | }
|
---|
819 |
|
---|
820 | add_filter('the_content', 'ytplaylist_plugin',1);
|
---|
821 | add_filter('the_content_rss', 'ytplaylist_plugin',1);
|
---|
822 | add_filter('comment_text', 'ytplaylist_plugin');
|
---|
823 |
|
---|
824 | // mncast.com
|
---|
825 |
|
---|
826 | define("MNCAST_WIDTH", 520); // default width
|
---|
827 | define("MNCAST_HEIGHT", 449); // default height
|
---|
828 | define("MNCAST_REGEXP", "/\[mncast ([[:print:]]+)\]/");
|
---|
829 | define("MNCAST_TARGET", "<embed pluginspage=\"http://www.macromedia.com/go/getflashplayer\" src=\"http://dory.mncast.com/mncHMovie.swf?movieID=###URL###&skinNum=1\" width=\"###WIDTH###\" height=\"###HEIGHT###\" type=\"application/x-shockwave-flash\"></embed>");
|
---|
830 |
|
---|
831 | function mncast_plugin_callback($match)
|
---|
832 | {
|
---|
833 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
834 | $output = MNCAST_TARGET;
|
---|
835 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
836 | if (count($tag_parts) > 2) {
|
---|
837 | if ($tag_parts[2] == 0) {
|
---|
838 | $output = str_replace("###WIDTH###", MNCAST_WIDTH, $output);
|
---|
839 | } else {
|
---|
840 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
841 | }
|
---|
842 | if ($tag_parts[3] == 0) {
|
---|
843 | $output = str_replace("###HEIGHT###", MNCAST_HEIGHT, $output);
|
---|
844 | } else {
|
---|
845 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
846 | }
|
---|
847 | } else {
|
---|
848 | $output = str_replace("###WIDTH###", MNCAST_WIDTH, $output);
|
---|
849 | $output = str_replace("###HEIGHT###", MNCAST_HEIGHT, $output);
|
---|
850 | }
|
---|
851 | return ($output);
|
---|
852 | }
|
---|
853 | function mncast_plugin($content)
|
---|
854 | {
|
---|
855 | return (preg_replace_callback(MNCAST_REGEXP, 'mncast_plugin_callback', $content));
|
---|
856 | }
|
---|
857 |
|
---|
858 | add_filter('the_content', 'mncast_plugin');
|
---|
859 | add_filter('the_content_rss', 'mncast_plugin');
|
---|
860 | add_filter('comment_text', 'mncast_plugin');
|
---|
861 |
|
---|
862 | // Hamburg1
|
---|
863 |
|
---|
864 | define("HH_WIDTH", 400); // default width
|
---|
865 | define("HH_HEIGHT", 368); // default height
|
---|
866 | define("HH_REGEXP", "/\[hamburg1 ([[:print:]]+)\]/");
|
---|
867 | define("HH_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://www.hamburg1video.de/p/de/###URL###.html\" width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.hamburg1video.de/p/de/###URL###.html\" /><param name=\"wmode\" value=\"transparent\" /><embed src=\"http://www.hamburg1video.de/p/de/###URL###.html\" width=\"###WIDTH###\" height=\"###HEIGHT###\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed></object>");
|
---|
868 |
|
---|
869 | function hh_plugin_callback($match)
|
---|
870 | {
|
---|
871 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
872 | $output = HH_TARGET;
|
---|
873 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
874 | if (count($tag_parts) > 2) {
|
---|
875 | if ($tag_parts[2] == 0) {
|
---|
876 | $output = str_replace("###WIDTH###", HH_WIDTH, $output);
|
---|
877 | } else {
|
---|
878 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
879 | }
|
---|
880 | if ($tag_parts[3] == 0) {
|
---|
881 | $output = str_replace("###HEIGHT###", HH_HEIGHT, $output);
|
---|
882 | } else {
|
---|
883 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
884 | }
|
---|
885 | } else {
|
---|
886 | $output = str_replace("###WIDTH###", HH_WIDTH, $output);
|
---|
887 | $output = str_replace("###HEIGHT###", HH_HEIGHT, $output);
|
---|
888 | }
|
---|
889 | return ($output);
|
---|
890 | }
|
---|
891 | function hh_plugin($content)
|
---|
892 | {
|
---|
893 | return (preg_replace_callback(HH_REGEXP, 'hh_plugin_callback', $content));
|
---|
894 | }
|
---|
895 |
|
---|
896 | add_filter('the_content', 'hh_plugin');
|
---|
897 | add_filter('the_content_rss', 'hh_plugin');
|
---|
898 | add_filter('comment_text', 'hh_plugin');
|
---|
899 |
|
---|
900 |
|
---|
901 |
|
---|
902 | // Collegehumor Code
|
---|
903 |
|
---|
904 | define("COLLEGEHUMOR_WIDTH", 480); // default width
|
---|
905 | define("COLLEGEHUMOR_HEIGHT", 360); // default height
|
---|
906 | define("COLLEGEHUMOR_REGEXP", "/\[collegehumor ([[:print:]]+)\]/");
|
---|
907 | define("COLLEGEHUMOR_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=###URL###&fullscreen=1\" width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"movie\" quality=\"best\" value=\"http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=###URL###&fullscreen=1\" /></object>");
|
---|
908 |
|
---|
909 | function collegehumor_plugin_callback($match)
|
---|
910 | {
|
---|
911 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
912 | $output = COLLEGEHUMOR_TARGET;
|
---|
913 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
914 | if (count($tag_parts) > 2) {
|
---|
915 | if ($tag_parts[2] == 0) {
|
---|
916 | $output = str_replace("###WIDTH###", COLLEGEHUMOR_WIDTH, $output);
|
---|
917 | } else {
|
---|
918 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
919 | }
|
---|
920 | if ($tag_parts[3] == 0) {
|
---|
921 | $output = str_replace("###HEIGHT###", COLLEGEHUMOR_HEIGHT, $output);
|
---|
922 | } else {
|
---|
923 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
924 | }
|
---|
925 | } else {
|
---|
926 | $output = str_replace("###WIDTH###", COLLEGEHUMOR_WIDTH, $output);
|
---|
927 | $output = str_replace("###HEIGHT###", COLLEGEHUMOR_HEIGHT, $output);
|
---|
928 | }
|
---|
929 | return ($output);
|
---|
930 | }
|
---|
931 | function collegehumor_plugin($content)
|
---|
932 | {
|
---|
933 | return (preg_replace_callback(COLLEGEHUMOR_REGEXP, 'collegehumor_plugin_callback', $content));
|
---|
934 | }
|
---|
935 |
|
---|
936 | add_filter('the_content', 'collegehumor_plugin');
|
---|
937 | add_filter('the_content_rss', 'collegehumor_plugin');
|
---|
938 | add_filter('comment_text', 'collegehumor_plugin');
|
---|
939 |
|
---|
940 |
|
---|
941 | // Jumpcut Code
|
---|
942 |
|
---|
943 | define("JUMPCUT_WIDTH", 408); // default width
|
---|
944 | define("JUMPCUT_HEIGHT", 324); // default height
|
---|
945 | define("JUMPCUT_REGEXP", "/\[jumpcut ([[:print:]]+)\]/");
|
---|
946 | define("JUMPCUT_TARGET", "<embed type=\"application/x-shockwave-flash\" src=\"http://jumpcut.com/media/flash/jump.swf?id=###URL###&asset_type=movie&asset_id=###URL###&eb=1\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed>");
|
---|
947 |
|
---|
948 | function jumpcut_plugin_callback($match)
|
---|
949 | {
|
---|
950 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
951 | $output = JUMPCUT_TARGET;
|
---|
952 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
953 | if (count($tag_parts) > 2) {
|
---|
954 | if ($tag_parts[2] == 0) {
|
---|
955 | $output = str_replace("###WIDTH###", JUMPCUT_WIDTH, $output);
|
---|
956 | } else {
|
---|
957 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
958 | }
|
---|
959 | if ($tag_parts[3] == 0) {
|
---|
960 | $output = str_replace("###HEIGHT###", JUMPCUT_HEIGHT, $output);
|
---|
961 | } else {
|
---|
962 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
963 | }
|
---|
964 | } else {
|
---|
965 | $output = str_replace("###WIDTH###", JUMPCUT_WIDTH, $output);
|
---|
966 | $output = str_replace("###HEIGHT###", JUMPCUT_HEIGHT, $output);
|
---|
967 | }
|
---|
968 | return ($output);
|
---|
969 | }
|
---|
970 | function jumpcut_plugin($content)
|
---|
971 | {
|
---|
972 | return (preg_replace_callback(JUMPCUT_REGEXP, 'jumpcut_plugin_callback', $content));
|
---|
973 | }
|
---|
974 |
|
---|
975 | add_filter('the_content', 'jumpcut_plugin');
|
---|
976 | add_filter('the_content_rss', 'jumpcut_plugin');
|
---|
977 | add_filter('comment_text', 'jumpcut_plugin');
|
---|
978 |
|
---|
979 |
|
---|
980 | // ComedyCentral
|
---|
981 |
|
---|
982 | define("CC_WIDTH", 332);
|
---|
983 | define("CC_HEIGHT", 316);
|
---|
984 | define("CC_REGEXP", "/\[comedycentral ([[:print:]]+)\]/");
|
---|
985 | define("CC_TARGET", "<embed src=\"http://www.comedycentral.com/sitewide/video_player/view/default/swf.jhtml\" flashvars=\"videoId=###URL###\" quality=\"high\" name=\"comedy_central_player\" allowscriptaccess=\"always\" allownetworking=\"external\" type=\"application/x-shockwave-flash\" height=\"".CC_HEIGHT."\" width=\"".CC_WIDTH."\"></embed>");
|
---|
986 |
|
---|
987 | function cc_plugin_callback($match) {
|
---|
988 | $output = CC_TARGET;
|
---|
989 | $output = str_replace("###URL###", $match[1], $output);
|
---|
990 | return ($output);
|
---|
991 | }
|
---|
992 |
|
---|
993 | function cc_plugin($content) {
|
---|
994 | return preg_replace_callback(CC_REGEXP, 'cc_plugin_callback', $content);
|
---|
995 | }
|
---|
996 |
|
---|
997 | add_filter('the_content', 'cc_plugin');
|
---|
998 | add_filter('the_content_rss', 'cc_plugin');
|
---|
999 | add_filter('comment_text', 'cc_plugin');
|
---|
1000 |
|
---|
1001 | // Reason.tv
|
---|
1002 |
|
---|
1003 | define("REASON_REGEXP", "/\[reason ([[:print:]]+)\]/");
|
---|
1004 | define("REASON_TARGET", "<script type=\"text/javascript\" src=\"http://www.reason.tv/embed/video.php?id=###ID###\"></script>");
|
---|
1005 |
|
---|
1006 | function reason_plugin_callback($match) {
|
---|
1007 | $output = REASON_TARGET;
|
---|
1008 | $output = str_replace("###ID###", $match[1], $output);
|
---|
1009 | return ($output);
|
---|
1010 | }
|
---|
1011 |
|
---|
1012 | function reason_plugin($content) {
|
---|
1013 | return preg_replace_callback(REASON_REGEXP, 'reason_plugin_callback', $content);
|
---|
1014 | }
|
---|
1015 |
|
---|
1016 | add_filter('the_content', 'reason_plugin');
|
---|
1017 | add_filter('the_content_rss', 'reason_plugin');
|
---|
1018 | add_filter('comment_text', 'reason_plugin');
|
---|
1019 |
|
---|
1020 | // SlideShare Slides
|
---|
1021 |
|
---|
1022 | define("SS_WIDTH", 425);
|
---|
1023 | define("SS_HEIGHT", 348);
|
---|
1024 | define("SS_REGEXP", "/\[slideshare ([[:print:]]+)\]/");
|
---|
1025 |
|
---|
1026 | define("SS_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://static.slideshare.net/swf/ssplayer2.swf?doc=###ID###\" width=\"".SS_WIDTH."\" height=\"".SS_HEIGHT."\"><param name=\"movie\" value=\"http://static.slideshare.net/swf/ssplayer2.swf?doc=###ID###\" ></object>");
|
---|
1027 |
|
---|
1028 | function ss_plugin_callback($match){
|
---|
1029 | $output = SS_TARGET;
|
---|
1030 | $output = str_replace("###ID###", $match[1], $output);
|
---|
1031 | return ($output);
|
---|
1032 | }
|
---|
1033 |
|
---|
1034 | function ss_plugin($content){
|
---|
1035 | return (preg_replace_callback(SS_REGEXP, 'ss_plugin_callback', $content));
|
---|
1036 | }
|
---|
1037 |
|
---|
1038 | add_filter('the_content', 'ss_plugin');
|
---|
1039 | add_filter('the_content_rss', 'ss_plugin');
|
---|
1040 | add_filter('comment_text', 'ss_plugin');
|
---|
1041 |
|
---|
1042 |
|
---|
1043 | // Teachertube.com code
|
---|
1044 |
|
---|
1045 | define("TT_WIDTH", 425);
|
---|
1046 | define("TT_HEIGHT", 350);
|
---|
1047 | define("TT_REGEXP", "/\[teachertube ([[:print:]]+)\]/");
|
---|
1048 | define("TT_TARGET", "<embed src=\"http://www.teachertube.com/skin-p/flvplayer.swf\" allowfullscreen=\"true\" flashvars=\"&file=http://www.teachertube.com/flvideo/###tt_mu###.flv&image=http://www.teachertube.com/thumb/###tt_mu###.jpg&location=http://www.teachertube.com/skin-p/flvplayer.swf&logo=http://www.teachertube.com/images/greylogo.swf&frontcolor=0xffffff&backcolor=0x000000&lightcolor=0xFF0000&autostart=false&volume=80&overstretch=fit\" quality=\"high\" bgcolor=\"#000000\" wmode=\"transparent\" width=\"".TT_WIDTH."\" height=\"".TT_HEIGHT."\" loop=\"false\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> </embed>");
|
---|
1049 |
|
---|
1050 | function tt_plugin_callback_mu($match)
|
---|
1051 | {
|
---|
1052 | // $match[1] = str_replace("&w=425", "", $match[1]);
|
---|
1053 | $output = TT_TARGET;
|
---|
1054 | $output = str_replace("###tt_mu###", $match[1], $output);
|
---|
1055 | $output = str_replace('"','',$output);
|
---|
1056 | return ($output);
|
---|
1057 | }
|
---|
1058 |
|
---|
1059 | function tt_plugin_mu($content)
|
---|
1060 | {
|
---|
1061 | return (preg_replace_callback(TT_REGEXP, 'tt_plugin_callback_mu', $content));
|
---|
1062 | }
|
---|
1063 |
|
---|
1064 | add_filter('the_content', 'tt_plugin_mu');
|
---|
1065 | add_filter('the_content_rss', 'tt_plugin_mu');
|
---|
1066 | add_filter('comment_text', 'tt_plugin_mu');
|
---|
1067 |
|
---|
1068 |
|
---|
1069 | // vsocial Code
|
---|
1070 |
|
---|
1071 | define("VSOCIAL_WIDTH", 400);
|
---|
1072 | define("VSOCIAL_HEIGHT", 410);
|
---|
1073 | define("VSOCIAL_REGEXP", "/\[vsocial ([[:print:]]+)\]/");
|
---|
1074 | define("VSOCIAL_TARGET", "<object width=\"".VSOCIAL_WIDTH."\" height=\"".VSOCIAL_HEIGHT."\"><embed src=\"http://static.vsocial.com/flash/ups.swf?d=###URL###&a=0\" type=\"application/x-shockwave-flash\" width=\"".VSOCIAL_WIDTH."\" height=\"".VSOCIAL_HEIGHT."\"></embed></object>");
|
---|
1075 |
|
---|
1076 | function vsocial_plugin_callback($match) {
|
---|
1077 | $output = VSOCIAL_TARGET;
|
---|
1078 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1079 | return ($output);
|
---|
1080 | }
|
---|
1081 |
|
---|
1082 | function vsocial_plugin($content) {
|
---|
1083 | return preg_replace_callback(VSOCIAL_REGEXP, 'vsocial_plugin_callback', $content);
|
---|
1084 | }
|
---|
1085 |
|
---|
1086 | add_filter('the_content', 'vsocial_plugin');
|
---|
1087 | add_filter('the_content_rss', 'vsocial_plugin');
|
---|
1088 | add_filter('comment_text', 'vsocial_plugin');
|
---|
1089 |
|
---|
1090 |
|
---|
1091 | // last.fm Code
|
---|
1092 |
|
---|
1093 | define("LASTFM_WIDTH", 340);
|
---|
1094 | define("LASTFM_HEIGHT", 289);
|
---|
1095 | define("LASTFM_REGEXP", "/\[lastfm ([[:print:]]+)\]/");
|
---|
1096 | define("LASTFM_TARGET", "<object width=\"".LASTFM_WIDTH."\" height=\"".LASTFM_HEIGHT."\"><embed src=\"http://cdn.last.fm/videoplayer/33/VideoPlayer.swf?=###URL###\" type=\"application/x-shockwave-flash\" width=\"".LASTFM_WIDTH."\" height=\"".LASTFM_HEIGHT."\" wmode=\"transparent\"></embed></object>");
|
---|
1097 |
|
---|
1098 | function lastfm_plugin_callback($match) {
|
---|
1099 | $output = LASTFM_TARGET;
|
---|
1100 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1101 | return ($output);
|
---|
1102 | }
|
---|
1103 |
|
---|
1104 | function lastfm_plugin($content) {
|
---|
1105 | return preg_replace_callback(LASTFM_REGEXP, 'lastfm_plugin_callback', $content);
|
---|
1106 | }
|
---|
1107 |
|
---|
1108 | add_filter('the_content', 'lastfm_plugin');
|
---|
1109 | add_filter('the_content_rss', 'lastfm_plugin');
|
---|
1110 | add_filter('comment_text', 'lastfm_plugin');
|
---|
1111 |
|
---|
1112 | // Sumo.tv Code
|
---|
1113 |
|
---|
1114 |
|
---|
1115 | define("SUMOTV_WIDTH", 400);
|
---|
1116 | define("SUMOTV_HEIGHT", 329);
|
---|
1117 | define("SUMOTV_REGEXP", "/\[sumotv ([[:print:]]+)\]/");
|
---|
1118 | define("SUMOTV_TARGET", "<object width=\"".SUMOTV_WIDTH."\" height=\"".SUMTOV_HEIGHT."\"><embed src=\"http://www.sumo.tv/embed.swf?file=###URL###.flv&autostart=false\" type=\"application/x-shockwave-flash\" width=\"".SUMOTV_WIDTH."\" height=\"".SUMOTV_HEIGHT."\" wmode=\"transparent\"></embed></object>");
|
---|
1119 |
|
---|
1120 | function sumotv_plugin_callback($match) {
|
---|
1121 | $output = SUMOTV_TARGET;
|
---|
1122 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1123 | return ($output);
|
---|
1124 | }
|
---|
1125 |
|
---|
1126 | function sumotv_plugin($content) {
|
---|
1127 | return preg_replace_callback(SUMOTV_REGEXP, 'sumotv_plugin_callback', $content);
|
---|
1128 | }
|
---|
1129 |
|
---|
1130 | add_filter('the_content', 'sumotv_plugin');
|
---|
1131 | add_filter('the_content_rss', 'sumotv_plugin');
|
---|
1132 | add_filter('comment_text', 'sumotv_plugin');
|
---|
1133 |
|
---|
1134 |
|
---|
1135 |
|
---|
1136 | // 123video.nl code
|
---|
1137 |
|
---|
1138 | define("VIDEONL_WIDTH", 420);
|
---|
1139 | define("VIDEONL_HEIGHT", 339);
|
---|
1140 | define("VIDEONL_REGEXP", "/\[123videonl ([[:print:]]+)\]/");
|
---|
1141 | define("VIDEONL_TARGET", "<object width=\"".VIDEONL_WIDTH."\" height=\"".VIDEONL_HEIGHT."\"><embed src=\"http://www.123video.nl/123video_share.swf?mediaSrc=###URL###\" type=\"application/x-shockwave-flash\" quality=\"high\" width=\"".VIDEONL_WIDTH."\" height=\"".VIDEONL_HEIGHT."\"></embed></object>");
|
---|
1142 |
|
---|
1143 | function videonl_plugin_callback($match)
|
---|
1144 | {
|
---|
1145 | $output = VIDEONL_TARGET;
|
---|
1146 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1147 | return ($output);
|
---|
1148 | }
|
---|
1149 |
|
---|
1150 | function videonl_plugin($content)
|
---|
1151 | {
|
---|
1152 | return (preg_replace_callback(VIDEONL_REGEXP, 'videonl_plugin_callback', $content));
|
---|
1153 | }
|
---|
1154 |
|
---|
1155 | add_filter('the_content', 'videonl_plugin');
|
---|
1156 | add_filter('the_content_rss', 'videonl_plugin');
|
---|
1157 | add_filter('comment_text', 'videonl_plugin');
|
---|
1158 |
|
---|
1159 | // Brightcove code
|
---|
1160 |
|
---|
1161 | define("BRIGHTCOVE_WIDTH", 510);
|
---|
1162 | define("BRIGHTCOVE_HEIGHT", 550);
|
---|
1163 | define("BRIGHTCOVE_REGEXP", "/\[brightcove ([[:print:]]+)\]/");
|
---|
1164 | define("BRIGHTCOVE_TARGET", "<embed src=\"http://c.brightcove.com/services/viewer/federated_f8/416542555\" bgcolor=\"#FFFFFF\" flashVars=\"videoId=###URL###&playerId=416542555&viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&servicesURL=http://services.brightcove.com/services&cdnURL=http://admin.brightcove.com&domain=embed&autoStart=false&\" base=\"http://admin.brightcove.com\" name=\"flashObj\" width=\"".BRIGHTCOVE_WIDTH."\" height=\"".BRIGHTCOVE_HEIGHT."\" seamlesstabbing=\"false\" type=\"application/x-shockwave-flash\" swLiveConnect=\"true\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>");
|
---|
1165 |
|
---|
1166 |
|
---|
1167 | function brightcove_plugin_callback($match)
|
---|
1168 | {
|
---|
1169 | $output = BRIGHTCOVE_TARGET;
|
---|
1170 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1171 | return ($output);
|
---|
1172 | }
|
---|
1173 |
|
---|
1174 | function brightcove_plugin($content)
|
---|
1175 | {
|
---|
1176 | return (preg_replace_callback(BRIGHTCOVE_REGEXP, 'brightcove_plugin_callback', $content));
|
---|
1177 | }
|
---|
1178 |
|
---|
1179 | add_filter('the_content', 'brightcove_plugin');
|
---|
1180 | add_filter('the_content_rss', 'brightcove_plugin');
|
---|
1181 | add_filter('comment_text', 'brightcove_plugin');
|
---|
1182 |
|
---|
1183 |
|
---|
1184 | // Aniboom code
|
---|
1185 |
|
---|
1186 | define("ANIBOOM_WIDTH", 448);
|
---|
1187 | define("ANIBOOM_HEIGHT", 372);
|
---|
1188 | define("ANIBOOM_REGEXP", "/\[aniboom ([[:print:]]+)\]/");
|
---|
1189 | define("ANIBOOM_TARGET", "<object width=\"".ANIBOOM_WIDTH."\" height=\"".ANIBOOM_HEIGHT."\"><param name=\"movie\" value=\"window\"></param><embed src=\"http://api.aniboom.com/embedded.swf?videoar=###URL###\" type=\"application/x-shockwave-flash\" quality=\"high\" width=\"".ANIBOOM_WIDTH."\" height=\"".ANIBOOM_HEIGHT."\"></embed></object>");
|
---|
1190 |
|
---|
1191 | function aniboom_plugin_callback($match)
|
---|
1192 | {
|
---|
1193 | $output = ANIBOOM_TARGET;
|
---|
1194 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1195 | return ($output);
|
---|
1196 | }
|
---|
1197 |
|
---|
1198 | function aniboom_plugin($content)
|
---|
1199 | {
|
---|
1200 | return (preg_replace_callback(ANIBOOM_REGEXP, 'aniboom_plugin_callback', $content));
|
---|
1201 | }
|
---|
1202 |
|
---|
1203 | add_filter('the_content', 'aniboom_plugin');
|
---|
1204 | add_filter('the_rss', 'aniboom_plugin');
|
---|
1205 | add_filter('comment_text', 'aniboom_plugin');
|
---|
1206 |
|
---|
1207 |
|
---|
1208 | // Cellfish.com code
|
---|
1209 |
|
---|
1210 | define("CELLFISH_WIDTH", 420);
|
---|
1211 | define("CELLFISH_HEIGHT", 315);
|
---|
1212 | define("CELLFISH_REGEXP", "/\[cellfish ([[:print:]]+)\]/");
|
---|
1213 | define("CELLFISH_TARGET", "<object width=\"".CELLFISH_WIDTH."\" height=\"".CELLFISH_HEIGHT."\"><param name=\"vmode\" value=\"window\"></param><embed src=\"http://cellfish.com/static/swf/player8.swf?Id=###URL###\" type=\"application/x-shockwave-flash\" wmode=\"window\" width=\"".CELLFISH_WIDTH."\" height=\"".CELLFISH_HEIGHT."\"></embed></object>");
|
---|
1214 |
|
---|
1215 | function cellfish_plugin_callback($match)
|
---|
1216 | {
|
---|
1217 | $output = CELLFISH_TARGET;
|
---|
1218 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1219 | return ($output);
|
---|
1220 | }
|
---|
1221 |
|
---|
1222 | function cellfish_plugin($content)
|
---|
1223 | {
|
---|
1224 | return (preg_replace_callback(CELLFISH_REGEXP, 'cellfish_plugin_callback', $content));
|
---|
1225 | }
|
---|
1226 |
|
---|
1227 | add_filter('the_content', 'cellfish_plugin');
|
---|
1228 | add_filter('the_content_rss', 'cellfish_plugin');
|
---|
1229 | add_filter('comment_text', 'cellfish_plugin');
|
---|
1230 |
|
---|
1231 |
|
---|
1232 | // Tu.tv code
|
---|
1233 |
|
---|
1234 | define("TUTV_WIDTH", 425);
|
---|
1235 | define("TUTV_HEIGHT", 350);
|
---|
1236 | define("TUTV_REGEXP", "/\[tutv ([[:print:]]+)\]/");
|
---|
1237 | define("TUTV_TARGET", "<object width=\"".TUTV_WIDTH."\" height=\"".TUTV_HEIGHT."\"><param name=\"vmode\" value=\"transparent\"></param><embed src=\"http://www.tu.tv/tutvweb.swf?kpt=###URL###\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"".TUTV_WIDTH."\" height=\"".TUTV_HEIGHT."\"></embed></object>");
|
---|
1238 |
|
---|
1239 | function tutv_plugin_callback($match)
|
---|
1240 | {
|
---|
1241 | $output = TUTV_TARGET;
|
---|
1242 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1243 | return ($output);
|
---|
1244 | }
|
---|
1245 |
|
---|
1246 | function tutv_plugin($content)
|
---|
1247 | {
|
---|
1248 | return (preg_replace_callback(TUTV_REGEXP, 'tutv_plugin_callback', $content));
|
---|
1249 | }
|
---|
1250 |
|
---|
1251 | add_filter('the_content', 'tutv_plugin');
|
---|
1252 | add_filter('the_content_rss', 'tutv_plugin');
|
---|
1253 | add_filter('comment_text', 'tutv_plugin');
|
---|
1254 |
|
---|
1255 |
|
---|
1256 | // Yahoo! Video code
|
---|
1257 |
|
---|
1258 | define("YAHOO_WIDTH", 512);
|
---|
1259 | define("YAHOO_HEIGHT", 322);
|
---|
1260 | define("YAHOO_REGEXP", "/\[yahoo ([[:print:]]+)\]/");
|
---|
1261 | define("YAHOO_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.30\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"AllowScriptAccess\" VALUE=\"always\" /><param name=\"bgcolor\" value=\"#000000\" /><param name=\"flashVars\" value=\"id=###URL###&embed=1\" /><embed src=\"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.30\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowFullScreen=\"true\" AllowScriptAccess=\"always\" bgcolor=\"#000000\" flashVars=\"id=###URL###&embed=1\" ></embed></object>");
|
---|
1262 |
|
---|
1263 | function yahoo_plugin_callback($match)
|
---|
1264 | {
|
---|
1265 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
1266 | $output = YAHOO_TARGET;
|
---|
1267 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
1268 | if (count($tag_parts) > 2) {
|
---|
1269 | if ($tag_parts[2] == 0) {
|
---|
1270 | $output = str_replace("###WIDTH###", YAHOO_WIDTH, $output);
|
---|
1271 | } else {
|
---|
1272 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
1273 | }
|
---|
1274 | if ($tag_parts[3] == 0) {
|
---|
1275 | $output = str_replace("###HEIGHT###", YAHOO_HEIGHT, $output);
|
---|
1276 | } else {
|
---|
1277 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
1278 | }
|
---|
1279 | } else {
|
---|
1280 | $output = str_replace("###WIDTH###", YAHOO_WIDTH, $output);
|
---|
1281 | $output = str_replace("###HEIGHT###", YAHOO_HEIGHT, $output);
|
---|
1282 | }
|
---|
1283 | return ($output);
|
---|
1284 | }
|
---|
1285 |
|
---|
1286 | function yahoo_plugin($content)
|
---|
1287 | {
|
---|
1288 | return (preg_replace_callback(YAHOO_REGEXP, 'yahoo_plugin_callback', $content));
|
---|
1289 | }
|
---|
1290 |
|
---|
1291 | add_filter('the_content', 'yahoo_plugin');
|
---|
1292 | add_filter('the_content_rss', 'yahoo_plugin');
|
---|
1293 | add_filter('comment_text', 'yahoo_plugin');
|
---|
1294 |
|
---|
1295 |
|
---|
1296 | // MyspaceTV code
|
---|
1297 |
|
---|
1298 | define("MYSPACETV_WIDTH", 385);
|
---|
1299 | define("MYSPACETV_HEIGHT", 346);
|
---|
1300 | define("MYSPACETV_REGEXP", "/\[myspacetv ([[:print:]]+)\]/");
|
---|
1301 | define("MYSPACETV_TARGET", "<object width=\"".MYSPACETV_WIDTH."\" height=\"".MYSPACETV_HEIGHT."\"><param name=\"vmode\" value=\"transparent\"></param><embed src=\"http://lads.myspace.com/videos/vplayer.swf?m=###URL###&type=video\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"".MYSPACETV_WIDTH."\" height=\"".MYSPACETV_HEIGHT."\"></embed></object>");
|
---|
1302 |
|
---|
1303 | function myspacetv_plugin_callback($match)
|
---|
1304 | {
|
---|
1305 | $output = MYSPACETV_TARGET;
|
---|
1306 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1307 | return ($output);
|
---|
1308 | }
|
---|
1309 |
|
---|
1310 | function myspacetv_plugin($content)
|
---|
1311 | {
|
---|
1312 | return (preg_replace_callback(MYSPACETV_REGEXP, 'myspacetv_plugin_callback', $content));
|
---|
1313 | }
|
---|
1314 |
|
---|
1315 | add_filter('the_content', 'myspacetv_plugin');
|
---|
1316 | add_filter('the_content_rss', 'myspacetv_plugin');
|
---|
1317 | add_filter('comment_text', 'myspacetv_plugin');
|
---|
1318 |
|
---|
1319 |
|
---|
1320 | // Veoh code
|
---|
1321 |
|
---|
1322 | define("VEOH_WIDTH", 410);
|
---|
1323 | define("VEOH_HEIGHT", 341);
|
---|
1324 | define("VEOH_REGEXP", "/\[veoh ([[:print:]]+)\]/");
|
---|
1325 | define("VEOH_TARGET", "<embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=###URL###&id=anonymous&player=videodetailsembedded&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"".VEOH_WIDTH."\" height=\"".VEOH_HEIGHT."\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>");
|
---|
1326 |
|
---|
1327 | function veoh_plugin_callback($match)
|
---|
1328 | {
|
---|
1329 | $output = VEOH_TARGET;
|
---|
1330 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1331 | return ($output);
|
---|
1332 | }
|
---|
1333 |
|
---|
1334 | function veoh_plugin($content)
|
---|
1335 | {
|
---|
1336 | return (preg_replace_callback(VEOH_REGEXP, 'veoh_plugin_callback', $content));
|
---|
1337 | }
|
---|
1338 |
|
---|
1339 | add_filter('the_content', 'veoh_plugin');
|
---|
1340 | add_filter('the_content_rss', 'veoh_plugin');
|
---|
1341 | add_filter('comment_text', 'veoh_plugin');
|
---|
1342 |
|
---|
1343 | // Wandeo Video Code
|
---|
1344 |
|
---|
1345 | define("WANDEO_WIDTH", 352);
|
---|
1346 | define("WANDEO_HEIGHT", 308);
|
---|
1347 | define("WANDEO_REGEXP", "/\[wandeo ([[:print:]]+)\]/");
|
---|
1348 | define("WANDEO_TARGET", "<object width=\"".WANDEO_WIDTH."\" height=\"".WANDEO_HEIGHT."\"><param name=\"vmode\" value=\"transparent\"></param><embed src=\"http://www.wandeo.com/v/###URL###\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"".WANDEO_WIDTH."\" height=\"".WANDEO_HEIGHT."\"></embed></object>");
|
---|
1349 |
|
---|
1350 | function wandeo_plugin_callback($match) {
|
---|
1351 | $output = WANDEO_TARGET;
|
---|
1352 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1353 | return ($output);
|
---|
1354 | }
|
---|
1355 |
|
---|
1356 | function wandeo_plugin($content) {
|
---|
1357 | return preg_replace_callback(WANDEO_REGEXP, 'wandeo_plugin_callback', $content);
|
---|
1358 | }
|
---|
1359 |
|
---|
1360 | add_filter('the_content', 'wandeo_plugin');
|
---|
1361 | add_filter('the_content_rss', 'wandeo_plugin');
|
---|
1362 | add_filter('comment_text', 'wandeo_plugin');
|
---|
1363 |
|
---|
1364 |
|
---|
1365 | // glumbert code
|
---|
1366 |
|
---|
1367 | define("GLUMBERT_WIDTH", 448);
|
---|
1368 | define("GLUMBERT_HEIGHT", 336);
|
---|
1369 | define("GLUMBERT_REGEXP", "/\[glumbert ([[:print:]]+)\]/");
|
---|
1370 | define("GLUMBERT_TARGET", "<object width=\"".GLUMBERT_WIDTH."\" height=\"".GLUMBERT_HEIGHT."\"><param name=\"vmode\" value=\"transparent\"></param><embed src=\"http://www.glumbert.com/embed/###URL###\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"".GLUMBERT_WIDTH."\" height=\"".GLUMBERT_HEIGHT."\"></embed></object>");
|
---|
1371 |
|
---|
1372 | function glumbert_plugin_callback($match)
|
---|
1373 | {
|
---|
1374 | $output = GLUMBERT_TARGET;
|
---|
1375 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1376 | return ($output);
|
---|
1377 | }
|
---|
1378 |
|
---|
1379 | function glumbert_plugin($content)
|
---|
1380 | {
|
---|
1381 | return (preg_replace_callback(GLUMBERT_REGEXP,
|
---|
1382 | 'glumbert_plugin_callback', $content));
|
---|
1383 | }
|
---|
1384 |
|
---|
1385 | add_filter('the_content', 'glumbert_plugin');
|
---|
1386 | add_filter('the_content_rss', 'glumbert_plugin');
|
---|
1387 | add_filter('comment_text', 'glumbert_plugin');
|
---|
1388 |
|
---|
1389 | // GameVideos Code
|
---|
1390 |
|
---|
1391 | define("GameVideos_WIDTH", 425);
|
---|
1392 | define("GameVideos_HEIGHT", 350);
|
---|
1393 | define("GameVideos_REGEXP", "/\[gamevideos ([[:print:]]+)\]/");
|
---|
1394 | define("GameVideos_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://www.gamevideos.com:80/swf/gamevideos11.swf?embedded=1&fullscreen=1&autoplay=0&src=http://www.gamevideos.com:80/video/videoListXML%3Fid%3D###URL###%26ordinal%3D1184588561564%26adPlay%3Dfalse\" quality=\"high\" play=\"true\" loop=\"true\" scale=\"showall\" wmode=\"window\" devicefont=\"false\" id=\"gamevideos6\" bgcolor=\"#FFFFFF\" name=\"gamevideos6\" menu=\"true\" allowscriptaccess=\"sameDomain\" allowFullScreen=\"true\" align=\"middle\" height=\"".GameVideos_HEIGHT."\" width=\"".GameVideos_WIDTH."\"/></object>");
|
---|
1395 |
|
---|
1396 | function gamevideos_plugin_callback($match) {
|
---|
1397 | $output = GameVideos_TARGET;
|
---|
1398 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1399 | return ($output);
|
---|
1400 | }
|
---|
1401 |
|
---|
1402 | function gamevideos_plugin($content) {
|
---|
1403 | return preg_replace_callback(GameVideos_REGEXP, 'gamevideos_plugin_callback', $content);
|
---|
1404 | }
|
---|
1405 |
|
---|
1406 | add_filter('the_content', 'gamevideos_plugin');
|
---|
1407 | add_filter('the_content_rss', 'gamevideos_plugin');
|
---|
1408 | add_filter('comment_text', 'gamevideos_plugin');
|
---|
1409 |
|
---|
1410 |
|
---|
1411 | // GameTrailers Code
|
---|
1412 |
|
---|
1413 | define("GameTrailers_WIDTH", 480);
|
---|
1414 | define("GameTrailers_HEIGHT", 409);
|
---|
1415 | define("GameTrailers_REGEXP", "/\[gametrailers ([[:print:]]+)\]/");
|
---|
1416 | define("GameTrailers_TARGET", "<object id=\"gtembed\" width=\"".GameTrailers_WIDTH."\" height=\"".GameTrailers_HEIGHT."\">
|
---|
1417 | <param name=\"movie\" value=\"http://www.gametrailers.com/remote_wrap.php?mid=###URL###\"/>
|
---|
1418 | <param name=\"quality\" value=\"high\" />
|
---|
1419 | <embed src=\"http://www.gametrailers.com/remote_wrap.php?mid=###URL###\" name=\"gtembed\" align=\"middle\" allowScriptAccess=\"sameDomain\" quality=\"high\" type=\"application/x-shockwave-flash\" width=\"".GameTrailers_WIDTH."\" height=\"".GameTrailers_HEIGHT."\"></embed> </object>");
|
---|
1420 |
|
---|
1421 |
|
---|
1422 | function gametrailers_plugin_callback($match) {
|
---|
1423 | $output = GameTrailers_TARGET;
|
---|
1424 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1425 | return ($output);
|
---|
1426 | }
|
---|
1427 |
|
---|
1428 | function gametrailers_plugin($content) {
|
---|
1429 | return preg_replace_callback(GameTrailers_REGEXP, 'gametrailers_plugin_callback', $content);
|
---|
1430 | }
|
---|
1431 |
|
---|
1432 | add_filter('the_content', 'gametrailers_plugin');
|
---|
1433 | add_filter('the_content_rss', 'gametrailers_plugin');
|
---|
1434 | add_filter('comment_text', 'gametrailers_plugin');
|
---|
1435 |
|
---|
1436 | // IFILM Code
|
---|
1437 |
|
---|
1438 | define("IFILM_WIDTH", 448);
|
---|
1439 | define("IFILM_HEIGHT", 365);
|
---|
1440 | define("IFILM_REGEXP", "/\[ifilm ([[:print:]]+)\]/");
|
---|
1441 | define("IFILM_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://www.ifilm.com/efp?flvbaseclip=###URL###\" width=\"".IFILM_WIDTH."\" height=\"".IFILM_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://www.ifilm.com/efp?flvbaseclip=###URL###\" /></object>");
|
---|
1442 |
|
---|
1443 | function ifilm_plugin_callback($match) {
|
---|
1444 | $output = IFILM_TARGET;
|
---|
1445 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1446 | return ($output);
|
---|
1447 | }
|
---|
1448 |
|
---|
1449 | function ifilm_plugin($content) {
|
---|
1450 | return preg_replace_callback(IFILM_REGEXP, 'ifilm_plugin_callback', $content);
|
---|
1451 | }
|
---|
1452 |
|
---|
1453 | add_filter('the_content', 'ifilm_plugin');
|
---|
1454 | add_filter('the_content_rss', 'ifilm_plugin');
|
---|
1455 | add_filter('comment_text', 'ifilm_plugin');
|
---|
1456 |
|
---|
1457 | //LiveLeak Code
|
---|
1458 |
|
---|
1459 | define("LIVELEAK_WIDTH", 450);
|
---|
1460 | define("LIVELEAK_HEIGHT", 370);
|
---|
1461 | define("LIVELEAK_REGEXP", "/\[liveleak ([[:print:]]+)\]/");
|
---|
1462 | define("LIVELEAK_TARGET", "<object width=\"".LIVELEAK_WIDTH."\" height=\"".LIVELEAK_HEIGHT."\"><param name=\"movie\" value=\"http://www.liveleak.com/e/###URL###\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.liveleak.com/e/###URL###\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"".LIVELEAK_WIDTH."\" height=\"".LIVELEAK_HEIGHT."\"></embed></object>");
|
---|
1463 |
|
---|
1464 |
|
---|
1465 | function liveleak_plugin_callback($match)
|
---|
1466 | {
|
---|
1467 | $output = LIVELEAK_TARGET;
|
---|
1468 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1469 | return ($output);
|
---|
1470 | }
|
---|
1471 |
|
---|
1472 | function liveleak_plugin($content)
|
---|
1473 | {
|
---|
1474 | return (preg_replace_callback(LIVELEAK_REGEXP, 'liveleak_plugin_callback', $content));
|
---|
1475 | }
|
---|
1476 |
|
---|
1477 | add_filter('the_content', 'liveleak_plugin');
|
---|
1478 | add_filter('the_content_rss', 'liveleak_plugin');
|
---|
1479 | add_filter('comment_text', 'liveleak_plugin');
|
---|
1480 |
|
---|
1481 | // Grouper Code
|
---|
1482 |
|
---|
1483 | define("GROUPER_WIDTH", 400);
|
---|
1484 | define("GROUPER_HEIGHT", 325);
|
---|
1485 | define("GROUPER_REGEXP", "/\[grouper ([[:print:]]+)\]/");
|
---|
1486 | define("GROUPER_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://grouper.com/mtg/mtgPlayer.swf?v=1.7ap=0&rf=-1&vfver=8&extid=-1&extsite=-1&id=###URL###\" width=\"".GROUPER_WIDTH."\" height=\"".GROUPER_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://grouper.com/mtg/mtgPlayer.swf?v=1.7ap=0&rf=-1&vfver=8&extid=-1&extsite=-1&id=###URL###\" /></object>");
|
---|
1487 |
|
---|
1488 | function grouper_plugin_callback($match)
|
---|
1489 | {
|
---|
1490 | $output = GROUPER_TARGET;
|
---|
1491 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1492 | return ($output);
|
---|
1493 | }
|
---|
1494 |
|
---|
1495 | function grouper_plugin($content)
|
---|
1496 | {
|
---|
1497 | return (preg_replace_callback(GROUPER_REGEXP, 'grouper_plugin_callback', $content));
|
---|
1498 | }
|
---|
1499 |
|
---|
1500 | add_filter('the_content', 'grouper_plugin');
|
---|
1501 | add_filter('the_content_rss', 'grouper_plugin');
|
---|
1502 | add_filter('comment_text', 'grouper_plugin');
|
---|
1503 |
|
---|
1504 |
|
---|
1505 | // UnCut Code
|
---|
1506 |
|
---|
1507 | define("UNCUT_WIDTH", 425);
|
---|
1508 | define("UNCUT_HEIGHT", 350);
|
---|
1509 | define("UNCUT_REGEXP", "/\[uncut ([[:print:]]+)\]/");
|
---|
1510 | define("UNCUT_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://uncutvideo.aol.com/en-US/uc_videoplayer.swf?aID=1###URL###\" width=\"".UNCUT_WIDTH."\" height=\"".UNCUT_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://uncutvideo.aol.com/en-US/uc_videoplayer.swf?aID=1###URL###\" /></object>");
|
---|
1511 |
|
---|
1512 | function uncut_plugin_callback($match)
|
---|
1513 | {
|
---|
1514 | $output = UNCUT_TARGET;
|
---|
1515 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1516 | return ($output);
|
---|
1517 | }
|
---|
1518 |
|
---|
1519 | function uncut_plugin($content)
|
---|
1520 | {
|
---|
1521 | return (preg_replace_callback(UNCUT_REGEXP, 'uncut_plugin_callback', $content));
|
---|
1522 | }
|
---|
1523 |
|
---|
1524 | add_filter('the_content', 'uncut_plugin');
|
---|
1525 | add_filter('the_content_rss', 'uncut_plugin');
|
---|
1526 | add_filter('comment_text', 'uncut_plugin');
|
---|
1527 |
|
---|
1528 |
|
---|
1529 | // Revver Code
|
---|
1530 |
|
---|
1531 | define("REVVER_WIDTH", 480);
|
---|
1532 | define("REVVER_HEIGHT", 392);
|
---|
1533 | define("REVVER_REGEXP", "/\[revver ([[:print:]]+)\]/");
|
---|
1534 | define("REVVER_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://flash.revver.com/player/1.0/player.swf?mediaId=###URL###\" width=\"".REVVER_WIDTH."\" height=\"".REVVER_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://flash.revver.com/player/1.0/player.swf?mediaId=###URL###\" /></object>");
|
---|
1535 |
|
---|
1536 | function revver_plugin_callback($match)
|
---|
1537 | {
|
---|
1538 | $output = REVVER_TARGET;
|
---|
1539 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1540 | return ($output);
|
---|
1541 | }
|
---|
1542 |
|
---|
1543 | function revver_plugin($content)
|
---|
1544 | {
|
---|
1545 | return (preg_replace_callback(REVVER_REGEXP, 'revver_plugin_callback', $content));
|
---|
1546 | }
|
---|
1547 |
|
---|
1548 | add_filter('the_content', 'revver_plugin');
|
---|
1549 | add_filter('the_content_rss', 'revver_plugin');
|
---|
1550 | add_filter('comment_text', 'revver_plugin');
|
---|
1551 |
|
---|
1552 | // blip.tv Code
|
---|
1553 | define("BLIPTV_WIDTH", 400);
|
---|
1554 | define("BLIPTV_HEIGHT", 294);
|
---|
1555 | define("BLIPTV_REGEXP", "/\[bliptv ([[:print:]]+)\]/");
|
---|
1556 | define("BLIPTV_TARGET", "<embed src=\"http://blip.tv/play/###URL###\" type=\"application/x-shockwave-flash\" width=\"".BLIPTV_WIDTH."\" height=\"".BLIPTV_HEIGHT."\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed>");
|
---|
1557 |
|
---|
1558 | function bliptv_plugin_callback($match) {
|
---|
1559 | $output = BLIPTV_TARGET;
|
---|
1560 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1561 | return ($output);
|
---|
1562 | }
|
---|
1563 |
|
---|
1564 | function bliptv_plugin($content) {
|
---|
1565 | return preg_replace_callback(BLIPTV_REGEXP, 'bliptv_plugin_callback', $content);
|
---|
1566 | }
|
---|
1567 |
|
---|
1568 | add_filter('the_content', 'bliptv_plugin');
|
---|
1569 | add_filter('the_content_rss', 'bliptv_plugin');
|
---|
1570 | add_filter('comment_text', 'bliptv_plugin');
|
---|
1571 |
|
---|
1572 |
|
---|
1573 | // Videotube Code
|
---|
1574 |
|
---|
1575 | define("VIDEOTUBE_WIDTH", 480);
|
---|
1576 | define("VIDEOTUBE_HEIGHT", 400);
|
---|
1577 | define("VIDEOTUBE_REGEXP", "/\[videotube ([[:print:]]+)\]/");
|
---|
1578 | define("VIDEOTUBE_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://www.videotube.de/ci/flash/videotube_player_4.swf?videoId=###URL###&svsf=0&lang=german&host=www.videotube.de\" width=\"".VIDEOTUBE_WIDTH."\" height=\"".VIDEOTUBE_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://www.videotube.de/ci/flash/videotube_player_4.swf?videoId=###URL###&svsf=0&lang=german&host=www.videotube.de\" /></object>");
|
---|
1579 |
|
---|
1580 | function videotube_plugin_callback($match) {
|
---|
1581 | $output = VIDEOTUBE_TARGET;
|
---|
1582 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1583 | return ($output);
|
---|
1584 | }
|
---|
1585 |
|
---|
1586 | function videotube_plugin($content) {
|
---|
1587 | return preg_replace_callback(VIDEOTUBE_REGEXP, 'videotube_plugin_callback', $content);
|
---|
1588 | }
|
---|
1589 |
|
---|
1590 | add_filter('the_content', 'videotube_plugin');
|
---|
1591 | add_filter('the_content_rss', 'videotube_plugin');
|
---|
1592 | add_filter('comment_text', 'videotube_plugin');
|
---|
1593 |
|
---|
1594 |
|
---|
1595 | // Vimeo Code
|
---|
1596 |
|
---|
1597 | define("VIMEO_WIDTH", 400); // default width
|
---|
1598 | define("VIMEO_HEIGHT", 300); // default height
|
---|
1599 | define("VIMEO_REGEXP", "/\[vimeo ([[:print:]]+)\]/");
|
---|
1600 | define("VIMEO_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=###URL###&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=###URL###&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object><br />");
|
---|
1601 |
|
---|
1602 | function vimeo_plugin_callback($match)
|
---|
1603 | {
|
---|
1604 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
1605 | $output = VIMEO_TARGET;
|
---|
1606 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
1607 | if (count($tag_parts) > 2) {
|
---|
1608 | if ($tag_parts[2] == 0) {
|
---|
1609 | $output = str_replace("###WIDTH###", VIMEO_WIDTH, $output);
|
---|
1610 | } else {
|
---|
1611 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
1612 | }
|
---|
1613 | if ($tag_parts[3] == 0) {
|
---|
1614 | $output = str_replace("###HEIGHT###", VIMEO_HEIGHT, $output);
|
---|
1615 | } else {
|
---|
1616 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
1617 | }
|
---|
1618 | } else {
|
---|
1619 | $output = str_replace("###WIDTH###", VIMEO_WIDTH, $output);
|
---|
1620 | $output = str_replace("###HEIGHT###", VIMEO_HEIGHT, $output);
|
---|
1621 | }
|
---|
1622 | return ($output);
|
---|
1623 | }
|
---|
1624 | function vimeo_plugin($content)
|
---|
1625 | {
|
---|
1626 | return (preg_replace_callback(VIMEO_REGEXP, 'vimeo_plugin_callback', $content));
|
---|
1627 | }
|
---|
1628 |
|
---|
1629 | add_filter('the_content', 'vimeo_plugin');
|
---|
1630 | add_filter('the_content_rss', 'vimeo_plugin');
|
---|
1631 | add_filter('comment_text', 'vimeo_plugin');
|
---|
1632 |
|
---|
1633 |
|
---|
1634 | // Metacafe Code
|
---|
1635 | define("METACAFE_WIDTH", 400);
|
---|
1636 | define("METACAFE_HEIGHT", 345);
|
---|
1637 | define("METACAFE_REGEXP", "/\[metacafe ([[:print:]]+)\]/");
|
---|
1638 | define("METACAFE_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://www.metacafe.com/fplayer/###URL###/.swf\" width=\"".METACAFE_WIDTH."\" height=\"".METACAFE_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://www.metacafe.com/fplayer/###URL###/.swf\" /></object>");
|
---|
1639 |
|
---|
1640 | function metacafe_plugin_callback($match) {
|
---|
1641 | $output = METACAFE_TARGET;
|
---|
1642 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1643 | return ($output);
|
---|
1644 | }
|
---|
1645 |
|
---|
1646 | function metacafe_plugin($content) {
|
---|
1647 | return preg_replace_callback(METACAFE_REGEXP, 'metacafe_plugin_callback', $content);
|
---|
1648 | }
|
---|
1649 |
|
---|
1650 | add_filter('the_content', 'metacafe_plugin');
|
---|
1651 | add_filter('the_content_rss', 'metacafe_plugin');
|
---|
1652 | add_filter('comment_text', 'metacafe_plugin');
|
---|
1653 |
|
---|
1654 |
|
---|
1655 | // Break.com Codes
|
---|
1656 |
|
---|
1657 | define("BREAK_WIDTH", 425);
|
---|
1658 | define("BREAK_HEIGHT", 350);
|
---|
1659 | define("BREAK_REGEXP", "/\[break ([[:print:]]+)\]/");
|
---|
1660 | define("BREAK_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://embed.break.com/###URL###\" width=\"".BREAK_WIDTH."\" height=\"".BREAK_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://embed.break.com/###URL###\" /></object>");
|
---|
1661 |
|
---|
1662 | function break_plugin_callback($match) {
|
---|
1663 | $output = BREAK_TARGET;
|
---|
1664 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1665 | return ($output);
|
---|
1666 | }
|
---|
1667 |
|
---|
1668 | function break_plugin($content) {
|
---|
1669 | return preg_replace_callback(BREAK_REGEXP, 'break_plugin_callback', $content);
|
---|
1670 | }
|
---|
1671 |
|
---|
1672 | add_filter('the_content', 'break_plugin');
|
---|
1673 | add_filter('the_content_rss', 'break_plugin');
|
---|
1674 | add_filter('comment_text', 'break_plugin');
|
---|
1675 |
|
---|
1676 |
|
---|
1677 | // MyVideo Code
|
---|
1678 |
|
---|
1679 | define("MYVIDEO_WIDTH", 470);
|
---|
1680 | define("MYVIDEO_HEIGHT", 406);
|
---|
1681 | define("MYVIDEO_REGEXP", "/\[myvideo ([[:print:]]+)\]/");
|
---|
1682 | define("MYVIDEO_TARGET", "<object style=\"width:###WIDTH###px;height:###HEIGHT###px;\" type=\"application/x-shockwave-flash\" data=\"http://www.myvideo.de/movie/###URL###\"> <param name=\"movie\" value=\"http://www.myvideo.de/movie/###URL###\" /> <param name=\"AllowFullscreen\" value=\"true\" /> </object>");
|
---|
1683 |
|
---|
1684 | function myvideo_plugin_callback($match)
|
---|
1685 | {
|
---|
1686 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
1687 | $output = MYVIDEO_TARGET;
|
---|
1688 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
1689 | if (count($tag_parts) > 2) {
|
---|
1690 | if ($tag_parts[2] == 0) {
|
---|
1691 | $output = str_replace("###WIDTH###", MYVIDEO_WIDTH, $output);
|
---|
1692 | } else {
|
---|
1693 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
1694 | }
|
---|
1695 | if ($tag_parts[3] == 0) {
|
---|
1696 | $output = str_replace("###HEIGHT###", MYVIDEO_HEIGHT, $output);
|
---|
1697 | } else {
|
---|
1698 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
1699 | }
|
---|
1700 | } else {
|
---|
1701 | $output = str_replace("###WIDTH###", MYVIDEO_WIDTH, $output);
|
---|
1702 | $output = str_replace("###HEIGHT###", MYVIDEO_HEIGHT, $output);
|
---|
1703 | }
|
---|
1704 | return ($output);
|
---|
1705 | }
|
---|
1706 | function myvideo_plugin($content)
|
---|
1707 | {
|
---|
1708 | return (preg_replace_callback(MYVIDEO_REGEXP, 'myvideo_plugin_callback', $content));
|
---|
1709 | }
|
---|
1710 |
|
---|
1711 | add_filter('the_content', 'myvideo_plugin');
|
---|
1712 | add_filter('the_content_rss', 'myvideo_plugin');
|
---|
1713 | add_filter('comment_text', 'myvideo_plugin');
|
---|
1714 |
|
---|
1715 | // Dailymotion Code
|
---|
1716 |
|
---|
1717 | define("DAILYMOTION_WIDTH", 420);
|
---|
1718 | define("DAILYMOTION_HEIGHT", 336);
|
---|
1719 | define("DAILYMOTION_REGEXP", "/\[dailymotion[:\s]([[:print:]]+)\]/");
|
---|
1720 | define("DAILYMOTION_TARGET", "<object width=\"".DAILYMOTION_WIDTH."\" height=\"".DAILYMOTION_HEIGHT."\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/###URL###\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.dailymotion.com/swf/###URL###\" type=\"application/x-shockwave-flash\" width=\"".DAILYMOTION_WIDTH."\" height=\"".DAILYMOTION_HEIGHT."\" allowFullScreen=\"true\" allowScriptAccess=\"always\"></embed></object>");
|
---|
1721 |
|
---|
1722 |
|
---|
1723 |
|
---|
1724 | function dailymotion_plugin_callback($match) {
|
---|
1725 | $output = DAILYMOTION_TARGET;
|
---|
1726 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1727 | return ($output);
|
---|
1728 | }
|
---|
1729 |
|
---|
1730 | function dailymotion_plugin($content) {
|
---|
1731 | return preg_replace_callback(DAILYMOTION_REGEXP, 'dailymotion_plugin_callback', $content);
|
---|
1732 | }
|
---|
1733 |
|
---|
1734 | add_filter('the_content', 'dailymotion_plugin');
|
---|
1735 | add_filter('the_content_rss', 'dailymotion_plugin');
|
---|
1736 | add_filter('comment_text', 'dailymotion_plugin');
|
---|
1737 |
|
---|
1738 |
|
---|
1739 | // Sevenload Code
|
---|
1740 |
|
---|
1741 | define("SEVENLOAD_WIDTH", 380);
|
---|
1742 | define("SEVENLOAD_HEIGHT", 313);
|
---|
1743 | define("SEVENLOAD_REGEXP", "/\[sevenload ([[:print:]]+)\]/");
|
---|
1744 | define("SEVENLOAD_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://sevenload.de/pl/###URL###/380x313/swf\" width=\"".SEVENLOAD_WIDTH."\" height=\"".SEVENLOAD_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://sevenload.de/pl/###URL###/380x313/swf\" /></object>");
|
---|
1745 |
|
---|
1746 | function sevenload_plugin_callback($match) {
|
---|
1747 | $output = SEVENLOAD_TARGET;
|
---|
1748 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1749 | return ($output);
|
---|
1750 | }
|
---|
1751 |
|
---|
1752 | function sevenload_plugin($content) {
|
---|
1753 | return preg_replace_callback(SEVENLOAD_REGEXP, 'sevenload_plugin_callback', $content);
|
---|
1754 | }
|
---|
1755 |
|
---|
1756 | add_filter('the_content', 'sevenload_plugin');
|
---|
1757 | add_filter('the_content_rss', 'sevenload_plugin');
|
---|
1758 | add_filter('comment_text', 'sevenload_plugin');
|
---|
1759 |
|
---|
1760 | // Clipfish Code
|
---|
1761 |
|
---|
1762 | define("CLIPFISH_WIDTH", 464);
|
---|
1763 | define("CLIPFISH_HEIGHT", 380);
|
---|
1764 | define("CLIPFISH_REGEXP", "/\[clipfish ([[:print:]]+)\]/");
|
---|
1765 | define("CLIPFISH_TARGET", "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"###WIDTH###\" height=\"###HEIGHT###\" id=\"player\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"movie\" value=\"http://www.clipfish.de/videoplayer.swf?as=0&vid=###URL####&r=0\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#FF0000\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.clipfish.de/videoplayer.swf?as=0&vid=###URL####&r=0\" quality=\"high\" bgcolor=\"#FF0000\" width=\"###WIDTH###\" height=\"###HEIGHT###\" name=\"player\" align=\"middle\" allowFullScreen=\"true\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></object>");
|
---|
1766 |
|
---|
1767 | function clipfish_plugin_callback($match)
|
---|
1768 | {
|
---|
1769 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
1770 | $output = CLIPFISH_TARGET;
|
---|
1771 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
1772 | if (count($tag_parts) > 2) {
|
---|
1773 | if ($tag_parts[2] == 0) {
|
---|
1774 | $output = str_replace("###WIDTH###", CLIPFISH_WIDTH, $output);
|
---|
1775 | } else {
|
---|
1776 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
1777 | }
|
---|
1778 | if ($tag_parts[3] == 0) {
|
---|
1779 | $output = str_replace("###HEIGHT###", CLIPFISH_HEIGHT, $output);
|
---|
1780 | } else {
|
---|
1781 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
1782 | }
|
---|
1783 | } else {
|
---|
1784 | $output = str_replace("###WIDTH###", CLIPFISH_WIDTH, $output);
|
---|
1785 | $output = str_replace("###HEIGHT###", CLIPFISH_HEIGHT, $output);
|
---|
1786 | }
|
---|
1787 | return ($output);
|
---|
1788 | }
|
---|
1789 | function clipfish_plugin($content)
|
---|
1790 | {
|
---|
1791 | return (preg_replace_callback(CLIPFISH_REGEXP, 'clipfish_plugin_callback', $content));
|
---|
1792 | }
|
---|
1793 |
|
---|
1794 | add_filter('the_content', 'clipfish_plugin');
|
---|
1795 | add_filter('the_content_rss', 'clipfish_plugin');
|
---|
1796 | add_filter('comment_text', 'clipfish_plugin');
|
---|
1797 |
|
---|
1798 |
|
---|
1799 | // GoogleVideo Code
|
---|
1800 |
|
---|
1801 | define("GOOGLE_WIDTH", 425);
|
---|
1802 | define("GOOGLE_HEIGHT", 350);
|
---|
1803 | define("GOOGLE_REGEXP", "/\[google ([[:print:]]+)\]/");
|
---|
1804 | define("GOOGLE_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://video.google.com/googleplayer.swf?docId=###URL###\" width=\"".GOOGLE_WIDTH."\" height=\"".GOOGLE_HEIGHT."\" wmode=\"transparent\"><param name=\"movie\" value=\"http://video.google.com/googleplayer.swf?docId=###URL###\" /></object>");
|
---|
1805 |
|
---|
1806 | function google_plugin_callback($match) {
|
---|
1807 | $output = GOOGLE_TARGET;
|
---|
1808 | $output = str_replace("###URL###", $match[1], $output);
|
---|
1809 | return ($output);
|
---|
1810 | }
|
---|
1811 |
|
---|
1812 | function google_plugin($content) {
|
---|
1813 | return preg_replace_callback(GOOGLE_REGEXP, 'google_plugin_callback', $content);
|
---|
1814 | }
|
---|
1815 |
|
---|
1816 | add_filter('the_content', 'google_plugin');
|
---|
1817 | add_filter('the_content_rss', 'google_plugin');
|
---|
1818 | add_filter('comment_text', 'google_plugin');
|
---|
1819 |
|
---|
1820 |
|
---|
1821 |
|
---|
1822 | // Youtube Code
|
---|
1823 |
|
---|
1824 | define("YOUTUBE_WIDTH", 425); // default width
|
---|
1825 | define("YOUTUBE_HEIGHT", 344); // default height
|
---|
1826 | define("YOUTUBE_REGEXP", "/\[youtube ([[:print:]]+)\]/");
|
---|
1827 | define("YOUTUBE_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.youtube.com/v/###URL###&fs=1\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><embed src=\"http://www.youtube.com/v/###URL###&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>");
|
---|
1828 |
|
---|
1829 | function youtube_plugin_callback($match)
|
---|
1830 | {
|
---|
1831 | $tag_parts = explode(" ", rtrim($match[0], "]"));
|
---|
1832 | $output = YOUTUBE_TARGET;
|
---|
1833 | $output = str_replace("###URL###", $tag_parts[1], $output);
|
---|
1834 | if (count($tag_parts) > 2) {
|
---|
1835 | if ($tag_parts[2] == 0) {
|
---|
1836 | $output = str_replace("###WIDTH###", YOUTUBE_WIDTH, $output);
|
---|
1837 | } else {
|
---|
1838 | $output = str_replace("###WIDTH###", $tag_parts[2], $output);
|
---|
1839 | }
|
---|
1840 | if ($tag_parts[3] == 0) {
|
---|
1841 | $output = str_replace("###HEIGHT###", YOUTUBE_HEIGHT, $output);
|
---|
1842 | } else {
|
---|
1843 | $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
|
---|
1844 | }
|
---|
1845 | } else {
|
---|
1846 | $output = str_replace("###WIDTH###", YOUTUBE_WIDTH, $output);
|
---|
1847 | $output = str_replace("###HEIGHT###", YOUTUBE_HEIGHT, $output);
|
---|
1848 | }
|
---|
1849 | return ($output);
|
---|
1850 | }
|
---|
1851 | function youtube_plugin($content)
|
---|
1852 | {
|
---|
1853 | return (preg_replace_callback(YOUTUBE_REGEXP, 'youtube_plugin_callback', $content));
|
---|
1854 | }
|
---|
1855 |
|
---|
1856 | add_filter('the_content', 'youtube_plugin',1);
|
---|
1857 | add_filter('the_content_rss', 'youtube_plugin');
|
---|
1858 | add_filter('comment_text', 'youtube_plugin');
|
---|
1859 |
|
---|
1860 |
|
---|
1861 | ?>
|
---|