Forums / Templates, Stylesheets, Page Layout / Category icon as background image?

Category icon as background image?

Locked

Views: 948

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
7 Oct 2010, 3:11 AM
#1
mrstewart26 avatar

mrstewart26

New Zenner

Join Date:
Oct 2010
Posts:
3
Plugin Contributions:
0

Category icon as background image?

ZC ver. 1.3.8a

Hi, I've searched the FAQ's, but nothing is similar enough to help. I'm very shaky with php and css otherwise this might not be so hard.

What I want to do is use the image that is input when creating a new category in admin and creating the category description. I want to take that image and either: use it as the background for the box that is used for category description on the category main page, or use it to fill that box with no padding anywhere.

I believe the file I need to edit is includes/templates/theme274/templates/tpl_index_categories.php.

Not knowing php and css well, I've wasted too much time trying to fool with this file to no avail.

The site is tisabasket.com.

Actually as I write this, I'm also wondering if I can just make a banner for each category instead of the category name on the main category page.

Any takers? I'd appreciate it.

7 Oct 2010, 3:27 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Category icon as background image?

Because those files are used to draw all the category boxes editing them will only make a background that is the same for all

While it is possible, it will require a significant amount of custom coding to dynamically select the image for each category
By far too involved to tackle in a forum venue

If it is majorly important to you - - you could post in the commercial help wanted area

Zen-Venom Get Bitten

7 Oct 2010, 5:54 PM
#3
leest35 avatar

leest35

Zen Follower

Join Date:
May 2010
Location:
London UK
Posts:
134
Plugin Contributions:
0

Re: Category icon as background image?

HI,

I have done something similar with the category images that you use for the categories, but if your not that proficent with php and css , it isn't that easy as i had a number of cross browser issues to sort out and a few files to modify, however off the top of my head i can't remember what files i changed as it was sometime ago, but it is do able.

19 Oct 2010, 4:56 PM
#4
mrstewart26 avatar

mrstewart26

New Zenner

Join Date:
Oct 2010
Posts:
3
Plugin Contributions:
0

Re: Category icon as background image?

I fiddled a little with just changing the size of the category description icons that you load when you create a new category. I would just like to use that icon and make it the size of the entire box that contains it. I think I can do that in the control panel. My issue would be with changing the padding so that the picture takes up the entire box.

I just don't know where that is referenced.

19 Oct 2010, 9:49 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Category icon as background image?

"if I can just make a banner for each category instead of the category name on the main category page"

If you want this, you can use a bit of code from Images for Titles in Free Addons, applied to the category name display. It requires some PHP knowledge, but is a simple edit. The mod's readme describes this at the bottom of the page.