Subdreamer.org
 

Go Back   Subdreamer.org > Subdreamer Skins > Skin Modifications

Reply
 
Thread Tools Display Modes
Old 11-22-2008, 09:43 AM   #1
EvgenyG
Junior Member
 
Join Date: Nov 2008
Posts: 6
Default Changing header picture when I change the category?

Skin Vaya.
I have 5 different categories and I want to change the header picture.
Category:
1. Main = main.jpg (814x81)
2. Factory = factory.jpg (814x81)
3. …
4. …
Can someone help me to solve this problem?
EvgenyG is offline   Reply With Quote
Old 05-22-2009, 06:29 PM   #2
harley_m
Junior Member
 
Join Date: Feb 2007
Posts: 10
Default

Hey,

I often found it fustrating that SD skins normally keep the same image across all pages - as when designing for clients pretty much the first thing they want is different images on each page!

Thankfully there are a couple of fixes.

If your skin uses CSS to bring in the image you want to change for each page, the you can use this :

<?php
{
echo '<div id="content'.$categoryid.'">';
}
?>

to replace what would normally be : <div id="content1"> or similar.

This will mean you have to add a new block of CSS for each section of the site in the styles.css file - content2,content56 etc. You'll find the css that places the image you want to change, that is the one to duplicate. This is obviously useful as a trick to get any formatting, images and plugins to change per page.

Another way is to do it directly from the php file. If your skin specifies the header image (or any other) in the php file, as some do, then you can swap the images directly from here. To do this find the code that says :

<img src="skins/core/images/banner.jpg" alt="Banner" id="banner" />

And swap it for :

<?php
{
echo '<img src="skins/core/images/banner'.$categoryid.'.jpg" alt="Banner" id="banner" />';
}
?>

You then need to rename the images banner1,2,3,4 etc according to the catagory id's.

I am no programmer, but just find my own ways round any limitations I find - so if anyone knows a better way than this I'd love to know it, but either or these should/will do what you want for now

Hope that helps!


Harley
harley_m is offline   Reply With Quote
Old 05-23-2009, 03:06 PM   #3
2ndCoder
Member
 
Join Date: Mar 2008
Posts: 53
Default

well purpose of header is not applying pics, but maintaining the same design head troughtout your website - what is more important than placing pics onto top of a page (although i perfectly understand the idea).

what you need is intervention in your skin.php design, adding a space for placing images.

images then, can be added as a simple plugin, or, as Harley described.

hardcoreing by '.$categoryid.'.jpg is simpliest, and most effective, much better than complicating with databases and its warmly recommended.
2ndCoder is offline   Reply With Quote
Old 06-08-2009, 01:41 PM   #4
BlogApostille
Junior Member
 
Join Date: Jun 2009
Location: United States
Posts: 1
Default Changing header picture when I change the category?

If I select one of the templates from Sitebuilder am I stuck with the photos at the top of the page? I have tried three different templates and cannot figure out how to substitute my pictures for the ones at the top.
Brian

I ran into this same problem Brian and was given such an elaborate runaround answer by tech support that I ultimately ended up ruining the index.html page and locking myself out of sitebuilder. I finally ended up having to have my entire account deleted and reset and choosing a different template, which I am still not happy with. I'm a photographer--I don't want OTHER people's photos in my page headers.
BlogApostille is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 06:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.