Understanding themes the A.M.A way

Started by A.M.A, August 23, 2004, 09:04:55 PM

Previous topic - Next topic

A.M.A

I've decided to write this after some PMs asking me how did I do themes .. I've tried my best to make it as simple as possible in a hope that some one will find it useful .. please note that this is not meant to be a complete guide and may contains lots of mistakes :)

So you need to change the look of your forum! I hope this will some how explained a little about how things work with the theme system of SMF.
In order to make full use of this article you must have a good knowledge of HTML.

What is a theme?
In simple word it is a list of HTML pages + some graphics .. so theme 'myTest' could consist of:
start.html
articles.html
images.html
end.html
logo.gif - edit.gif - links.gif - me.gif


What is a template?
all the above elements is considered a theme, while a 'template' is the items that list consists of .. so 'images.html' alone would be a template.

Now try to apply the above on a real theme .. the one that came with SMF is called the default  theme .. yes all things in the 'Themes\default' folder are the contents of the default  theme .. while one item alone like 'index.template.php' is just a template.

Note:
If you are going to make a new theme .. you do not have to include all things in the above theme.

What I am going to explain here is just the 'index.tempalte.php' as this template controls the overlook of your forum.

'index.tempalte.php' - What is it?
It is a container of all pages that SMF uses. For simplicity it looks like this:

Quote<html>
<head>
Stuff like page title java scripts style sheet etc.
</head>
<body>
logo + forum's name + user info box + news box + stats box + menu buttons
<table><tr><td>
In here all pages of the smf forum will be placed .. board index , messages index , user profile , search ..etc.
</tr></td></table>
Bottom of the page that display the copyright notice with some links for php + w3c + mySQL
</body>
</html>
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

A.M.A

So to modify the template you will need to understand where to put your modification , as illustrate above .. we have three parts : (1)the header (2)the middle and last (3)the bottom.

If you open the 'index.tempalte.php' you will find that it is lot different than our simple example .. but do not worry , you do not need to understand every bits of it,  just the essential will do.

Ok let us try to find where our three parts begins and end.

The Header
Here where it starts:
<div id="headerarea" style="padding: 12px 30px 4px 30px;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">';
and here where it ends:
template_menu();

echo '
</div>';


The middle
Here where it starts and ends:
Quote<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
      <td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';

}

function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '</td>
   </tr></table>
';

The bottom
Here where it starts:
<div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
and here where it ends:
</table>';

// Show the load time?
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

A.M.A

That was not bad after all .. was it? I guess yes :) that does not look like any regular HTML!
What we are using is not HTML alone! but rather a combination of HTML and PHP. We need php to fill in for us dynamic data and control the visibility of some items among other things , and that can not be done by using HTML alone.

so a code like this :
Quote<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>
Will produce
Quote<span style="font-family: Georgia, sans-serif; font-size: xx-large;">myForum Name</span>

a code like this:
Quoteif (!empty($context['user']['avatar']))
      echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
will produce
Quote<td valign="middle"><img src="http://www.mysite.com/smf/avatars/Musicians/Korn.jpg" alt="" border="0" /></td>
But only if the user got an Avatar .. this check is done by php using the above code.


If you are satisfied with the 'default' theme but need to make some simple color or fonts modification .. you do not need to touch any of the above .. just go to Style.css there you will find elements that control the look of the forum .. you need your body page to have a black color! then just change this
body
{
background-color: #839DB4;
margin: 0px;
padding: 0px;
}
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

A.M.A

Example#1
I need to put my logo instead of the original one .. to do this we have to find where is the original logo! remember it is in the first part , a closer look and here it is:
Quote<img src="', $settings['images_url'], '/smflogo.gif" width="250" style="float: right;" alt="" />
now we know that it is called 'smflogo.gif' and if we search for it we will find it in the 'images' folder. So we can do one of the following:
1. copy your own logo over 'smflogo.gif'
2. use a new logo with a new name .. we have to use this code:
Quote<img src="', $settings['images_url'], '/MyLogo.gif" width="250" style="float: right;" alt="" />
3. my logo is in another site .. not likely :) then we need to use this code:
Quote<img src="http://www.myothersite.com/logo.jpg" width="250" style="float: right;" alt="" />

