- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Buscar en La Comunidad
Showing results for tags 'fotos'.
Encontramos 2 resultados
-
Mod background depende de pagina(Home, Posts, Fotos, etc) + panel de administración
Miguel92 ha publicado un tema en Complementos terminados
ESTA HECHO Este es un pedido para @KillerJohn 1) Primero ejecutaremos esta consulta o mejor a lo último asi saben en donde lo van a colocar y si van a tener que agregar más consulta CREATE TABLE IF NOT EXISTS `w_background` ( `id` int(11) NOT NULL, `creador` varchar(250) NOT NULL, `home` TEXT NOT NULL, `posts` TEXT NOT NULL, `fotos` TEXT NOT NULL, `admin` TEXT NOT NULL, `alternativa` TEXT NOT NULL ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; INSERT INTO `w_background` (`id`, `creador`,`home`, `posts`, `fotos`, `admin`, `alternativa`) VALUES (1, '@Miguel92', '', '', '', '', 'En el caso que no sean fotos,home,posts, etc'); En el caso que quieran más debajo de `posts` TEXT NOT NULL, agregan esto `*` TEXT NOT NULL, --> donde esta * le agregan el nombre que quieran . luego a lado de `posts`, agregan ``, (1, '@Miguel92', '','', '*', '', ''); asi 2) Ahora vamos a la raiz header.php y buscamos // Nofiticaciones $smarty->assign('tsNots',$tsMonitor->notificaciones); y debajo agregamos // background de home-posts-fotos-etc $smarty->assign('tsBack',$tsCore->backgrounds); 3) Ahora buscamos en inc/class/c.core.php y buscamos $this->settings = $this->getSettings(); y debajo agregamos $this->backgrounds = $this->getBack(); y un poco más abajo buscamos /* getCategorias() */ y abajo pegamos /* getBack() :: @Miguel */ function getBack() { $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT * FROM `w_background`'); return db_exec('fetch_assoc', $query); } 4) En el mismo directorio buscamos inc/class/c.admin.php y antes de la llave } agregaremos esto /* saveBack() by @Miguel92 */ function saveBack() { global $tsCore; // $c = array( 'creador' => $tsCore->setSecure($tsCore->parseBadWords($_POST['creador'])) , 'home' => $tsCore->setSecure($_POST['home']), 'posts' => $tsCore->setSecure($_POST['posts']), 'fotos' => $tsCore->setSecure($_POST['fotos']), 'admin' => $tsCore->setSecure($_POST['admin']), 'alternativa' => $tsCore->setSecure($_POST['alternativa']), ); // UPDATE if (db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `w_background` SET `creador` = \'' . $c['creador']. '\', `home` = \'' . $c['home']. '\', `posts` = \'' . $c['posts']. '\', `fotos` = \'' . $c['fotos'] .'\', `admin` = \'' . $c['admin']. '\', `alternativa` = \'' . $c['alternativa']. '\' WHERE `id` = \'1\'')) return true; else exit( show_error('Error al ejecutar la consulta de la línea '.__LINE__.' de '.__FILE__.'.', 'db') ); } 5) Luego buscamos en inc/php/admin.php y buscamos /** NOTICIAS **/ } elseif($action == 'news'){ y arriba ponemos /** Backgrounds by @Miguel92 **/ }elseif($action == 'fondos'){ // GUARDAR CONTROLES if(!empty($_POST['home'])) { if($tsAdmin->saveBack()) $tsCore->redirectTo($tsCore->settings['url'].'/admin/fondos?save=true'); } 6) Luego buscamos templates/t.admin.tpl y buscamos {elseif $tsAction == 'rangos'} {include file='admin_mods/m.admin_rangos.tpl'} y debajo agregamos {elseif $tsAction == 'fondos'} {include file='admin_mods/m.admin_back.tpl'} 7) Luego vamos a templates/admin_mods y crearemos un archivo llamado ' m.admin_back.tpl ' y allí alojaremos esto <div class="boxy-title"> <h3>Backgrounds para cambios depende de página</h3> </div> <div id="res" class="boxy-content"> {if $tsSave}<div style="display: block;" class="mensajes ok">Las configuraciones han sido guardadas! </div>{/if} <form action="" method="post" autocomplete="off"> <fieldset> <legend>Backgrounds</legend> <!-- COPYRIGHT --> <dl> <dt><label for="creador">Hecho por</label><br /><span>Creado para todos ustedes con amor!.</span></dt> <dd><input type="text" id="creador" name="creador" value="{$tsBack.creador}" /></dd> </dl> <!-- PARA POSTS --> <dl> <dt><label for="posts">Fondo para Posts</label><br /><span>Introduce la URL de fondo que quieres!.</span></dt> <dd><input type="text" id="posts" name="posts" value="{$tsBack.posts}" /></dd> </dl> <!-- PARA FOTOS --> <dl> <dt><label for="fotos">Fondo para Fotos</label><br /><span>Introduce la URL de fondo que quieres!.</span></dt> <dd><input type="text" id="fotos" name="fotos" maxlength="300" value="{$tsBack.fotos}" /></dd> </dl> <!-- PARA ADMIN --> <dl> <dt><label for="admin">Fondo para Admin</label><br /><span>Introduce la URL de fondo que quieres!.</span></dt> <dd><input type="text" id="admin" name="admin" value="{$tsBack.admin}" /></dd> </dl> <!-- PARA ALTERNATIVA --> <dl> <dt><label for="alternativa">Fondo para lo demás</label><br /><span>Introduce la URL de fondo que quieres!.</span></dt> <dd><input type="text" id="alternativa" name="alternativa" value="{$tsBack.alternativa}" /></dd> </dl> <p><input type="submit" name="save" value="Guardar Cambios" class="btn_g"/></p> </fieldset> </form> </div> 8) Luego buscamos en el mismo directorio m.admin_sidemenu.tpl y buscamos <h4>General</h4> y debajo pegamos <h4>Control nuevos</h4> <ul class="cat-list"> <li id="a_configs"><span class="cat-title"><a href="{$tsConfig.url}/admin/fondos">Control background</a></span></li> </ul> <hr> 9) Luego buscamos en templates/sections/main_header.tpl y buscamos <body> y reemplazamos por <body style="background-image: url({if $tsPage == 'home' || $tsPage == 'posts'}{$tsBack.posts}{elseif $tsPage == 'fotos'}{$tsBack.fotos}{elseif $tsPage == 'admin'}{$tsBack.admin}{else}{$tsBack.alternativa}{/if}); background-repeat:no-repeat; background-size:cover; background-color: #000; background-attachment: fixed;"> background-repeat:no-repeat; ---> Para que la imagen no se repita para ningun lado background-size:cover; ---> Esto abarcará toda la pantalla tambien se puede usar background-size: 100% 50%; background-color: #000; ---> El fondo tambien es de color negro background-attachment: fixed; ----> El fondo no se moverá y si quieren van a estilos.css buscan body { y lo agregan alli } igual ya se que la mayoría que conoce esto en html pero hay otros que tal vez no lo conocé Espero que sea esto lo que estabas buscando y también se puede aplicar al LOGO si quieren que sea diferente en cada página... Lamento no haber puesto Caps! Cambios 24/03/2018 * Se agregó "alternativa" en el caso que no sea Administración, Home, Posts o Fotos * Se modificó la línea mal escrita * Se realizo mini-cambios algo el código existente Agregar esta consulta ALTER TABLE `w_background` ADD `alternativa` TEXT NOT NULL AFTER `admin`;- 10 replies
-
- 1
-
-
- intercambiables
- modificables
-
( y %d más)
Etiquetado: