Simple Machines Community Forum

SMF Support => Español (Spanish) => Language Specific Support => Temas y Diseño (Themes) => Topic started by: ZonaGames on May 27, 2025, 11:54:44 PM

Title: como agregar post, topics y ultimo mensaje
Post by: ZonaGames on May 27, 2025, 11:54:44 PM
hola quisiera saber como hacer que aparezca el total de topics, posts y ultimo mensaje como se ve en la imagen(https://i.imgur.com/GXcpd8D.png)

uso el theme envy de Mick pero por lo que veo no dio mas soporte en años,

ahorita se ve asi
(https://i.imgur.com/Aw6Zfzz.png)

si alguien sabe una solucion porfavor muchas gracias
Title: Re: como agregar post, topics y ultimo mensaje
Post by: Diego Andrés on May 28, 2025, 12:11:32 AM
Las imágenes son iguales, a qué te refieres exactamente?
Title: Re: como agregar post, topics y ultimo mensaje
Post by: ZonaGames on May 28, 2025, 12:20:39 AM
disculpa ya lo arregle
Title: Re: como agregar post, topics y ultimo mensaje
Post by: Diego Andrés on May 28, 2025, 12:21:39 AM
Entiendo. Eso tendría que ver con el tema (Theme) que estés utilizando, quizás deberías revisar con el autor en el tema de soporte.

Si dejas más detalles te podría ofrecer ayuda más específica.
Title: Re: como agregar post, topics y ultimo mensaje
Post by: ZonaGames on May 28, 2025, 12:25:38 AM
si ya trate de contactar atraves del soporte del theme pero lo que veo es que hace 2 años que no entra al foro lo que quiero exactamente es esto

(https://i.imgur.com/ipwjLlt.png)

ya que en el theme envy no lo trae
podria compartir el codigo

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>';

echo '
', $category['link'], '
</h3>', !empty($category['description']) ? '
<div class="desc">' . $category['description'] . '</div>' : '', '
</div>
<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>
<div class="section-header">
<div class="board_header1">Board name</div>
</div>
<div class="board_flex_row">';

/* 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 '
<div class="board_flex">
<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : ''), '">
<div class="board_icon">
', function_exists('template_bi_' . $board['type'] . '_icon') ? call_user_func('template_bi_' . $board['type'] . '_icon', $board) : template_bi_board_icon($board), '
</div>
<div class="info">
', function_exists('template_bi_' . $board['type'] . '_info') ? call_user_func('template_bi_' . $board['type'] . '_info', $board) : template_bi_board_info($board), '
</div><!-- .info -->';

// Show the last post if there is one.
echo'
<div class="board_flex">
  <div class="child_box child_border">
<div class="lastpost2">
', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), '
</div>';

// Show some basic information about the number of posts, etc.
echo '
<div class="board_stats">
', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), '
</div>


</div><!-- .child_box -->
</div><!-- .board_flex -->';

// Won't somebody think of the children!
if (function_exists('template_bi_' . $board['type'] . '_children'))
call_user_func('template_bi_' . $board['type'] . '_children', $board);
else
template_bi_board_children($board);

echo '
    </div><!-- #board_[id] -->
</div><!-- .board_flex -->';
}

echo '
    </div><!-- .board_flex_row -->
</div><!-- #category_[id]_boards -->
</div><!-- .board_background -->
</div><!-- .main_container -->';
}

echo '
</div><!-- #boardindex_table -->';
Title: Re: como agregar post, topics y ultimo mensaje
Post by: Diego Andrés on May 28, 2025, 12:47:35 AM
Vale, lo trato de revisar mañana en cuanto tenga un tiempo libre.
Espero que no sea un cambio demasiado drástico.
Title: Re: como agregar post, topics y ultimo mensaje
Post by: ZonaGames on May 28, 2025, 12:56:00 AM
okay amigo estare pendiente manana a ver si lograste hacer algo muchas gracias
Title: Re: como agregar post, topics y ultimo mensaje
Post by: Diego Andrés on May 28, 2025, 10:34:58 PM
Themes/Envy/BoardIndex.template.php
Code (Buscar) Select
<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>
<div class="board_flex_row">';

/* 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 '
<div class="board_flex">
<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : ''), '">
<div class="board_icon">
', function_exists('template_bi_' . $board['type'] . '_icon') ? call_user_func('template_bi_' . $board['type'] . '_icon', $board) : template_bi_board_icon($board), '
</div>
<div class="info">
', function_exists('template_bi_' . $board['type'] . '_info') ? call_user_func('template_bi_' . $board['type'] . '_info', $board) : template_bi_board_info($board), '
</div><!-- .info -->';

// Show the last post if there is one.
echo'
<div class="board_flex">
  <div class="child_box child_border">
<div class="lastpost2">
', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), '
</div>';

// Show some basic information about the number of posts, etc.
echo '
<div class="board_stats2">
', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), '
</div>
</div><!-- .child_box -->
</div><!-- .board_flex -->';

// Won't somebody think of the children!
if (function_exists('template_bi_' . $board['type'] . '_children'))
call_user_func('template_bi_' . $board['type'] . '_children', $board);
else
template_bi_board_children($board);

echo '
    </div><!-- #board_[id] -->
</div><!-- .board_flex -->';
}

echo '
    </div><!-- .board_flex_row -->
</div><!-- #category_[id]_boards -->
Code (Reemplazar) Select
<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>';

/* 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 '
<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : ''), '">
<div class="board_icon">
', function_exists('template_bi_' . $board['type'] . '_icon') ? call_user_func('template_bi_' . $board['type'] . '_icon', $board) : template_bi_board_icon($board), '
</div>
<div class="info">
', function_exists('template_bi_' . $board['type'] . '_info') ? call_user_func('template_bi_' . $board['type'] . '_info', $board) : template_bi_board_info($board), '
</div><!-- .info -->';

// Show some basic information about the number of posts, etc.
echo '
<div class="board_stats">
', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), '
</div>';

// Show the last post if there is one.
echo'
<div class="lastpost">
', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), '
</div>';

// Won't somebody think of the children!
if (function_exists('template_bi_' . $board['type'] . '_children'))
call_user_func('template_bi_' . $board['type'] . '_children', $board);
else
template_bi_board_children($board);

echo '
</div><!-- #board_[id] -->';
}

echo '
</div><!-- #category_[id]_boards -->

Y agregar esto al final de Themes/Envy/css/index.css
.board_background .up_contain > .lastpost {
margin: 0 !important;
}
.up_contain > .children.child_box {
display: block;
}
Title: Re: como agregar post, topics y ultimo mensaje
Post by: ZonaGames on May 28, 2025, 11:09:34 PM
hola amigo gracias pude agregarlo asi te muestro como se ve ya me tocaria mover el index.css para cambiar un poco el diseno cambiaria un poco mas centrado que como en la imagen se ve en cada foro se ve uno mas atras que otro

(https://i.imgur.com/YQckHvC.png)
(https://i.imgur.com/wea7KfL.png)

logre centrarlo y que quedara bien ordenado.
(https://i.imgur.com/ah2ccK9.png)


pero al momento de usarlo responsive en celular se ve asi quisiera ocultarlo en responsive

(https://i.imgur.com/nHKWB9g.png)

otra cosa que quisiera arreglar seria como hago para que esten en diferentes tablas que sean 2 1 de topics y una de posts

(https://i.imgur.com/dSvSp48.png)