Example#2
I need to put my copy rights .. so you need to modify the bottom part .. a search for the SMF copy right and we will find it here:
Quote<td valign="middle" align="center" style="white-space: nowrap;">
               ', theme_copyright(), '
now put your own:
Quote<td valign="middle" align="center" style="white-space: nowrap;">
               ', theme_copyright(), ' (c)2004 mySite
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

A.M.A

Example#3
I need to divide the page into two columns!! Have you forget the simple sample in the first page! here it is:
Quote<html>
<head>
Stuff like page title java scripts style sheet etc.
</head>
<body>
logo + forum's name + user info box + news box + stats box + menu buttons
<table><tr><td>
In here all pages of the smf forum will be placed .. board index , messages index , user profile , search ..etc.
</tr></td></table>
Bottom of the page that display the copyright notice with some links for php + w3c + mySQL
</body>
</html>

The easiest way to have a page with two columns is by using a table with two columns, which should look like this:
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="20%"></td>
    <td width="80%"></td>
  </tr>
</table>

The first column '<td width="20%"></td>' should hold your stuff like links or images or whatever you need to put in there. While the other part the big one '<td width="80%"></td>' would hold the forum.

If we apply this to our simple sample it should look like this:
Quote<html>
<head>
Stuff like page title java scripts style sheet etc.
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="20%"></td>
    <td width="80%">
logo + forum's name + user info box + news box + stats box + menu buttons
<table><tr><td>
In here all pages of the smf forum will be placed .. board index , messages index , user profile , search ..etc.
</tr></td></table>
Bottom of the page that display the copyright notice with some links for php + w3c + mySQL
</td>
  </tr>
</table>
</body>
</html>

to apply it to 'index.template.php' you need to first find the head of the page:
</head>
<body>';

and make it look like:
Quote</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="20%"></td>
    <td width="80%">
';

now way to the bottom:
</body>
</html>';

and make it:
Quote</td>
  </tr>
</table>

   </body>
</html>';
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Grudge

Sounds good A.M.A. I would recommend though that when creating a new theme you don't directly edit the "default" theme (even for testing), but instead create a theme "Based off" the default (From the admin panel), and edit that. If you are unlucky enough to cause a parse error then the forum will offer you a link to go back to the default theme to fix it.
I'm only a half geek really...

A.M.A

What Grudge says .. and if you could get your own local server to test things on it , it would be better .. try these links:
[Unknown]'s Guide to Installing PHP and MySQL
Apache Friends
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Springer

I plan to add cells around something I do that like the adding column exmaple.  But what is the best way to make an image repeat within a cell?  I know how to do this on style sheet but I only want it for a given section.

Such as a repeating image to compensate for the distance between the corners.

bojzi

The mind is like a parachute, it only works if it's open.

Springer

Yes but should I do this directly on the template or try and find a way to do it through the style sheets?  (seems easier directly but the other way might have some sort of benefit)

Springer

I've gone ahead and did it on template itself.  It works but I have one problem.

Put a background image on the div style of the footer.  But I need a different background image for the side columns. 

So I tried this:
<td width="50" style="background-image: url("http://www.gamingmaps.us/templates/bluemetal/images/summary_07.jpg); align="left"></td>  

But all I see is the div background.  Is the above wrong or do I have to create a new div for that one cell?

A.M.A

do not know if I understand you fully .. but when trying to surround something using tables .. this is how I do it:
Quote
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="33%">right - top</td>
    <td width="33%">mid - top (repeat)</td>
    <td width="34%">left - top</td>
  </tr>
  <tr>
    <td width="33%">right - mid (repeat)</td>
    <td width="33%">Contents</td>
    <td width="34%">left - mid (repeat)</td>
  </tr>
  <tr>
    <td width="33%">right - bottom</td>
    <td width="33%">mid - bottom (repeat)</td>
    <td width="34%">left - bottom</td>
  </tr>
</table>

if you want to use CSS check this:
http://www.simplemachines.org/community/index.php?topic=2347.0
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Springer

