Reply #27 August 10, 2014 - 03:43 15:43
Por nada!
Por cierto, otro aporte que le servirá a aquellos que tengan subforos y quieran mostrar el enlace al indice en el listado (lo cual sería lo optimo, ya que si no quedan "ocultos" y recién se los ve al ingresar en el foro "contenedor"... pasa muy desapercibido)
+ consulta al final
En el BoardIndex.template.php la sección:
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
Pasarla a:
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
{
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
if ($auto_index_view && !$board['is_redirect'])
if (!empty($boards) && in_array($child['id'], $boards))
{
$child['link'] .= ' <a href="'. $scripturl .'?action=autoindex;sa=board;id='. $child['id'] .'" target="_blank"><img width="20" height="20" style="vertical-align:middle" src="'. $settings['default_theme_url'] .'/images/autoindex/auto-index.png" alt="'. $txt['auto_index_title'] .'" title="'. $txt['auto_index_title'] .'" /></a>';
}
if(in_array(0, $boards))
$child['link'] .= ' <a href="'. $scripturl .'?action=autoindex;sa=board;id='. $child['id'] .'" target="_blank"><img width="20" height="20" style="vertical-align:middle" src="'. $settings['default_theme_url'] .'/images/autoindex/auto-index.png" alt="'. $txt['auto_index_title'] .'" title="'. $txt['auto_index_title'] .'" /></a>';
}
else
PD: será algo optimo eso? lo hice hace mucho, para la 2.4... ni idea si será optimo, pero bueno... cumple su cometido, jejeje... si les agrada metanlo para la 3.0.1
Aprovecho para consultar... cómo será lo mejor para sacar los Indices del menú superior?
Me parece que la opción de tenerlos accesibles desde allí no la usaremos (para que no quede muy largo el menú superior, etc)
Llegado el caso podría ser una nueva opción interesante del MOD, que permita seleccionar si mostrarlo en menú o no...