Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/12/2010, 13:08
SeRuJiN1
 
Fecha de Ingreso: febrero-2010
Mensajes: 4
Antigüedad: 14 años, 2 meses
Puntos: 0
Adaptar un BBC a una funcion

Alguien sabria adaptar este bbc de Smf :

Código:
array(
				'tag' => 'spoiler',
				'before' => '<script>function ventanaSecundaria(){t=11;timer=window.setInterval("contador()",1000);hija=window.open("http://www.buugly.com/images.php","ventana1","width=640,height=425,scrollbars=0")}function contador(){if(hija!=null){if(hija.closed){alert("Pulse en esta imagen");clearInterval(timer);t=10;document.getElementById("contador").value="Mostrar Spoiler";return}if(hija.frames.length!=3){t=t-1;if(t<=0){clearInterval(timer);document.getElementById("hide").style.display="";t="spoiler"}document.getElementById("contador").value=t;return false}}}</script><div style="margin:20px; margin-top:5px"><div class="smallfont" style="margin-bottom:2px"><b></b></i> <p class="Boton BtnGreen"><input type="button" id="contador" value="Mostrar Spoiler" style="width:300px;height=35px;font-weight:bold;font-size:16px;margin:0px;padding:0px;" onClick=ventanaSecundaria()></div><div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"><div id="hide" style="display: none;"></p>',
				'after' => '</div></div></div>',
				'block_level' => true,
            ),
A este codigo:

Código:
public static function parseTagFlash(array $tag, array $rendererStates, &$parentClass)
	{
		if (!empty($tag['option']) && $parentClass->parseMultipleOptions($tag['option']))
		{
			$attributes = $parentClass->parseMultipleOptions($tag['option']);
			$attributes['width'] = $attributes[0];
			$attributes['height'] = $attributes[1];
			
			$src = $tag['children'][0];
		}
		else
		{
			$attributes['width'] = '550';
			$attributes['height'] = '400';
			$src = $tag['children'][0];
		}
		return '<object width="' . $attributes['width'] . '" height="' . $attributes['height'] . '">
						<param name="movie" value="' . $src . '">
							<embed src="' . $src . '" width="' . $attributes['width'] . '" height="' . $attributes['height'] . '">
							</embed>
					</object>';
	}