June 21, 2011 - 12:30 12:30
Bueno esta idea la vi en stickplays web de diegorixo y muchos me estuvieron preguntando como era a si que aca se los dejo.
TODO LO MODIFICADO ES EN EL INDEX.TEMPLATE.PHP
Buscamos :
template_menu();
Agregamos abajo:
<div id="colores">';
if ($context['theme_variant'] != "_rosa")
echo '<a style="height:5px;width:10px;background-color:#F380FC;border:1px solid #000;display:inline;float:left;margin-right: 2px;" href="?variant=rosa"></a>';
if ($context['theme_variant'] != "_azul")
echo '<a style="height:5px;width:10px;background-color:#3E9BF7;border:1px solid #000;display:inline;float:left;margin-right: 2px;" href="?variant=azul"></a>';
if ($context['theme_variant'] != "_verde")
echo '<a style="height:5px;width:10px;background-color:#93FB32;border:1px solid #000;display:inline;float:left;margin-right: 2px;" href="?variant=verde"></a>';
echo '
</div>';
Despues buscamos:
<head>';
de bajo agregamos:
// The ?fin20 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?fin20" />';
// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7', 'ie6', 'webkit') as $cssfix)
if ($context['browser']['is_' . $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/', $cssfix, '.css" />';
Luego buscamos:
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}
de bajo agregamos:
/* Theme changer */
$settings['theme_variants'] = array('rosa', 'azul', 'verde');
}
Por ultimo en tu css al ultimo pones:
#colores {
float:right;
margin: 5px 10px 0 0;
text-align: center;
}
Recuerden subir sus css a la carpeta css de su theme poniéndola de la siguiente forma:
index_tuthemecolor.css cambian tuthemecolor por el color de su theme si quieren agregar mas colores solo me dicen y les paso el code para que lo agreguen. Dudas,correcciones comentadas