Changeset 1147
- Timestamp:
- 06/23/08 08:51:35 (2 months ago)
- Files:
-
- bbvideo/trunk/admin.php (modified) (3 diffs)
- bbvideo/trunk/bbvideo.php (modified) (5 diffs)
- bbvideo/trunk/provider.inc.php (modified) (5 diffs)
- bbvideo/trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bbvideo/trunk/admin.php
r953 r1147 1 1 <?php 2 2 /* 3 BBVideo Plugin v0.2 2admin template3 BBVideo Plugin v0.23 admin template 4 4 http://www.naden.de/blog/bbvideo-bbpress-video-plugin 5 5 */ … … 9 9 $this->SaveOptions( 10 10 array( 11 'embed' => intval( $_POST[ 'embed' ] ) 11 'embed' => intval( $_POST[ 'embed' ] ), 12 'download' => intval( $_POST[ 'download' ] ) 12 13 ) 13 14 ); … … 22 23 <p> 23 24 <h4>Embed:</h4> 24 <label for "embed">Zeige Embed Optionen unter den Videos. / Show embed field below the videos.</label>25 <label for="embed">Zeige Embed Optionen unter den Videos. / Show embed field below the videos.</label> 25 26 <p> 26 27 <input type="radio" name="embed" value="1" <?php print( $this->options[ 'embed' ] == 1 ? ' checked="checked"' : '' ); ?>/> Ja 27 28 <input type="radio" name="embed" value="0" <?php print( $this->options[ 'embed' ] == 0 ? ' checked="checked"' : '' ); ?>/> Nein 29 </p> 30 </p> 31 <p> 32 <h4>Download:</h4> 33 <label for="download">Zeige Download-Link unter den Videos. / Show download link field below the videos.</label> 34 <p> 35 <input type="radio" name="download" value="1" <?php print( $this->options[ 'download' ] == 1 ? ' checked="checked"' : '' ); ?>/> Ja 36 <input type="radio" name="download" value="0" <?php print( $this->options[ 'download' ] == 0 ? ' checked="checked"' : '' ); ?>/> Nein 28 37 </p> 29 38 </p> bbvideo/trunk/bbvideo.php
r953 r1147 6 6 Author: Naden Badalgogtapeh 7 7 Author URI: http://www.naden.de/blog 8 Version: 0.2 28 Version: 0.23 9 9 */ 10 10 … … 44 44 function BBPressPluginBBVideo() 45 45 { 46 $this->version = '0.2 2';46 $this->version = '0.23'; 47 47 48 48 $this->wp_filter_id = 'bbvideo'; 49 49 50 $this->index = 0;50 $this->index = 0; 51 51 52 52 $this->options = bb_get_option( 'bbvideo_options' ); … … 55 55 { 56 56 $this->SaveOptions( array( 'embed' => 1 ), false ); 57 } 58 59 if( !array_key_exists( 'download', $this->options ) ) 60 { 61 $this->options[ 'download' ] = 1; 62 63 $this->SaveOptions( $this->options, false ); 57 64 } 58 65 … … 180 187 181 188 $url = sprintf( '<a href="http://www.naden.de/blog/bbvideo-bbpress-video-plugin" style="color:#aaa;text-decoration:underline;">%s</a>', $this->GetTitle( get_topic_title() ) ); 189 190 if( $this->options[ 'download' ] == 1 ) 191 { 192 $download = sprintf( '<a style="color: #000;" href="http://www.degrab.de/?url=%s" target="_blank">Video Download</a>', urlencode( $link ) ); 193 } 182 194 183 195 if( $this->options[ 'embed' ] == 1 ) 184 196 { 197 185 198 $post_title = str_replace( "'", '', get_topic_title() ); 186 199 $post_link = get_topic_link(); 187 200 201 if( isset( $download ) ) 202 { 203 $download = ' | ' . $download; 204 } 205 188 206 $code = <<<DATA 189 207 <!-- bbVideo Plugin v{$this->version} - http://www.naden.de/blog/bbvideo-bbpress-video-plugin --> 190 208 <div style="width:{$provider[ 'width' ]}px;">{$code}<div> 191 209 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 192 <tr><td><a href="" id="bbvideo{$this->index}" onclick="javascript:return(bbvideo_embed(this));" style="color: #000;">[+] Embed the video</a> </td><td align="right" style="color:#aaa;font-size:80%;">Get the {$url}</td></tr></table>210 <tr><td><a href="" id="bbvideo{$this->index}" onclick="javascript:return(bbvideo_embed(this));" style="color: #000;">[+] Embed the video</a>{$download}</td><td align="right" style="color:#aaa;font-size:80%;">Get the {$url}</td></tr></table> 193 211 194 212 <div id="bbvideo{$this->index}embed" style="display:none;"> … … 204 222 } 205 223 else 206 { 207 $code = "<div style=\"width:{$provider[ 'width' ]}px;\">{$code}<div align=\"right\" style=\"color:#aaa;font-size:80%;\">Get the {$url}</div></div>"; 224 { 225 if( isset( $download ) ) 226 { 227 $download = '<td>' . $download . '</td>'; 228 } 229 230 $code = <<<DATA 231 <div style="width:{$provider[ 'width' ]}px;">{$code} 232 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 233 <tr>{$download}<td align="right" style="color:#aaa;font-size:80%;">Get the {$url}</td></tr> 234 </table> 235 </div> 236 DATA; 208 237 } 209 238 bbvideo/trunk/provider.inc.php
r934 r1147 1 1 <?php 2 2 /* 3 BBVideo Plugin v0. 1definition file3 BBVideo Plugin v0.23 definition file 4 4 http://www.naden.de/blog/bbvideo-bbpress-video-plugin 5 5 */ … … 20 20 + clipfish 21 21 + gametrailers 22 + vimeo 22 23 */ 23 24 … … 26 27 'width' => '425', 27 28 'height' => '350', 28 # 'pattern' => 'youtube\.(.*)/v(=|\/)([a-zA-Z0-9_-]*)',29 29 'pattern' => 'youtube\.(.*)/watch\?v=([a-zA-Z0-9_-]*)', 30 30 'index' => 2, 31 # 'code' => "<object width='[WIDTH]' height='[HEIGHT]'><param name='movie' value='http://www.youtube.com/v/[ID]&rel=1'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/[ID]&rel=1' type='application/x-shockwave-flash' wmode='transparent' width='[WIDTH]' height='[HEIGHT]'></embed></object>",32 31 'code' => '<object width="[WIDTH]" height="[HEIGHT]"><param name="movie" value="http://www.youtube.com/v/[ID]&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/[ID]&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="[WIDTH]" height="[HEIGHT]"></embed></object>', 33 32 'page_url' => 'http://www.youtube.com' … … 100 99 'width' => '425', 101 100 'height' => '350', 102 # 'pattern' => 'video\.google\.(.*)/([url|videoplay].?)\?docid=([a-zA-Z0-9_-]*)',103 101 'pattern' => 'video\.google\.(.*)/(videoplay)?(url)?\?docid=([a-zA-Z0-9_-]*)', 104 102 'index' => 1, … … 129 127 'code' => '<embed src="http://www.clipfish.de/videoplayer.swf?as=0&videoid=[ID]&r=1" quality="high" bgcolor="#cacaca" width="[WIDTH]" height="[HEIGHT]" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed>', 130 128 'page_url' => 'http://www.clipfish.de' 129 ), 130 'vimeo' => array( 131 'width' => '425', 132 'height' => '350', 133 'pattern' => 'vimeo\.com/([0-9]*)', 134 'index' => 1, 135 'code' => '<object width="[WIDTH]" height="[HEIGHT]"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=[ID]&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=[ID]&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="[WIDTH]" height="[HEIGHT]"></embed></object>', 136 'page_url' => 'http://www.vimeo.com' 131 137 ) 132 138 ); bbvideo/trunk/readme.txt
r935 r1147 1 1 === bbVideo === 2 Tags: video, embed, embedding, embedded, multimedia, film, media, videos, youtube, flashvideo, flashvideos 2 Tags: video, embed, embedding, embedded, multimedia, film, media, videos, youtube, flashvideo, flashvideos, vimeo, myvideo, clipfish, video download 3 3 Contributors: Naden Badalgogtapeh 4 4 Requires at least: 0.8.3 … … 10 10 == Description == 11 11 12 This plugin converts all links to knowen videos portals to the matching embedded players and supports the reader with easy sharing options .12 This plugin converts all links to knowen videos portals to the matching embedded players and supports the reader with easy sharing options and video downloading capabilities. 13 13 14 14 == Installation == … … 22 22 But! You can add the following snippet to 'topic.php' just below '<?php post_form(); ?>' to have a list of video providers displayed the poster can use. 23 23 24 < ?php24 <code> 25 25 global $BBPressPluginBBVideo; 26 26 if( isset( $BBPressPluginBBVideo ) && !is_null( $BBPressPluginBBVideo ) ) … … 29 29 $BBPressPluginBBVideo->DisplayProvider(); 30 30 } 31 ?>31 </code> 32 32 33 33 == Frequently Asked Questions ==
