aqui le traigo un codigo para que la lista tambien pueda aparecer por letras o numeros
Instalacion
en la plantilla colocar asi las letras : ejemplo
1. Abrir engine/ engine.php
} elseif ($catalog != "") {
Añadir Antes:
} elseif ($catalog != "" and $_GET['n']) {
// ################ The output of alphabetic identifier N #################
if ($cstart) {
$cstart = $cstart - 1;
$cstart = $cstart * $config['news_number'];
}
$newsmodule = true;
$url_page = $config['http_home_url'] . "cat/" . urlencode ( $catalog );
$user_query = "cat=" . urlencode ( $catalog );
$news_sort_by = ($config['catalog_sort']) ? $config['catalog_sort'] : "date";
$news_direction_by = ($config['catalog_msort']) ? $config['catalog_msort'] : "DESC";
if (isset ( $_SESSION['dle_sort_catalog'] )) $news_sort_by = $_SESSION['dle_sort_catalog'];
if (isset ( $_SESSION['dle_direction_catalog'] )) $news_direction_by = $_SESSION['dle_direction_catalog'];
$sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, xfields, title, category, alt_name, comm_num, allow_comm, allow_main, approve, fixed, allow_br, symbol, tags FROM " . PREFIX . "_post WHERE {$stop_list}title LIKE '$catalog%' AND approve" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number'];
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post WHERE {$stop_list}title LIKE '$catalog%' AND approve" . $where_date;
} elseif ($catalog != "" and !$_GET['n']) {
2. Abrir .htaccess
Buscar:
RewriteRule ^catalog/([^/]*)(/?)+$ index.php?catalog=$1 [L]
RewriteRule ^catalog/([^/]*)/page/([0-9]+)(/?)+$ index.php?catalog=$1&cstart=$2 [L]
Agrege despues:
# output to a directory
RewriteRule ^letra/([^/]*)(/?)+$ index.php?catalog=$1&n=1 [L]
RewriteRule ^letra/([^/]*)/page/([0-9]+)(/?)+$ index.php?catalog=$1&cstart=$2&n=1 [L]
listo
0 comentarios:
Publicar un comentario