mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Warning removal in class2.php and I modified the theme.xml spec, so that one can specify exactly which version of XHTML and CSS the theme is compliant with. ie. true/false has been replaced with (Xhtml) 1.1, (Css) 2.1 etc. Pre-0.8 themes will default to this when 'true' is found.
This commit is contained in:
parent
c539f13b36
commit
6a504ac0d4
10
class2.php
10
class2.php
@ -9,9 +9,9 @@
|
||||
* General purpose file
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||
* $Revision: 1.115 $
|
||||
* $Date: 2009-07-23 15:29:07 $
|
||||
* $Author: secretr $
|
||||
* $Revision: 1.116 $
|
||||
* $Date: 2009-07-24 12:54:36 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
//
|
||||
@ -1006,10 +1006,8 @@ if(!defined("THEME_LAYOUT"))
|
||||
$def = ""; // no custom pages found yet.
|
||||
$cusPagePref = (is_array($user_pref['sitetheme_custompages'])) ? $user_pref['sitetheme_custompages'] : $pref['sitetheme_custompages'];
|
||||
|
||||
if(is_array($cusPagePref)) // check if we match a page in layout custompages.
|
||||
if(is_array($cusPagePref) && count($cusPagePref)>0) // check if we match a page in layout custompages.
|
||||
{
|
||||
// print_r($cusPagePref);
|
||||
|
||||
foreach($cusPagePref as $lyout=>$cusPageArray)
|
||||
{
|
||||
foreach($cusPageArray as $kpage)
|
||||
|
@ -10,8 +10,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
|
||||
| $Revision: 1.39 $
|
||||
| $Date: 2009-07-18 03:41:49 $
|
||||
| $Revision: 1.40 $
|
||||
| $Date: 2009-07-24 12:54:38 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -643,10 +643,9 @@ class themeHandler{
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_7."</b>:</td><td style='vertical-align:top'>".$theme['info']."</td></tr>";
|
||||
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_49."</b>:</td>
|
||||
<td style='vertical-align:top'>XHTML ";
|
||||
$text .= ($theme['xhtmlcompliant']) ? ADMIN_TRUE_ICON : "X";
|
||||
$text .= " CSS ";
|
||||
$text .= ($theme['csscompliant']) ? ADMIN_TRUE_ICON : "X";
|
||||
<td style='vertical-align:top'>";
|
||||
$text .= ($theme['xhtmlcompliant']) ? "W3C XHTML ".$theme['xhtmlcompliant'] : "Not Specified";
|
||||
$text .= ($theme['csscompliant']) ? " & CSS ".$theme['csscompliant'] : "";
|
||||
$text .= "</td></tr>";
|
||||
|
||||
|
||||
@ -728,9 +727,30 @@ class themeHandler{
|
||||
$itext .= ($val['@attributes']['previewFull']) ? "</a>" : "";
|
||||
|
||||
$custompage_count = (isset($pref['sitetheme_custompages'][$key])) ? " [".count($pref['sitetheme_custompages'][$key])."]" : "";
|
||||
$custompage_diz = "";
|
||||
$count = 1;
|
||||
if(isset($pref['sitetheme_custompages'][$key]) && count($pref['sitetheme_custompages'][$key]) > 0)
|
||||
{
|
||||
foreach($pref['sitetheme_custompages'][$key] as $cp)
|
||||
{
|
||||
$custompage_diz .= "<a href='#element-to-be-shown' class='e-expandit'>".trim($cp)."</a> ";
|
||||
if($count > 4)
|
||||
{
|
||||
$custompage_diz .= "...";
|
||||
break;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$custompage_diz = "<a href='#element-to-be-shown' class='e-expandit'>None</a> ";
|
||||
}
|
||||
|
||||
|
||||
$itext .= "</td>
|
||||
<td style='vertical-align:top'>";
|
||||
$itext .= ($pref['sitetheme_deflayout'] != $key) ? "<a href='#element-to-be-shown' class='e-expandit'>".ADMIN_EDIT_ICON."</a>".$custompage_count."<div class='e-hideme' id='element-to-be-shown'><textarea style='width:97%' rows='6' cols='20' name='custompages[".$key."]' >".(isset($pref['sitetheme_custompages'][$key]) ? implode("\n",$pref['sitetheme_custompages'][$key]) : "")."</textarea></div>\n" : TPVLAN_55; // Default
|
||||
$itext .= ($pref['sitetheme_deflayout'] != $key) ? $custompage_diz."<div class='e-hideme' id='element-to-be-shown'><textarea style='width:97%' rows='6' cols='20' name='custompages[".$key."]' >".(isset($pref['sitetheme_custompages'][$key]) ? implode("\n",$pref['sitetheme_custompages'][$key]) : "")."</textarea></div>\n" : TPVLAN_55; // Default
|
||||
|
||||
$itext .= "</td>";
|
||||
|
||||
@ -1095,11 +1115,11 @@ class themeHandler{
|
||||
$themeArray['info'] = varset($match[3],'');
|
||||
preg_match('/xhtmlcompliant(\s*?=\s*?)(\S*?);/si', $themeContents, $match);
|
||||
$xhtml = strtolower($match[2]);
|
||||
$themeArray['xhtmlcompliant'] = ($xhtml == "true" ? true : false);
|
||||
$themeArray['xhtmlcompliant'] = ($xhtml == "true" ? "1.1" : false);
|
||||
|
||||
preg_match('/csscompliant(\s*?=\s*?)(\S*?);/si', $themeContents, $match);
|
||||
$css = strtolower($match[2]);
|
||||
$themeArray['csscompliant'] = ($css == "true" ? true : false);
|
||||
$themeArray['csscompliant'] = ($css == "true" ? "2.1" : false);
|
||||
|
||||
/* preg_match('/CUSTOMPAGES(\s*?=\s*?)("|\')(.*?)("|\');/si', $themeContents, $match);
|
||||
$themeArray['custompages'] = array_filter(explode(" ",$match[3]));*/
|
||||
@ -1159,8 +1179,8 @@ class themeHandler{
|
||||
$vars['website'] = varset($vars['author']['@attributes']['url']);
|
||||
$vars['author'] = varset($vars['author']['@attributes']['name']);
|
||||
$vars['info'] = $vars['description'];
|
||||
$vars['xhtmlcompliant'] = (strtolower($vars['compliance']['@attributes']['xhtml']) == 'true' ? 1 : 0);
|
||||
$vars['csscompliant'] = (strtolower($vars['compliance']['@attributes']['css']) == 'true' ? 1 : 0);
|
||||
$vars['xhtmlcompliant'] = varset($vars['compliance']['@attributes']['xhtml']);
|
||||
$vars['csscompliant'] = varset($vars['compliance']['@attributes']['css']);
|
||||
$vars['path'] = $path;
|
||||
$vars['@attributes']['default'] = (strtolower($vars['@attributes']['default'])=='true') ? 1 : 0;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<e107Theme name="blank" version="0.1" date="2008-12-01" compatibility="0.8">
|
||||
<author name ="Desislav Yosifov [SonicE]" email="support@free-source.net" url="http://free-source.net" />
|
||||
<description>Blank e107 admin theme</description>
|
||||
<compliance xhtml="true" css="true" />
|
||||
<compliance xhtml="1.1" css="2.1" />
|
||||
|
||||
<layouts>
|
||||
<layout name='default' title='3 Columns' preview='preview.jpg' previewFull='preview_full.png' default='true' >
|
||||
|
@ -2,7 +2,7 @@
|
||||
<e107Theme name="e107.v4" version="3.0" date="2003-06-11" compatibility="0.8">
|
||||
<author name ="Steve Dunstan [jalist]" email="jalist@e107.org" url="http://e107.org" />
|
||||
<description>Classic e107 theme</description>
|
||||
<compliance xhtml="true" css="true" />
|
||||
<compliance xhtml="1.1" css="2.1" />
|
||||
<pluginOptions>
|
||||
<plugin name='chatbox_menu' url='core' />
|
||||
<plugin name='poll' url='core' />
|
||||
|
@ -2,7 +2,7 @@
|
||||
<e107Theme name="Jayya" version="2.0" date="2009-06-11" compatibility="0.8">
|
||||
<author name ="e107Developers" email="security@e107.org" url="http://e107.org/" />
|
||||
<description>Classic e107 theme</description>
|
||||
<compliance xhtml="true" css="true" />
|
||||
<compliance xhtml="1.1" css="2.1" />
|
||||
<layouts>
|
||||
<layout name='3_column' title='3 Columns' preview='preview.jpg' default='true' >
|
||||
</layout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user