News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ayuda a añadir un codigo a un BoardIndex.template

Started by ^SoporteGSM^, August 15, 2020, 10:00:29 AM

Previous topic - Next topic

^SoporteGSM^

No encuentro la modificacion a hacer en el archivo, me ayudan por favor?

ENCONTRAR
Quote/* Each board in each category's boards has:
         new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
         children (see below.), link_children (easier to use.), children_new (are they new?),
         topics (# of), posts (# of), link, href, and last_post. (see below.) */
         foreach ($category['boards'] as $board)
         {
            echo '
            <tr id="board_', $board['id'], '" class="windowbg2">
               <td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
                  <a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';

            // If the board or children is new, show an indicator.
            if ($board['new'] || $board['children_new'])
               echo '
                     <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
               echo '
                     <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
            // No new posts at all! The agony!!
            else
               echo '
                     <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '
                  </a>
               </td>

REEMPLAZAR

/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>

Danielㅤ


^SoporteGSM^


Danielㅤ

Yo hay algo que no entiendo, siempre abris foros distintos con distintos dominios y usas los mismos mods.... Pero si siempre usas los mismos mods deberías ya saber cómo solucionar esos problemas porque tus dudas/problemas son siempre los mismos.

En cuanto a ese mod, yo te recomiendo el Board Icons:

https://custom.simplemachines.org/mods/index.php?mod=3604

Ese es mejor que el que vos querés instalar y más fácil su instalación, después hay otros mods similares como uno de SMFPersonal que si no mal recuerdo se llama Adk Icons Forums o Adk Board Icons Forum.
En el caso que quieras instalar el de SMF Personal, podes pedirle a RockLee que te pase ese mod ya que él tiene mucho material recopilado/salvado de SMFPersonal.


Saludos

-Rock Lee-

Es sencillo ubicar dicha linea del mismo ya que te podes guiar por los comentarios pero los salto de linea tenes son raros, tenes ver lado hosting si es lo que te esta aplicando estos saltos... Por ese motivo puede ser tengas problemas al instalar modificaciones igualmente proba con el que te adjunto.


Saludos!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Advertisement: