Author Topic: Mostrar una imagen aleatoria en el index en cada categoria.  (Read 4236 times)

0 Members and 1 Guest are viewing this topic.

Offline disacido

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • Rock Nayarit
Mostrar una imagen aleatoria en el index en cada categoria.
« on: October 02, 2006, 02:15:04 AM »
Venga pues ya lo he puesto todo en el asunto ¿Como Mostrar una imagen aleatoria en el index en cada categoria?

Solo texto lo hace ver muy feo :P

En el category_bit.html

Lo he dejado asi:

[qcode]<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
     <img src="{template_url}/images/folder.gif" width="20" height="14" alt="" />
      {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}
    </td>
    <td>
     <a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images})
      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
   </td>
  </tr>
</table>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}[/qcode]

Especialmente esta linea:
[qcode]      {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}[/qcode]

Se encontraba originalmente asi:
[qcode]      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} -->[/qcode]

Segun yo al quitarle las <!-- deberia aparecer pero nada...
Utilizo 4images 1.7.2
http://www.rocknay.com/gallery/
Con un templat completamente modificado.



Si alguien puede ayudarme se lo agradezco.

Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Re: Mostrar una imagen aleatoria en el index en cada categoria.
« Reply #1 on: October 03, 2006, 12:29:53 AM »
Saludos,,,

Localiza en includes/constants.php

Code: [Select]
define('SHOW_RANDOM_CAT_IMAGE', 0);
Cambia a :

Code: [Select]
define('SHOW_RANDOM_CAT_IMAGE', 1);
Cerrar y guardar cambios.

Localizar en templates/tus_plantillas/category_bit.html

Code: [Select]
<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  -->

Cambia a :

Code: [Select]
<!-- <img src="{template_url}/images/folder.gif" width="20" height="13" alt="" /> -->
      {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}

excitex2
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe

Offline disacido

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • Rock Nayarit
Re: Mostrar una imagen aleatoria en el index en cada categoria.
« Reply #2 on: October 03, 2006, 08:06:21 AM »
Muchs gracias por la respuesta excitex2

Suponia que debia ser algo asi, aunque la verdad me sorprende que esta opcion no sea configurable desde el panel de Administrador.

Saludos.