#12
Managed to fix one so should be able to do others.

Slightly off topic but do you know if it is possible to use  template_menu(); within a table?

[Unknown]

Quote from: Springer on August 29, 2004, 08:54:14 PM
Managed to fix one so should be able to do others.

Slightly off topic but do you know if it is possible to use  template_menu(); within a table?

Of course!!

-[Unknown]

Springer

 :P  Figured might get overlooked here and since I had another off topic just posted them together.  Guess I should have deleted that one.

I can say that without the above I couldn't have gotten as far as I did on my theme.  Maybe have a tutorial child board with stuff like this?  (cleaned of off topic posts like mine of course)

A.M.A

When I read my article again .. I wonder what the heck is this guy trying to do!! j/k :) glad you have found it of use.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Vinoth

Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

RCHawaii

HI folks. I am trying to have a long links list on the left border of my forum like SMF here, but can't seem to just place it on the left  without it affecting the header and top? My forum ls located at http://spadworld.iz.forum1/index.php Any help is greatly appreciated.

What I would like is to see the top (login boxes/logoinfo boxes across the top full, the links on the left, and forum on the right and the full width footer.

Thanks again

A.M.A

What you need is something like this:
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%" colspan="2">Header</td>
  </tr>
  <tr>
    <td width="20%">Links</td>
    <td width="80%">main forum</td>
  </tr>
  <tr>
    <td width="100%" colspan="2">Footer</td>
  </tr>
</table>


and to apply it to (index.template.php) you need to follow the following steps:

#Put the header after the body tag like this:</head>
<body>';

// For some STRANGE reason, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
echo '
<div id="headerarea" style="padding: 12px 30px 4px 30px;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">';

// The logo and the three info boxes
echo '



<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%" colspan="2">


#Close the header and make two columns for links and forum like this:
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '



</td>
  </tr>
  <tr>
    <td width="20%">Links in here!</td>
    <td width="80%">


#Close the columns and make footer like this:function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '</td>
</tr></table>



</td>
  </tr>
  <tr>
    <td width="100%" colspan="2">';


#Close the footer and table like this:
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" border="0" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>



</td>
  </tr>
</table>';
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

RCHawaii

#19
Many thanks A.M.A.

EDIT

I tried this again and get a template [parse error] Any suggestions? besides shooting the messenger?  :-\ :-X




A.M.A

PM me your (index.template.php) if you want,  you may just forget a ' or ;
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

RCHawaii

#21
EDIT: RESOLVED CHANGE SMILEY:  8)

eFishie

I am trying to make a theme variable reference guide so it's easier to make themes.

SMF themes are way harder than YaBB SE.
--Jon

Abstraction Point Electronic Music Community - We don't bite! Really! I promise!

Check out my newest song: Alive

[Unknown]

Quote from: <? Piranha($fx); ?> on November 04, 2004, 10:47:35 PM
I am trying to make a theme variable reference guide so it's easier to make themes.

SMF themes are way harder than YaBB SE.

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

-[Unknown]

eFishie

--Jon

Abstraction Point Electronic Music Community - We don't bite! Really! I promise!

Check out my newest song: Alive

HoTmetal

Thanks AMA, I've been looking for something like this. Now if you have another one explaining how to package it so other may use it , I'll be in bisiness

A.M.A

Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

osckar

Hi:

reading this brief tutorial on how to add things to (or modify) index.template.php, this is my case (I guess it could be useful for future reference):

I have already splitted my template like this:

<-------- header ----------->
<--left col--> <---forum--->
<--------- footer ----------->

Everything is ok, but, I would like to move some parts  into a 2 column table, below my "header", for the design to look this way:

<--------------------- header --------------------->
<---------- col1---------><---------col2---------->
<--left col--> <-------------forum---------------->
<--------------------- footer ----------------------->

in the "col1" I'd like to put the login box (user info table) and search, key stats table and news and in col2 (300 px width), I'd like to put some dynamic content (php code). I will not use the right logo.

I know all this means moving and editing code and maybe adding some new tags, etc but Im stuck with this. Im new to SMF templates and prefer to have someone to guide me.

Thank you for your help.


