4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: TIMT on October 12, 2005, 11:30:37 PM
-
Hi
I show a random picture next to the category. Now I have a Subcategory with no picture and then a sub-sub-category with pictures
photo clubs (no pictures in it)
photo club A (no pictures in it)
Animals (with pictures in it - the picture next to the category is shown)
Fantasy (with pictures - the picture next to the category is shown)
Architecture (with pictures - the picture next to the category is shown)
...
...
Now I'd like to show a picture next to the category for each category, even there is no picture in it.
The picture could be a picture of the subcategory or a picture defined with the mod from V@no ([MOD] Category Image v1.0.1)
http://www.4homepages.de/forum/index.php?topic=6922.0
Is there any possibility?
Thanks!
-
The picture could be a picture of the subcategory or a picture defined with the mod from V@no ([MOD] Category Image v1.0.1)
http://www.4homepages.de/forum/index.php?topic=6922.0
Is there any possibility?
Yes?!?
Thats the way the Mod works... You can take any Image ID as Picture for your Category...
-
but I can not show random pics for categories with pictures and a defined picture for a category with no picture in it, right?
How can I use both possibilities?
I have now two definitions in category_bit html
random-image:
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" class="schwarz" border="0" width="40" height="40"></a>{endif random_cat_image_file}
and
image regarding definition on the category (v@no-Mod)
{if cat_image}<img src="{cat_image}">{endif cat_image}
-
for some categories, I have a fix image defined (MOD from V@no) http://www.4homepages.de/forum/index.php?topic=6922.0
it should be checked, if a fix image is defined. when Yes, show this picture, when No, show a random picture.
in category_bit.html I have this two lines. But how can I implement the check?
random-image:
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" class="schwarz" border="0" width="40" height="40"></a>{endif random_cat_image_file}
image regarding definition on the category (v@no-Mod)
{if cat_image}<img src="{cat_image}">{endif cat_image}
Thanks for helping me!
-
OK, I got it... and it's simple...
just put the code
{if cat_image}<img src="{cat_image}">{endif cat_image}
above
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" class="schwarz" border="0" width="40" height="40"></a>{endif random_cat_image_file}
If there is no picutre defined in the category, I see the random-image. If a picture is defined, this defined picture is shown.
-
hi everyone....well this thread is pretty old, but i hope that somebody can help :wink:
just wanted to do the same as TIMT:
show a defined picture with described mod. Otherwise, if no picture is set, display a random one from the category.
- random picture works
- mod with defined picture works
but there is no "else" or "if no cat image" in category_bit.html. So instead of only seeing the defined picture, I see the random one too - hope this is clear to understand.
thanks in advance
added code from category_bit.
<td valign="top">
{if cat_image}<img src="{cat_image}" width="60px" height="45px">{endif cat_image}
{if random_cat_image_file}<img src="{random_cat_image_file}" width="60px" height="45px">{endif random_cat_image_file}
</td>
-
Hi freimanner ,
in 1.7.6 normally run also this for every {if tags}:
{if cat_image}
<img src="{cat_image}">
{endif cat_image}
{ifnot cat_image}
{if random_cat_image_file}
<img src="{random_cat_image_file}" width="60px" height="45px">
{endif random_cat_image_file}
{endifnot cat_image}
Kurt
-
hmm, so simple :oops:
thanks - works perfectly