// Looks at your current theme....
In a nutshell, all you truly need are 2 things. Block calls, where appropriate, and the dsp() function in the footer to convert any theme, plus the css and portal templates of course.
Here's where it would add to those:
Collapsible block areas, custom portal footer, additional bridges.
Every theme will be quite different, and each can have different approaches. So this would be a basic guideline, really.
Overall, though, one would need to look at several things first.
1) Where do I want blocks to be in this theme?
2) How should I modify, if need be, the current html layout to support this, and still remain cross browser compliant?
I won't lie, but the quickest method would be to use a table. Yes, it's dirty, and I personally hate tables for layouts.
But, by default, the main content of SMF is placed in one that is 100% in width. This could be modified to provide for a two or three column design, or what ever by simply adding in a cell (td) before and after the main cell where the changing content takes place.
By changing content, I mean what is controlled outside of the default main_above and main_below template functions. So, you would add a td in the above for left blocks, and one in below for right blocks.
Then you can put top and bottom blocks in a div right before the closing of main above, and right at the beginning of main below.
Then again, you could probably get away with just adding divs which float left and right of the forum output as well.
Individual design and layout will pretty much depend on the individual theme, and users preferences as to how and where they want to place their blocks.
Then again, here's another approach.
You could make a new template file, called portal.template.php
.
In this file, you could have a portal_above, and portal_below function.
Modifying the theme's "theme_info.xml" file to look like this:
<layers>main,potal</layers>
<!-- Templates to load on startup. Default is "index". -->
<templates>index,portal</templates>
<!-- Base this theme off another? Default is blank, or no. It could be "default". -->
<based-on></based-on>
</theme-info>
In your portal template, in the above function, you can add left blocks, and then top blocks. In the below function, add bottom blocks, and right blocks.
Then, after the right blocks, add in the dsp() function, and let the main_below finish out the page.
Or, you could make the portal layers/template come first, and move all the header stuff from main_above and footer stuff from main_below over to the portal above/below.
Then, of course, you have the collapsible stuff, and bridge checks if need be as well.
So, the decision is basically left up to the end user really, and how they want their site to look.
The bare minimum that is needed is the dsp() function in the footer, that's it. Of course you won't have blocks.
From there, you can modify the HTML as needed to support blocks, and then make the calls to the block area you want to call.
At a minimum, the block call needs to be (minus the php tags):
<?php
if (!empty($context['blocks']['left']) && is_array($context['blocks']['left'])) {
// if there are left blocks to display, check for collapse and show/hide
echo Blocks('left');
}
?>
Then, of course, you will want blocks to match your theme. You may need to modify the block templates, but maybe not.
You will need to modify the css though, most likely.
To do this, you can open up the default/style_sphinx.css file, and depending on how you do your templates, either just copy this file to your modified theme (and add a call to it right after then call to style.css in the head of the documents html) or simply paste it in at the end of the style.css file. Which you do, is up to you. In Sphinx 1.1, we've split the files, so that there is a separation as to the portal specific css information so that users know what styles are portal specific, etc.
From there, if you need to modify a portal specific template, you can add just the templates you need to modify into your theme.
Also, as a note, you will need to copy over the images/articles and images/news files, to your new theme as well. There are a few in image/icons as well to be copied over. Off the top of my head I can think of edit_trash.png, edit.png, off.gif, and on.gif, but for some reason I think there might be one or two more.
A quick comparison of the dir contents of the theme being modified against the default theme should help. As each theme is different, situations and circumstances will vary.
I'm sure this is a lot to swallow at one time, but that's the basics of it.
To review,
- Add the dsp() function to the footer area.
- Edit html to support blocks, and call them from the desired spot.
- Add collapsible block area supporting code (look at the default theme for it), and the settings from the top of the default index.template for them.
- Tweak/modify css, and portal templates as needed.
- If needing bridge functions, check against the default index.template for where/how we call the bridge information.