A.M.A

The default template already has two columns for the header. The first row is used for displaying the forum's name and logo:
<td colspan="2" valign="bottom" style="padding: 5px; white-space: nowrap;">';

// This part is the logo and forum name.  You should be able to change this to whatever you want...

the second row is divided into two columns (tds) the right one is for the user info box and search field:
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>

while the second one is used for displaying the key stats and news:
<td width="262" style="padding-left: 5px;" valign="top">';

// Show a random news item? (or you could pick one from news_lines...)

and here are the options you have:

1. Simply add another column to have a total of three, the third one will be used for your own content .. to do that you need to first adjust the columns span in the first row by replacing colspan="2" with colspan="3" then you have to add the third column just right after the second one ends:
echo '
</td>
</tr>
</table>
to be something like this:
echo '
</td>
<td width="300" valign="top">My New Content</td>
</tr>
</table>


2. Move the contents from the second column to the first one and use the second empty now column for your content.

3 Wipe out the contents from the second column and use you own instead.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Dannii

#29
I've found it doesn't always work so well doing that, and that its best to use two tables. here's something i've done like that:

<body>
<table width=100% height=100% cellspacing=0 cellpadding=0>
<tr><td id="top" colspan=2><table width=100% height=100% cellspacing=0 cellpadding=0>
<tr><td id="tl"></td><td><div id="title">Home</div></td></tr></table></td></tr>
<tr><td id="bot"><table width=100% height=100% cellspacing=0 cellpadding=0>
<td id="left" valign=top><img src="./l1a.jpg" /><img src="./l2a.jpg" /><img src="./l3a.jpg" /></td><td valign=top>
bodytexthere
</td></tr></table></td></tr></table>
</body>
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

osckar

Ok, I have setup the tables, columns, and I have added a new php include with my own content.

I would like to move the "key stats" to my left col just below my left_menu.php include.

I have this code but it returns me a parse error (maybe I missed a tag or something) :

// The main content should go here.  A table is used because IE 6 just can't handle a div.
   echo '
   <table width="770" cellpadding="0" cellspacing="0" border="0" align="center"><tr>
      <td width="130" valign="top">';

include('left_menu.php');

   echo '
               <div class="headertitles" style="width: 130px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
               <div class="headerbodies" style="width: 130px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
                  <img src="', $settings['images_url'], '/', $context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
                  <div style="height: 35px; padding: 5px;" class="smalltext">
                     <b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ', $txt[19], '<br />
                     ', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
                  </div>
               </div></td>';


One more question regarding this: Can I use the keystats or another section twice in the same template? Or will this cause a parse error?

Thank you

A.M.A

Your codes look fine .. maybe you forget to end an echo before using your code.
Yes, you can use another instance of the key stats.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

crammed

I'm looking for a simple way to add my site's menu somewhere into the design of the forum, probably just above the menu buttons.  Is there a really simple way to do this?

My forum is at hxxp:www.gvgo.ca/mb/ [nonactive] and I'd eventually like to integrate it into the overall design so that it will look something like out photo gallery at hxxp:www.gvgo.ca/gallery/ [nonactive] .  But, for now, I just want to get the menu onto the forum so that users can get back to the rest of the site.

I am trying to read through some of the help information here.  But, I am not very familiar with PHP.  So, I am having some trouble interpreting some of the instructions.  Any help would be much appreciated.

itsme

Hi,

I have been playing around quite a bit, and have managed, on a copy of default theme, todo some stuff without getting the template parse error.  Finally. 

What I am trying to do is this...

at the top full width, my logo,
next, full width, the button menu.

next, two columns

column one, 20%...the user info box including avatar at top.
some links
maybe some hot topics...like on my home page, I use ssi for last posts on a certain board.

column two...80%...forum

bottom...full width...footer stuff...copyrights etc.

I get close, and then hit the parse errors.

Dave

1MileCrash

Im trying to add content into the second column i made (the 20% one) And i am running into problems. All of the content is centered vertically, and i cant find out why.
The only thing php can't do is tell you how much milk is left in the fridge.



bloc

