Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Background image on a Forum Header
Avatar
EEESafe
Member
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2014 - 4:11 pm

Is this at all possible.  So where you have the blue colour in the background of a Forum header, is it possible to place a background image. If so, are there any instructions on the dimensions and best image type?

 

Thanks

Robert

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2014 - 6:05 pm

Hey Robert,

I'm not sure if there is any documentation on this one, but you can add a background image to any section using the overlays, stylesheet, templates and an images folder in the theme. I am going to assume that you are proficient with basic editing as it's the only way I know of to achieve this.

Simply create an image you want to use for your background, add it to a folder in your theme, then in the overlay file you are using you can add the call to the image as a variable such as:

$yourImage='url("images/yourImageName.png")';

Then simply call this variable in your theme stylesheet like:

background: <?php echo($yourImage); ?>;

So, adding an image to a forum group header depending what theme you are using you would have to tackle the template differently. Looking at the template spGroupView.php, Unified theme provides a group header class in the form of a section start and end, which you could apply a background image to in the stylesheet (unified.php), whereas Default theme does not, and instead wraps the entire group in the section including the header name, description and the forums.

You can create a header at the top of the groups in Default theme by adding a section start such as Unified does:

sp_SectionStart('tagClass=spGroupViewHeader', 'header');

And close the section after all the header information with

sp_SectionEnd('', 'header');

The tagClass 'spGroupViewHeader' would be the class you will add the background image to.

I would probably recommend using .png files with an alpha layer (transparency) as it should give you flexibility with things like edges, but I have not played around with this myself so can't advise more I'm afraid.

You can also be specific about the width of the container that has the background image. For example you can set a div to be width: 600px, and you can make your background image 600px wide. Again this would probably take some experimentation to get right factoring in the overall width of your forum, and the overall width of the list section which houses the groups.

I would say the best thing to do is play around with it. If you get stuck I will gladly investigate further locally when I get time.

Avatar
EEESafe
Member
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2014 - 6:11 pm

Hey thanks Ike.  Thats quite an extensive answer.  I've been happy to edit CSS and Code in previous things, but I'm not a coder by anymeans.  I can create images as you illustrate and just need to find more info where I can and should put these images.

What I'm trying to achieve is a clear background, or even some Clear Text on the Forum headers that will denote the different Appliance Sections easily.  So we have Washing Machines, Cookers, Tumble Driers etc.

If this is the only way, it's quite tough for me, but if I can find where the correct detail should be put, as you've described, I might give it a go.  Especially if there are some great guys around like you to assist.

Many thanks

Robert

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2014 - 6:51 pm

Well you can put any images you want to use as custom images in your theme/images folder (sp-resources > forum-themes > yourtheme > images)

It's really straight forward when you get used to how the templates, stylesheet and overlays work with each other. You might want to start by taking a look at the Themes entry in the Codex.

If it's just colour changes you want to make, you can achieve that best through just CSS, but unfortunately I don't know a way of having different coloured forum groups as it's just one section in the template repeated for all forums.

You can however have a custom icon for each board set up in the forums section of the admin panel.

We always recommend making a custom or Child Theme to preserve any changes you might make to one of the stock themes.

Avatar
EEESafe
Member
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2014 - 9:05 pm

Thanks again Ike.  I think I will try and get this Forum Order issue sorted, and then have a go with the images. I will take a look at that link.  I think I've found where the images are stored, so I'll need to find the exact height and width of the image now.  Even if I just create images with Text on them saying "Washing Machines", that would be an improvement.  I just want to make it easier on the eye.

 

Ciao

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2014 - 9:42 pm

be interested to know what you find... just holler if you need more assistance...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626