Hi guys,
After alot of googling i finally figured out how to add icons for MODERN theme. Most of the instructions were for other themes which led me on a wild goose chase. So this is finally the way to do it.
1.)
New subdirs like this.: ../oc-content/themes/bender/s51extra/maincategoryicons
* Create x1 eXtra sub dir = s51extra
* and x1 more under s51extra = maincategoryicons
- -
2.)
* Now create a number of PNG files, - visual corresponding to your categories,
width 140px height 60px and save them as.: Png24 interlaced transperent
and name each PNG24 file ..exactly.. as your category names.
(only a example.: Categori= For sale = For sale.png)
This is very important that you create the name EXACTLY the same as your category, that includes spaces or characters etc.
- -
3.)
* Now open.: inc.main.php :.
and find this piece of code (approx line 31)
<h1><strong><a class="category cat_<?php echo osc_category_id(); ?>" href="<?php echo osc_search_category_url(); ?>"><?php echo osc_category_name(); ?></a> <span>(<?php echo osc_category_total_items($
- -
4.)
* Then replace it with this:
<!-- YourName START eXtra code insert of main category Png icons -->
<h1><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"> <img src="<?php echo osc_current_web_theme_url('s51extra/maincategoryicons/') . osc_category_name() .'.png' ?>" width="140px" height="60px" alt="" title=""/></a> <span><strong>(<?php echo osc_category_total_items() ; ?>)</strong></span></h1>
<!-- YourName STOP eXtra code insert of main category Png icons -->
or if you want the title under the icon, then replace the code with this:
<h1><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><img src="<?php echo osc_current_web_theme_url('extraimg/icon/') . osc_category_name() .'.png' ?>" width="20px" height="20px" alt="" title=""/></a>
<br /><strong><span class="category <?php echo osc_category_slug() ; ?>"></span><a href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> (<?php echo osc_category_total_items() ; ?>)</span></strong></h1>
And thats it, as good as golden. Hope someone else finds it useful otherwise i spent a few hours screwing around with zero luck.
thanks to the original author for the headsup.
----