Author Topic: Thumbnail next to name category HELP!  (Read 3641 times)

0 Members and 1 Guest are viewing this topic.

Offline max99911

  • Pre-Newbie
  • Posts: 2
    • View Profile
Thumbnail next to name category HELP!
« on: February 11, 2013, 01:49:44 AM »
PL: Witam, jak zrobić, aby zamiast ikonki folderów obok nazwy kategorii pokazać losowe zdjęcie, właśnie z tej kategorii?? Próbowałem na wszystkie sposoby, ale już nie mam pomysłów jak temu zaradzić. Moja wizja : xxx: i49. tinypicxxx: /cndxw. png Pozdrawiam!

EN: Hi, how to do that instead of the folder icon next to the category name to show random thumbnail is in this category? My vision: xxx: i49. tinypicxxx: /cndxw. png Thank you for your help

http://i49.tinypic.com/cndxw.png

Rembrandt

  • Guest
Re: Thumbnail next to name category HELP!
« Reply #1 on: February 11, 2013, 04:24:04 AM »

Offline max99911

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Thumbnail next to name category HELP!
« Reply #2 on: February 11, 2013, 11:58:24 AM »
It does not work.

includes/constanst.php
Code: [Select]
// If you have a lot of images in your database,
// the random image function could make your programm slow.
// Try first to set "SHOW_RANDOM_CAT_IMAGE" to 0.
define('SHOW_RANDOM_IMAGE', 1);
define('SHOW_RANDOM_CAT_IMAGE', 1);

category_bit.html
Code: [Select]
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">

       {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}
{if sub_cats}{sub_cats}{endif sub_cats}

 :(