Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Padekit su megavideo

Parašė luxis112· 2010 Bir. 13 22:06:26
#1

Na stai va turiu puslapi ir noriu ideti klipus filmus is megavideo kadangi toks kaip youtube tik 10 min telpa taigi turiu koda skaitykim is megavideo ( kodas apacioje ) bet ji idetu neregoje zinau kat pwz su youtube tai irgi toki koda ideti tarp spiceliu skliaustu bbcode ar kaip ten skaitos tai va galkas galit padet ar pasakyt iskur gauti ta bbcode as buvau intike rades kaska kur tipo toki sukurti bet nesigavo neko nesupratau tai tikiosi paaiskinimo zaliam nes as nelabai gaudaus da iskart didelis DEKUI :?

<object width="425" height="350">
<param name="movie" value="http://www.megavideo.com/v/{param}7922083514b4200acc4b4bdf8b3550684.6085990840.0"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.megavideo.com/v/{param}7922083514b4200acc4b4bdf8b3550684.6085990840.0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>



Redagavo luxis112· 2010 Bir. 13 22:06:24

Parašė luxis112· 2010 Bir. 13 23:06:51
#2

o gal sitas gali padeti tik pasakykit kaip sita plugina irasyt skaiciau tipo jis kaip youtube bbcode wiskas taip pat bet nezinau kaip ji irasyti
kur ikelti ir pns
<?php
// Initialize plugin
plugin_add_hook("BBCODE2HTML", "plugin_megavideo_tag_to_html");
plugin_add_hook("HTML2BBCODE", "plugin_megavideo_html_to_tag");

// Convert [megavideo] to html code (post message)
function plugin_megavideo_tag_to_html($array) {
   list($bbcode) = $array;

   $bbcode = preg_replace('#\[MEGAVIDEO\]([0-9a-zA-Z_\-]+)\[/MEGAVIDEO\]#si', '<object width="640" height="480"><param name="movie" value="http://wwwstatic.megavideo.com/mv_player.swf?v=\\1"></param><embed src="http://wwwstatic.megavideo.com/mv_player.swf?v=\\1" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="480"></embed></object>', $bbcode);
   return array($bbcode);
}

// Convert html to [MEGAVIDEO] tag (edit message)
function plugin_megavideo_html_to_tag($array) {
   list($bbcode) = $array;

   $bbcode = preg_replace('#<object width="640" height="480"><param name="movie" value="http://wwwstatic.megavideo.com/mv_player.swf\?v=([0-9a-zA-Z_\-]+)"></param><embed src="http://wwwstatic.megavideo.com/mv_player.swf\?v=([0-9a-zA-Z_\-]+)" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="480"></embed></object>#si', '[MEGAVIDEO]\\1[/MEGAVIDEO]', $bbcode);
   return array($bbcode);
}