1)Vamos al
Subs.php y buscamos
array(
'tag' => 'u',
'before' => '<span style="text-decoration: underline;">',
'after' => '</span>',
),
agregamos abajo
array(
'tag' => 'facebook',
'type' => 'unparsed_content',
'content' => '<object width="576" height="460" ><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="never" /><param name="movie" value="$1" /><embed src="$1" type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" width="576" height="460"></embed></object>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled['url']))
$tag['content'] = '$1';
global $context;
if (preg_match('~([a-z0-9]{1,15})~i'.($context['utf8'] ? 'u' : ''), $data[0], $matches))
$data[0] = $matches[1];
else
$tag['content'] = '$1';
'),
'block_level' => true,
'disabled_content' => '$1'
),
Luego en el
acciones-sp-1.1.js buscamos
{name:'Citar', beforeInsert:function(h){ markit_quote(h); }}
y lo cambiamos por
{name:'Citar', beforeInsert:function(h){ markit_quote(h); }},
{name:'Insertar video de Facebook', beforeInsert:function(h){ markit_fb(h); }}
NOTA IMPORTANTE: Si no agregaron ningun bbc mas a su script, tiene que estar como en el tuto. Si agregaron alguno solo deben fijarse en la ultima linea que seguro terminan usando una
} solo deben agregarle una coma
, para poder seguir agregando codigo abajo (solo se pone una
, por linea para seguir escribiendo abajo)
tambien en ese mismo archivo buscamos
h.closeWith='[/quote]';
}
}
y agregamos abajo
function markit_fb(h){
if(is_ie)
var msg = prompt('', '');
else
var msg = prompt('Ingrese la URL del video de Facebook.com:
', '');
if(msg != null){
h.replaceWith = '[facebook]' + msg + '[/facebook]
';
h.openWith = '';
h.closeWith = '';
}else{
h.replaceWith = '';
h.openWith = '';
h.closeWith = '';
}
}
por ultimo solo queda agregar el boton en el
estilos-sp.cssdespues de
.markItUp .markItUpButton15 a, .markitcomment .markItUp .markItUpButton9 a{background:transparent url('images/icons/bbcode.gif') no-repeat scroll left top;background-position:left -160px;height:10px;}
agregamos
.markItUp .markItUpButton16 a{background:transparent url('images/icons/facebook.gif') no-repeat scroll left top;background-position:left -0px;height:10px;}
¿Como hago entonces para agregar un video del face?
[facebook]http://www.facebook.com/v/video_id[/facebook]
¿Cual es el video_id de facebook?

Entonces se agrega asi
[facebook]http://www.facebook.com/v/1424970862133[/facebook]
Y como resultado obtenemos

Mensaje Unido: Noviembre 02, 2010, 02:47:58 pm
Me olvidaba, la imagen se sube en
images/icons/