Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: bearstreet on August 19, 2012, 02:22:30 PM

Title: where to look to change the theme colors or other things that I want to change
Post by: bearstreet on August 19, 2012, 02:22:30 PM
Hi,
I wanted to know where to look if I want to change something in the default curve theme for smf
suppose, I want to include something in the header of the forum, some custom html, where should I add the code?

also if I want to change theme's background color, where should I make the change?

the changing of windowbg titles to roun\dframe

for example if i want the title of start new topic to change to roundframe, where is the code that I need to modify?
Title: Re: where to look to change the theme colors or other things that I want to change
Post by: Deaks on August 20, 2012, 05:23:49 AM
the backgorund etc are all images and are under images/theme/main_block.png ... also look at the Curve variations you may find one you like in there, there is also this:

http://www.simplemachines.org/community/index.php?topic=439031.0

That may help you.
Title: Re: where to look to change the theme colors or other things that I want to change
Post by: MovedGoalPosts on August 20, 2012, 07:46:31 AM
SMF has three main groups of files that affect the page display.

1) The various php files that run the various functions.  The main file, from your themes folder is "index.template.php"  Look at this file first if you are wanting to add extra files.  subs.php also adds a lot of functions to the displayed page, for example the menu arrays.

2) index.css generally determines all the colours, font sizes and in many cases which images, or parts of images, will be called.  You'll edit this file to change background colours etc.

3) images contained in the Themes folders.  The main_block.png file is linked from the index.css using co-ordinates and image sprites.  This generates most of the SMF curve theme rounded corners.  SMF curve was developed when most browsers couldn't handle css3 so if creating your own theme you might now choose to scratch main_block in favour of the css "border-radius".  Indeed many of the more recent themes posted to this site now use css3.

I find firebug for firefox browser is a useful tool to be able to scan through a displayed page and determine which part of css is controlling the display.  Great for identifying the code you might want to change if messing with the look and feel of your site, or even to plagiarise code from other sites you like.  Alternative add ons are available, with something similar available in Chrome.
Title: Re: where to look to change the theme colors or other things that I want to change
Post by: bearstreet on August 20, 2012, 11:37:36 AM
so, if i want to include something in the header, I have to alter the index.php?
Title: Re: where to look to change the theme colors or other things that I want to change
Post by: MovedGoalPosts on August 20, 2012, 11:53:05 AM
index.template.php probably.  It may depend on where exactly you want your extra code.

the template will glue together a lot of the general look and feel of the site.  But in turn there are lots of subtemplates called, generally from the sources folder, by the various php functions.  It may prove to be one of those sub templates that needs an edit depending on exactly what and where your added code is to display.

You might need to explain exactly what you are trying to add and where as "header" is quite a large general div area in index.template.php.
Title: Re: where to look to change the theme colors or other things that I want to change
Post by: bearstreet on August 20, 2012, 12:46:40 PM
I want some thing to put ( some html) in where it is written test forum( the name of the forum), assuming that I want to put some code of my own their would be a safe bet

http://testbear1234.site88.net/index.php

also I want to add something to the footer like an html table equal to the width of the forum so that when ever the forum loads, things that I put in header and footer( html of my own) always loads up

for example, in this forum.
there is an advertisement that always shows up in footer and some links like
those you see upper right hand corner like
Download, customize, community
I hope I could convey exactly what I wanted to accomplish