News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

como agregar post, topics y ultimo mensaje

Started by ZonaGames, May 27, 2025, 11:54:44 PM

Previous topic - Next topic

ZonaGames

hola quisiera saber como hacer que aparezca el total de topics, posts y ultimo mensaje como se ve en la imagen

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

ahorita se ve asi


si alguien sabe una solucion porfavor muchas gracias

Diego Andrés

Las imágenes son iguales, a qué te refieres exactamente?

SMF Tricks - Free & Premium Responsive Themes for SMF.


Diego Andrés

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.

SMF Tricks - Free & Premium Responsive Themes for SMF.

ZonaGames

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



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 -->';

Diego Andrés

Vale, lo trato de revisar mañana en cuanto tenga un tiempo libre.
Espero que no sea un cambio demasiado drástico.

SMF Tricks - Free & Premium Responsive Themes for SMF.

ZonaGames

okay amigo estare pendiente manana a ver si lograste hacer algo muchas gracias

Diego Andrés

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;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

ZonaGames

#8
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




logre centrarlo y que quedara bien ordenado.



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



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


Advertisement: