Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/03/2009, 18:20
Chuecko
 
Fecha de Ingreso: junio-2008
Mensajes: 119
Antigüedad: 15 años, 10 meses
Puntos: 1
Respuesta: Funcion utils_kexplode(), que hace?

Bueno me contesto a mi mismo, hay que modificar la linea de esta funcion por esta para poder embeber los videos de youtube y el codigo quedaria mas o menos asi...

utils_kexplode() --> $query=$vurl['query'];

Código PHP:
 function do_bbcode_video($action$attr$content$params$node_object) {

                        if (
$action=='validate') {
                            return 
true;
                        }


                        
$vurl parse_url($attr['default']);

                        if (isset(
$attr['type'])) {
                            
$type $attr['type'];
                        } else {

                            
// is it http://www.MYSITE.com  or http://MYSITE.com ?
                            
$web explode('.'$vurl['host']);
                            
array_pop($web);
                            
$type = isset($web[1])? $web[1] : $web[0];

                        }

//                        $query = utils_kexplode($vurl['query'], '=&');
                        
                        
$query=$vurl['query'];
                        
                        
$the_url null;
                        
$others '';
                        switch (
$type) {
                            case 
'google':
                                
$the_url "http://video.google.com/googleplayer.swf?docid={$query['docid']}";
                                
$others '<param name="FlashVars" value="playerMode=embedded" />';
                                break;
                            case 
'youtube':
                                
//$the_url = "http://youtube.com/v/{$query['v']}";
                                
$youtube_url=substr($query2);
                                
$the_url "http://youtube.com/v/{$youtube_url}";
                                break;
                            case 
'default':
                                
$the_url null;
                        }

                        if (
$the_url) {

                            
$width = isset($attr['width'])? $attr['width'] : '400';
                            
$height = isset($attr['height'])? $attr['height'] : '326';
                            
$float = isset($attr['float'])? "float: {$attr['float']}" '';


                            return
                                
'<center><object type="application/x-shockwave-flash" '.
                                
"height=\"$height\" width=\"$width\"".
                                
'style="' $float.    '" data="' .
                                
$the_url '"><param name="movie" value="' $the_url '" />'
                                
$others '</object></center>';
                        }

                        return 
'<center>[Video no soportado]</center>';

                    } 
Espero que le sirva a alguien, Saludos...