If its a table..how about setting the <td> with valign="top"? (If its a <div> use style="vertical-align: top;")

1MileCrash

word. I had a dumb moment. I realized that it was in a table and valigned it, It still looks like poo aligned all the way at the top though. Ill probabally insert a blank image in it to bring the content down. I tried inserting like, 5 <p>'s, but that didnt work...
The only thing php can't do is tell you how much milk is left in the fridge.



bloc

Try style="padding-top: 30px;" or whatever...on that <td>. ;)

1MileCrash

thanks bloc.

Okay, now, i need help. I want the menu, the newsbox, and key stats all in my column. For the menu, at first i was simply going to use "A HREF="whatever.php>whatever</A>, but then the link to the admin panel would show for everyone, i know they still couldnt get in because they had to provide a password, but it wouldnt be as neat.

Can somebody show me what i have to put between the column tags? And once i am successful, how do i remove newsbox, menu, and key stats from their current location?

Do i need any php for this? Because all the php i know is in the following code box-

The only thing php can't do is tell you how much milk is left in the fridge.



bloc

For starters, to show the link to admin panel..you would do something like this:
<td> ' , $context['user']['is_admin'] ? '<a href="">admin</a>' : '' , '</td>.

To break it down a bit...
When you use a apostrophe you end an echo statement , and when you use a comma AFTER the apostrophe, it means to check or execute something in php.

Here we check. The checking is just "check if the variable $context['user']['is_admin'] is set to be TRUE". It just does that by placing the variable alone like that. Then WHAT shall we do if its true? The question mark signals "here it starts", and you just enclose what should be rendered(HTML again) in apostrophes again.

If its NOT true, you render nothing -- the colon is a marker to difference between the two, and the 2 single apostrophes means render "nothing". So comes a comma again to end this checking business and a new apostrophe to carry on the original echo statement.

If you see the logic in this, then you are on a good way of understanding php, because the templates is full of these little checks. And it makes it possible to show anything, just by checking variables for what a member are, which board, even what time it is!. ;D

If you look at index.template.php and find template_menu() you will see how the original menu is made exactly like I described - only shows the links/buttons the visitor are allowed to see. It checks if calendar is ON, if you are a admin etc.

Proenski

I understand a lot, but not all of this..
Please can someone give me directions if I want to achieve this

http://www.depechemodeforum.com/yabbse/index.php

kind of lay-out with the "new" SMF template/ theme setup.


Just guide me to the top logo section and how to create a right hand colomn and I'll be a happy guy  ;D

Thank you!
May the force be with you

Cottelletje

i have a question how do you have to change the images for no new post and new posts i openend boarindex.template.php and found this

// If the board is new, show a strong indicator.
            if ($board['new'])
               echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
            // This board doesn't have new posts, but its children do.
            elseif ($board['children_new'])
               echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
            // No new posts at all!  The agony!!
            else
               echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

            echo '</a></td>

