Author Topic: Random Category Images not shown  (Read 5057 times)

0 Members and 1 Guest are viewing this topic.

Offline TerraZone

  • Pre-Newbie
  • Posts: 7
    • View Profile
Random Category Images not shown
« on: September 21, 2009, 07:18:13 PM »
Hey folks,

after I updated my template, I decided to use this random category images thingy which is commented in the default template file.
Unfortunately it doesn't work and I can't figure out why.  I tried this solution, but it doesn't work either.

Code: [Select]
<a href="{cat_url}" class="menu">{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}{cat_name}</a>&nbsp;({num_images})
This is what stands in my category_bit. html, but it seems like the variable {random_cat_image_file} is empty. 
I'm using Version 1. 7. 7.

It would be wonderful, if somebody could help me!

greets TZ

Rembrandt

  • Guest
Re: Random Category Images not shown
« Reply #1 on: September 21, 2009, 08:11:11 PM »
Hi!
random_cat_image.html:
Code: [Select]
{thumbnail}<br />{image_name}{if image_is_new} <sup class="new">{lang_new}</sup>{endif image_is_new}<br />
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}<br />{user_name}

random_image.html:
Code: [Select]
{thumbnail}<br /><b>{image_name}</b>{if image_is_new} <sup class="new">{lang_new}</sup>{endif image_is_new}<br />
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}<br />{user_name}

and in /includes/constans.php:
Code: [Select]
define('SHOW_RANDOM_IMAGE', 0);
define('SHOW_RANDOM_CAT_IMAGE', 1);

mfg Andi

Offline TerraZone

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Random Category Images not shown
« Reply #2 on: September 21, 2009, 10:10:57 PM »
Thanks for your help.      It works so far.      But two questions remaining:

1.      how to resize the thumbnail? I don't want it to have the original size, but far smaller.      (stupid me :roll:)
2.      I have categories that are empty, but they have got subcategories that aren't.      So what have I to change to display random images out of these subcategories?


greets
« Last Edit: September 21, 2009, 11:23:12 PM by TerraZone »

Rembrandt

  • Guest
Re: Random Category Images not shown
« Reply #3 on: September 22, 2009, 04:21:21 AM »
random pics of the categories, only work with the main categories.

mfg Andi

Offline TerraZone

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Random Category Images not shown
« Reply #4 on: September 22, 2009, 11:59:14 AM »
Oh okay :(
Is there a way to hide the picture if the category is empty?
But anyway I still have a category with images in it, but the random pic shows just this error-symbol!?