¡Bienvenido! ¿Aún no estás registrado?, deberás registrarte antes de poder usar el Chat, Comentar y Descargar en el Foro. Usa un email válido para la activación.
Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5

COMPLEMENTOS Posts ordenados alfabéticamente
#1

0
Captura GIF
[img]Registrate o inicia tu sesión para ver este contenido[/img]


En c.posts.php --> inc --> class --> c.posts.php

Buscar:
function getLastPosts($category NULL$subcateg NULL$sticky false


Reemplazar por:
function getLastPosts($category NULL$subcateg NULL$sticky false$a false


Buscar:
$posts['total'] = $q1[0];
                            
//
       
$start $tsCore->setPageLimit($tsCore->settings['c_max_posts'],false,$posts['total']);
       
$lastPosts['pages'] = $tsCore->getPages($posts['total'], $tsCore->settings['c_max_posts']);
      } 

  
Debajo agregar:    
if($a)
  
$s_order 'p.post_title'


Buscar:
GROUP BY p.post_id ORDER BY '.$s_order.' DESC 


Reemplazar por:
GROUP BY p.post_id ORDER BY '.$s_order.' '.(empty($a) ? "DESC" : "ASC").' 


En posts.php --> php --> class --> posts.php

Buscar:
$category $_GET['cat']; 


Debajo agregar:    
$a = (int)$_GET['a']; 


Buscar:
$tsLastPosts $tsPosts->getLastPosts($category$subcateg); 


Reemplazar por:
$tsLastPosts $tsPosts->getLastPosts($category$subcategfalse$a);
$smarty->assign("tsAlf"$a); 


En head_submenu.tpl  --> themes --> default --> templates --> sections --> head_submenu.tpl

Buscar:
<li{if $tsPage == 'home' || $tsPage == 'portal'} class="here"{/if}><class=vctip   title="Inicio" href="{$tsConfig.url}/{if $tsPage == 'home' || $tsPage == 'posts'}posts/{/if}">Inicio</a></li>
                    <
li{if $tsPage == 'buscador'} class="here"{/if}><class=vctip title="Buscador" href="{$tsConfig.url}/buscador/">Buscador</a></li


Reemplazar por:
<li{if ($tsPage == 'home' || $tsPage == 'portal') && $tsAlf == 0} class="here"{/if}><class=vctip  title="Inicio" href="{$tsConfig.url}/{if $tsPage == 'home' || $tsPage == 'posts'}posts/{/if}">Inicio</a></li>
                    <
li{if $tsPage == 'buscador'} class="here"{/if}><class=vctip title="Buscador" href="{$tsConfig.url}/buscador/">Buscador</a></li>
                    <
li{if $tsAlf == 1} class="here"{/if}><class=vctip title="Ordenar alfab&eacute;ticamente" href="{$tsConfig.url}/posts/?a=1">Ordenar alfab&eacute;ticamente</a></li

 
En m.home_last_posts  --> themes --> default --> templates --> modules --> m.home_last_posts

Buscar:
{if $tsPosts}
                            {foreach 
from=$tsPosts item=p}
                            <
li class="categoriaPost" style="{if $p.post_status == 3} background-color:#f1f1f1; {elseif $p.post_status == 1}background-color:coral;{elseif $p.post_status == 2} background-color:rosyBrown;{elseif $p.user_activo == 0} background-color:burlyWood;{elseif $p.user_baneado == 1} background-color:orange;{/if}" ><img src="{$tsConfig.tema.t_url}/images/icons/cat/{$p.c_img}title="{$p.c_nombre}alt="{$p.c_nombre}style="width: 26px; height:32px; float: left;">
                                <
{if $p.post_status == 3}class="qtip" title="El post est&aacute; en revisi&oacute;n"{elseif $p.post_status == 1}class="qtip" title="El post se encuentra en revisi&oacute;n por acumulaci&oacute;n de denuncias"{elseif $p.post_status == 2}class="qtip" title="El post est&aacute; eliminado"{elseif $p.user_activo == 0}class="qtip" title="La cuenta del usuario est&aacute; desactivada"{elseif $p.user_baneado == 1}class="qtip" title="La cuenta del usuario est&aacute; suspendida"{/if} class="title {if $p.post_private}categoria privado{/if}" alt="{$p.post_title}title="{$p.post_title}target="_self" href="{$tsConfig.url}/posts/{$p.c_seo}/{$p.post_id}/{$p.post_title|seo}.html"><h1 style="font-size: 14px;font-weight: bold; margin-top: 0px;">{$p.post_title|truncate:50}</h1></a

                               
Debajo agregar:    
{if $tsAlf}
                                {
php}
                                
$l strtoupper(substr($this->get_template_vars("p")['post_title'], 01));
                                
$this->assign('letra'$l);
                                 {/
php}
 <
span class="floatR" style="margin-top:-17px"><font color="#005CA5">{$letra}</font></span>
                                {/if} 




Creditos: Debes agradecer para ver el contenido...
Responder


Compartir en:

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)