but i can't find the values 32x32pixels to change it? :'(
|| Leonardo Dicaprio is the Hottest Man Alive Believe Me ||

bloc

If you have another set of images to use, just name them on.gif, on2.gif and off.gif and overwrite those you have. The code does not set a width/height , so they can be as big as you want.

Cottelletje

|| Leonardo Dicaprio is the Hottest Man Alive Believe Me ||

judymcl

What a wonderful tutorial! Thank you!
I have a couple simple questions I hope.

If I were to create a copy of the default theme, then rename it to a name of my choosing, what other parts of the new theme do I need to also rename if any? In other words, do I change it everywhere that 'default' is mentioned on all of the pages to 'my theme name'?

Also, I use the arcade module, and I was just wondering what theme pages in particular are required to be included from the default theme so that the arcade will run properly. I currently have my forum on another theme and I am having problems with categories on the arcade. It's like something is missing in the theme. So I was thinking to go this route with copying the default theme and just making a few colour and graphic changes.

Thanks,
Ruskin
Judy

1MileCrash

Quote from: ruskin on September 05, 2005, 06:19:57 PM
What a wonderful tutorial! Thank you!
I have a couple simple questions I hope.

If I were to create a copy of the default theme, then rename it to a name of my choosing, what other parts of the new theme do I need to also rename if any? In other words, do I change it everywhere that 'default' is mentioned on all of the pages to 'my theme name'?

Also, I use the arcade module, and I was just wondering what theme pages in particular are required to be included from the default theme so that the arcade will run properly. I currently have my forum on another theme and I am having problems with categories on the arcade. It's like something is missing in the theme. So I was thinking to go this route with copying the default theme and just making a few colour and graphic changes.

Thanks,
Ruskin

1. Nothing really. It will use the defualt's images, but to change that, you just copy the images folder from the default, so it has it's own images. Then, under current theme's settings, you just change the 'images directory url' to wherever you copied the default images to.

2. Every file that the arcade modifies that your theme has. If your theme doesnt have it, no need to add it if this mod is already installed on the default theme.
The only thing php can't do is tell you how much milk is left in the fridge.



judymcl

Thank you! I think I understand.

I'm going to give it a try. I read that if something goes wrong with a theme, that it will revert back to default.......is that correct? That is a great feature, especially since I'm a great one to mess up a theme lol!

I may have messed up with the module install then....I can't remember for sure but I may have installed it to the current theme I'm using which is not the default one. The module works but I am having issues with the link to the categories on each game, so I'm just running it without using categories now lol.
I think I'll have to try and get it properly installed to the default theme, then go from there with creating a new theme.

Thanks very much for your help,
Ruskin


Judy

_cyclops_

Hi,

i'm building a 'warning' system, but, i can't seem to be able to add variables to the language files, i've copied the 'Poll' files because the system is quite simular to the poll. I've added a $txt[warning_subject] to the Post.english.php but the variable isn't set in the file that needs to show it.
I haven't changed anything in the poll files that has to do with template, so.. how does this work? Do i need to rebuild something, or set special options to make sure the variable get's re-read?

Cottelletje

how do you add a table(or cel)with the background is the image Logo_banner.gif that is located in the map images
|| Leonardo Dicaprio is the Hottest Man Alive Believe Me ||

mdp

#49
Never mind..  fixed the problem!

freeadpower

Great Tutuorial A.M.A.!

Now I've got a question for some of you designers/coders out there.

Is there a way to add content and/or an image (such as a banner) between
forum categories?

I'm thinking there must be a way, but I'm just not sure how to do it
in SMF. I've been looking at the index.template.php file but I cannot
seem to determine where it's pulling forum categories. Perhaps I'm
just overlooking something, but I've been looking at the code for a
couple of hours now and it's just getting to the point where it's simply
confusing me.

At first, I thought it was going to be quite simple because the file
is commented quite well. However, I can't seem to find the section(s)
of code I need to edit.

Optimally, I would like to add different content between each new forum
category. Is there a fairly simple way to make this happen?

Thanks in Advance!

Peace & Prosperity,
Matt Fulger

1MileCrash

categorys are in boardindex.template.php. index.template.php is header and footer only. look for the "for each category" php stuff.

The only thing php can't do is tell you how much milk is left in the fridge.



freeadpower

Thanks a million TippMaster!

No wonder I couldn't find it.  :o

Probably helps to look in the correct file. LOL

Thanks again!

Peace & Prosperity,
Matt Fulger

Tyegurl

#53
is there anyway to replace the entire background???  i don't htink i have found what i need.  i find the area for all of my buttons and bars and such...but nowhere do i see where to add a backgorund image....is there one?

tuukster

Sorry for being such a newbie but how can one use .swf file in header?  ???

bedges

looking through the themes options on the forum admin interface, i noticed that since we directly copied the default theme and made changes to the copy, it still says "The default theme from Simple Machines. Thanks go to Bloc and the design team." now i'm all for giving these guys their due kudos and congrats, but how would i go about changing that text to reflect that it's our work too?

the only other problem is that although there is an option to define a theme for individual boards, it doesn't seem to apply any changes to those boards, just looks like the overall forum default.

any help gratefully appreciated.
b

Dannii

You can change that text in your theme's Settings.english.php
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

bedges

excellent, thanks for the rapid response. works a treat. :thumbsup:

Advertisement: