MyBB Depo Forum
Altyazı Oynatan Video Player - Mybb - Baskı Önizleme

+- MyBB Depo Forum (https://mybbdepo.com)
+-- Forum: MyBB 1.6 Depo (https://mybbdepo.com/mybb-1-6-depo-forumu)
+--- Forum: MyBB 1.6 Çözülmüş Soru ve Sorunlar (https://mybbdepo.com/mybb-1-6-cozulmus-soru-ve-sorunlar-forumu)
+--- Konu Başlığı: Altyazı Oynatan Video Player - Mybb (/altyazi-oynatan-video-player-mybb-konusu.html)

Sayfalar: 1 2


Cvp: Altyazı Oynatan Video Player - Mybb - KaraKedi - 25-08-2012

(23-08-2012, Saat:23:40)EmreKarakaya Adlı Kullanıcıdan Alıntı: Hocam mümkünse kullandığınız playeri rapid veya hotfileye upload edebilirmisiniz?

malesef mail adresi verilip indiriliyor. kendi kendimize paylasmamiz yasak.
kendi sitesinden indirmeniz mümkün.
http://www.longtailvideo.com/players/jw-flv-player/


Cvp: Altyazı Oynatan Video Player - Mybb - KaraKedi - 25-08-2012

Kod:
<?php
if(!defined("IN_MYBB"))
{
  die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

function jwplayermycode_info() {
    return array(
        "name"            => "JWPlayer MyCode Embed",
        "description"        => "A simple MyCode which able you to embed JWPlayer player into your posts easily.",
        "website"        => "http://www.smkcp.co.cc",
        "author"        => "acrox999",
        "authorsite"        => "http://www.smkcp.co.cc",
        "version"        => "3.0",
        "compatibility"     => "1*",
        'guid'        => '27136d166055f29850ddc251788a5d3b'
    );
}

$plugins->add_hook("parse_message", "jwplayermycode_run");

function jwplayermycode_activate() {
    
}

function jwplayermycode_deactivate() {
    
}

function jwplayermycode_run($content) {
    $content = preg_replace("/\[video](.*?)\[\/video\]/si", "<object><embed src='./jwplayer/player.swf' width='530' height='350' allowscriptaccess='always' allowfullscreen='true' flashvars='file=$1'</embed></object>", $content);
    $content = preg_replace("/\[audio](.*?)\[\/audio\]/si", "<object><embed src='./jwplayer/player.swf' width='470' height='20' allowscriptaccess='always' allowfullscreen='true' flashvars='file=$1'</embed></object>", $content);
    
    return $content;
}

?>
biz buradaki <embed src='./jwplayer/player.swf' width='530' height='350' allowscriptaccess='always' allowfullscreen='true' flashvars='file=$1'</embed> kodunu nasil düzenleriz.

PHP Kod:
<script type='text/javascript' src='swfobject-2.2.js'></script>

<div id='mediaplayer'></div>

<script type="text/javascript">

   var flashvars = {
      'file':   '/videos/bunny.mp4',
      'image':  '/thumbs/bunny.jpg',
      'plugins':        'captions-2',
      'captions.back':  'false',
      'captions.file':  '/captions/bunny.txt'
   };
    
   var params = {
      'allowfullscreen':        'true',
      'allowscriptaccess':      'always'
   };
 
   var attributes = {
      'id':                     'playerID',
      'name':                   'playerID'
   };

   swfobject.embedSWF('player.swf', 'mediaplayer', '480', '270', '9', 'false', 
       flashvars, params, attributes);
    
</script> 

seklinde nasil duzenleriz