HowTo: Make Minor Theme Adjustments
From e107 Wiki
e107 Wiki: English | Русский | Deutsch | Français | Magyar | Português | Български | Česky | Nederlands | Ελληνικά | Italiano | Norske | Polska | Slovenščina | Español | Svenska | Translate: Wiki | Page
Making Minor e107 Theme AdjustmentsThis is not meant to be an all encompassing guide to theme development. It is aimed at non-technical system administrators who are new to HTML, CSS, PHP and e107 CMS Theme Development. It is just meant to show how to change a minor item in a theme. The reader should, regardless of skill level, also read the full article Creating a theme from scratch to get a basic level of understanding of how a theme structures your e107 Website. Identifying Theme ElementsYou have a theme which is not quite how you need it. How do you go about finding out what bit of code needs to be changed?
This is the information will help you identifying what needs to be changed. Example: e107.org clicking the Welcome to e107 MessageThe yellow box contains this information:- h2 Attributes None Position Left: 565px Top: 191px Width: 542px Height: 18px Other Font Family: verdana,arial,tahoma,sans-serif Font Size: 15.5px Ancestors html body div #wrapper div #leftcolumn div .content table tbody tr td .main2 table tbody tr td Children None How to Change the font color of Heading 2Lets say you want to change the Welcome Title colour to Red. However, first be aware that you can either change just this instance of h2 by modifying theme.php or all h2 tags by changing style.css. Having found the element using the tool above.
<h2>{SITETAG}</h2>
<h2><font color=red>{SITETAG}</font></h2> <!-- Note to myself that I changed this-->
NOTE: It is Tip: Try the Pixie colour picker [3] Changing All Heading 2 StyleTo change all h2 tags then this is where the style.css comes in. Essentially the css is behaves as a reference sheet for style information which is used many times over.
#h2 {
background-image: url(images/header.png);
width: 100%;
height: 104px;
background-repeat: repeat-x;
}
.smalltext {
color: #000000;
font: 10px verdana, tahoma, arial, sans-serif;
}
.highlighttext {
color: #DC6504;
font: 11px verdana, tahoma, arial, sans-serif;
}
color: #FF0000;
#h2 {
background-image: url(images/header.png);
width: 100%;
height: 104px;
background-repeat: repeat-x;
}
.smalltext {
color: #FF0000;
font: 10px verdana, tahoma, arial, sans-serif;
}
.highlighttext {
color: #FF0000;
font: 11px verdana, tahoma, arial, sans-serif;
}
How to Move a BannerWe will use theme e107v4 once again in this example. In the header area there is a banner, but we want to move it to the bottom of the site.
Open your copy of the theme.php which you copied to your own theme name. Go down the page, and you will come to the start of the main function which builds the top and left area of the page. It is called $HEADER. Within that block of code, you will see that it starts building the page with a series of html tags. Find the line with {BANNER} shortcode in it.
<td style='text-align:right'>
{BANNER}
</td>
Remove {BANNER}. Next go to the part of the code which builds the bottom of the website which is called $FOOTER. Locate the Theme Disclaimer and then paste the {BANNER} shortcode on a new line after the Disclaimer. Note however, that we want it to be on a new line rather than on the same line as the disclaimer, so we add an extra line break with the BR tag as shown below.
<td colspan='3' style='text-align:center' class='smalltext'>
{SITEDISCLAIMER}
<br />
{THEME_DISCLAIMER}
<br />
{BANNER}
</td>
Save you theme and refresh your page! Further Reading
| |||||||||
good practice to change the theme information near the top - so add a note on the version - See
"Colour" would fail - take care with programming language spellings and punctuation marks - copy what is already there carefully!
There is no need to change your Admin Theme, keep it as Jayya (Only logged in e107 admins on your site see this - this theme is known to always work properly in the admin area).

