News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Hardcoded theme elements

Started by dasnk, March 06, 2006, 03:27:39 AM

Previous topic - Next topic

dasnk

Hi,

I was dissapointed to find that a lot of the theme is hard coded into the various template files.

In particular, the headers for the content boxes... Such as the search box, the help box, the login box.

It would be better if you used a system like:

OpenTable("Section title");
...code...
CloseTable();

Then when we want to modify the frame for content boxes we just need to modify that function rather than searching multiple files for things like:   

<table border="0" cellspacing="0" cellpadding="6" align="center" class="tborder">
         <tr class="titlebg">
            <td>', !empty($settings['use_buttons']) ? '<img src="' . $settings['images_url'] . '/buttons/search.gif" align="right" style="margin-right: 4px;" alt="" />' : '', $txt[183], '</td>
         </tr>'

all over the place...
Makes it easy for adding content plugins or a portal that has blocks the same style as the theme without making content for specific themes.

Advertisement: