Author Topic: 2 Subcategory image for mod  (Read 5462 times)

0 Members and 1 Guest are viewing this topic.

Offline soasuk

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • Soasuk.com
2 Subcategory image for mod
« on: August 05, 2005, 01:57:20 AM »
I am trying to write a mod that inputs certain infromation about new subcategories (each new subcategory is a new night out) into a phpbb post. I have based the 4images part on a modified category_bit.html and would like 2 different photos be displayed as shown below:



The code i have at the moment is:

Code: [Select]
<img src="{template_url}/images/folder.gif" width="20" height="13" alt="">&nbsp;&nbsp;
<A class="maincat" href="{cat_url}">{cat_name}</A>&nbsp;({num_images})
{if cat_is_new}<SUP class="new">{lang_new}</SUP>{endif cat_is_new}</P>
<P>
<TABLE id="Table1" cellSpacing="1" cellPadding="1" border="0">
<TR>
<TD>{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>{if cat_description}<span class="smalltext">{cat_description}{endif cat_description}</span></TD>
</TR>
<TR>
<TD>{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></TD>
</TR>
</TABLE></P>

I ideally would like random images however ive had problems loading these from subcategories using the random_cat_image_file as no image is displayed (is not a constants problem as works on main categories). Two different images would also be good, using the ran cat image twice obviously loads same image 2 times. Even after reading the forums I cannot find a way of doing what i need as i am no expert coder!, can anybody help me?? thanks,

ps)If random images will not work, the first and second images in the subcategory would also be good.

TheOracle

  • Guest
Re: 2 Subcategory image for mod
« Reply #1 on: August 10, 2005, 06:23:35 PM »
HTML templates cannot handle sub categories yet. To accomplish this, it would require massive time to re-order the readings. Sorry.

TheOracle

  • Guest
Re: 2 Subcategory image for mod
« Reply #2 on: August 11, 2005, 01:39:14 AM »
Update :

It would seems this is what you need :

http://www.4homepages.de/forum/index.php?topic=8682.msg40823#msg40823

Offline soasuk

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • Soasuk.com
Re: 2 Subcategory image for mod
« Reply #3 on: August 16, 2005, 04:14:46 AM »
thanks for the update,
I have installed the sitemap mod as it is a nice addition. I have looked at the sitemap.php code and believe it maybe possible to strip it down to produce what i want.

What i need is a one time piece of html that will be dumped into a post, in this code is needed just one subcategory name and its information (number of images and description), as well as the url to a couple of its pictures(random or the first 2 in category). I know this html would be made by a template file, but i dont know how to edit the sitemap.php code to drive the template. Could anybody help me?