1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 18:32:44 +02:00

theme.xml parser and theming improvements - a work in progress.

This commit is contained in:
CaMer0n
2008-11-17 07:17:23 +00:00
parent baa13adc47
commit 2f724e6b68
5 changed files with 303 additions and 99 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_themes/e107v4a/theme.php,v $
| $Revision: 1.3 $
| $Date: 2008-02-23 23:51:39 $
| $Revision: 1.4 $
| $Date: 2008-11-17 07:17:23 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -99,6 +99,67 @@ $FOOTER['3_column'] =
</div>";
// 2 Column Layout ------------------------------------------------------------
$HEADER['2_column'] =
"
<table style='width:100%; background-color:#E4E0E0' cellspacing='3' class='topborder'>
<tr>
<td style='text-align:left; vertical-align:bottom'>
{CUSTOM=clock}
</td>
<td style='text-align:right'>
{CUSTOM=search+".THEME_ABS."images/search.png+18+19}
</td>
</tr>
</table>
<table style='width:100%;' cellspacing='3' id='header'>
<tr>
<td colspan='2' style='text-align:left; vertical-align: middle;'>
<img src='".THEME_ABS."images/logo.png' alt='' /> [ {SITENAME} ]
</td>
<td style='text-align:right'>
{BANNER}
</td>
</tr>
</table>
<table style='width:100%' cellspacing='3'>
<tr>
<td style='width:20%;'></td>
<td style='width:60%;'><img src='".THEME_ABS."images/blank.gif' width='1' height='1' alt='' /></td>
</tr>
<tr>
<td style='width:20%; vertical-align: top;'>
{SITELINKS=menu}
{MENU=1}
</td><td style='width:60%; vertical-align: top;'>";
$FOOTER['2_column'] =
"</td></tr>
<tr>
<td colspan='2' style='text-align:center' class='smalltext'>
{SITEDISCLAIMER}
<br />
{THEME_DISCLAIMER}
</td>
</tr>
</table>
<div style='text-align:center'>
<table style='width:100%'>
<tr>
<td style='width:30%; vertical-align:top'>
&nbsp;
{MENU=3}
</td>
<td style='width:40%; vertical-align:top'>
{MENU=4}
</td>
</tr>
</table>
</div>";
function rand_tag(){
$tags = file(e_BASE."files/taglines.txt");

View File

@@ -12,6 +12,19 @@
<xhtmlCompliant>true</xhtmlCompliant>
<cssCompliant>true</cssCompliant>
<layouts>
<layout name='3_column' title='3 Columns' preview='preview.png' previewFull='preview_full.png' />
<layout name='3_column' title='3 Columns' preview='preview.jpg' previewFull='preview_full.png' requiredPlugins='chatbox' default='true' >
<menuPresets>
<area id='1' >
<menu name='login' />
<menu name='compliance' />
</area>
<area id='2'>
<menu name='online' userclass='E_UC_ADMIN' />
<menu name='powered_by' />
<menu name='sitebutton' />
</area>
</menuPresets>
</layout>
<layout name='2_column' title='2 Columns' preview='preview.jpg' previewFull='preview_full.png' />
</layouts>
</e107Theme>

View File

@@ -6,9 +6,9 @@
| Released under the terms and conditions of the GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/header_default.php,v $
| $Revision: 1.23 $
| $Date: 2008-11-09 20:31:10 $
| $Author: secretr $
| $Revision: 1.24 $
| $Date: 2008-11-17 07:17:23 $
| $Author: e107coders $
+-----------------------------------------------------------------------------------------------+
*/
@@ -444,6 +444,13 @@ if ($e107_popup != 1) {
//
// M: Send top of body for custom pages and for news
//
$def = $pref['theme_deflayout'];
if(is_array($HEADER) && isset($HEADER[$def]) && isset($FOOTER[$def]))
{
$HEADER = $HEADER[$def];
$FOOTER = $FOOTER[$def];
}
if(isset($CUSTOMPAGES))
{
if (is_array($CUSTOMPAGES))