Autor Tema: SMF agregar boton youtube  (Leído 1436 veces)

Desconectado Viktor

  • PHPerit@
  • *
  • Mensajes: 19
  • Karma: 0
  • Sexo: Masculino
    • Ver Perfil
    • Mundo Torneos
SMF agregar boton youtube
« en: 25 de Junio de 2008, 02:49:31 am »
Bueno esque me gustaria agregar un boton de youtube...

Sin Mods xk lo uniko k hacen es jo.. el foro

Entonces en mi foro se puede poner de la siguiente forma:

Citar
[html ]<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/gT7wuWwxfUA&hl"></param><embed src="http://www.youtube.com/v/gT7wuWwxfUA&hl" type="application/x-shockwave-flash" width="425" height="344"></embed></object>[/html ]

Lo que me gustaria es hacer un boton que te pida solo la ID del video en este caso gT7wuWwxfUA&hl

entonces seria crear un boton que te pida la id y cree esto:

Citar
[html ]<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ID DEL VIDEO"></param><embed src="http://www.youtube.com/v/ID DEL VIDEO" type="application/x-shockwave-flash" width="425" height="344"></embed></object>[/html ]

Haber si me podeis ayudar... k estoy muy verde en este tema ;)


Comunidad PHPeros

SMF agregar boton youtube
« en: 25 de Junio de 2008, 02:49:31 am »

Desconectado x.mara.x

  • PHPero Master
  • ******
  • Mensajes: 1.364
  • Karma: 57
  • Sexo: Femenino
    • Ver Perfil
Re: SMF agregar boton youtube
« Respuesta #1 en: 27 de Junio de 2008, 20:37:26 pm »
Pues a ver, supongo que sabes crear un area de texto y un botón, entonces digamos que el boton se llame "buscar" y el area de texto se llame "id" ..
<?php

// Código de formulario

if(isset($_POST[&#39;buscar&#39;])) { // Si han pulsado el botón

$id $_POST[&#39;id&#39;]; // Guardamos una variable llamada $id con el valor que han puesto en la area de texto llamada "id"

// Luego tu código
[html ]<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/<?=$id ?>"></param><embed src="http://www.youtube.com/v/<?=$id ?>" type="application/x-shockwave-flash" width="425" height="344"></embed></object>[/html ]

}
?>

Por cierto "=" en este caso substituye el "echo". No se si funcionaría así, hasta lo que yo tengo entendido si pero no lo e provado. Espero haber ayudado.
« Última modificación: 28 de Junio de 2008, 00:43:15 am por x.mara.x »

Desconectado Viktor

  • PHPerit@
  • *
  • Mensajes: 19
  • Karma: 0
  • Sexo: Masculino
    • Ver Perfil
    • Mundo Torneos
Re: SMF agregar boton youtube
« Respuesta #2 en: 27 de Junio de 2008, 23:01:31 pm »
Tranquilo se hacerlo ;D

Muchísimas gracias ;)


Desconectado x.mara.x

  • PHPero Master
  • ******
  • Mensajes: 1.364
  • Karma: 57
  • Sexo: Femenino
    • Ver Perfil
Re: SMF agregar boton youtube
« Respuesta #3 en: 28 de Junio de 2008, 18:59:27 pm »
de nada =)

Desconectado Viktor

  • PHPerit@
  • *
  • Mensajes: 19
  • Karma: 0
  • Sexo: Masculino
    • Ver Perfil
    • Mundo Torneos
Re: SMF agregar boton youtube
« Respuesta #4 en: 08 de Julio de 2008, 16:06:40 pm »
Puff me he puesto hoy y se agregar el boton pero no se donde poner la funcion :embarassed: