News:

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

Main Menu

Mejorar la presentacion resultados SSI.PHP - Recent Topics

Started by cz99, September 01, 2014, 03:24:52 PM

Previous topic - Next topic

cz99

Ya pude instertar el codigo en mi wordpress  8)  Ahora necesito una ayuda para mejorar la visulizacion, uso de tablas, letras, etc.

Si alguien me puede decir como arreglo las tablas de resultado del ssi.php - se lo agradesco.



Mariano :.
Mariano :.
El Pisco es Peruano.
visiten: www.tirodefensivoperu.com

cz99

Otra vez solucionado:

Buscar:

function ssi_recentTopics

Mas o menos en la Linea  520

// Just return it.

if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="1" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt['by'], ' ', $post['poster']['link'], '
', !$post['is_new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><img src="' . $settings['lang_images_url'] . '/new.gif" alt="' . $txt['new'] . '" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';





Cambiar por:


if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="1" class="ssi_table_1_1_1" style="font-size:10px" >
<tr style="font-size:10px" bgcolor="#D1D1E0">
<th></th>
<th align="left">Ultimos post del foro</th>
<th>Autor</th>
<th>Visto</th>
<th>Publicado en:</th>
</tr>';
foreach ($posts as $post)
echo '


<tr>
<td align="center" valign="middle" nowrap="nowrap" width="30px">
', $post['icon'], '
</td>
<td align="left" valign="middle" nowrap="nowrap" width="420px">
<a href="', $post['href'], '">', $post['subject'], '</a>
</td>
<td align="left" text-align="justify"v valign="middle" nowrap="nowrap" width="120px">
', $txt['by'], ' ', $post['poster']['link'], '<br />
', $post['time'], '
</td>

<td align="center" valign="middle" nowrap="nowrap" width="35px">
', $post['views'], '
</td>
<td valign="middle" width="120px" valign="middle">
', $post['board']['link'], '


</td>

</tr>';
echo '
</table>';



No se mucho de programacion, pero se que me quedo bien !!!!



Saludos,



Mariano :.

Mariano :.
El Pisco es Peruano.
visiten: www.tirodefensivoperu.com

Suki

Es preferible no modificar directamente tu archivo SSI.php

La mayoría de funciones en ese archivo te permite devolver el resultado como un array para así poder aplicar tu propio código HTML sin tener que modificar directamente el archivo:

$resultado = ssi_recentTopics($parametros aqui);

print_r($resultado);

$resultado ahora contiene un array con toda la información, para mostrarla haces un foreach:

foreach($resultado as $r)
{
  echo '$r['icon']; etc, etc
}

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

cz99

Gracias ! la verdad no se mucho de programacion, ando a tientas.

Tenia un portal con MKPortal en mi foro, ahora he cambiado a wordpress y estoy aprendiendo. Nuevamente gracias por el consejo.


Mariano :.
Mariano :.
El Pisco es Peruano.
visiten: www.tirodefensivoperu.com

Advertisement: