Message Text |
Hi to all,
for those who wants to have a unique folder graphic for each category here is a little solution. If you replace in main.tpl
<!-- BEGIN CATSBODY -->
<!-- BEGIN REGULAR -->
<td {CATWIDTH} valign="top" class="category">
<img src="{IMAGESURL}/folder.gif" alt="" /> <a href="{CATURL}" class="categoryname">{CATNAME}</a> ({CATNUMLINKS}) {CATHASNEW} {CATADMIN}<br />
with
<!-- BEGIN CATSBODY -->
<!-- BEGIN REGULAR -->
<td {CATWIDTH} valign="top" class="category">
<?php if (file_exists("{IMAGESPATH}/folder-{CATID}.gif")) { ?>
<img src="{IMAGESURL}/folder-{CATID}.gif" alt="{SITETITLE} - {CATNAME}" align="top" style="float:left; padding:0px 5px 0px 0px;">
<?php } else if (file_exists("{IMAGESPATH}/folder-{CATNAME}.gif")) { ?>
<img src="{IMAGESURL}/folder-{CATNAME}.gif" alt="{SITETITLE} - {CATNAME}" align="top" style="float:left; padding:0px 5px 0px 0px;">
<?php } else { ?>
<img src="{IMAGESURL}/folder.gif" alt="{SITETITLE} - {CATNAME}" align="top">
<?php } ?>
<a href="{CATURL}" class="categoryname
" title="{SITETITLE} - {CATNAME}">{CATNAME}</a> ({CATNUMLINKS}) {CATHASNEW} {CATADMIN}<br />
for each category there will be used a folder grafic with the name 'folder-{CATID}.gif' or 'folder-{CATNAME}.gif'. Only if this new picture files are not present, the orginal file 'folder.gif' will be used.
All extensions or questions to this little php coding are welcome.
If you want to see it working, i can post some links (only german sites, but for picture looking it will be okay ).
Regards,
Frank |