mirror of
https://github.com/e107inc/e107.git
synced 2025-04-30 09:18:09 +02:00
xhtml fix for wmessage, added example theme-config options. Corrected theme.php for _blank, added more example code in _blank/theme.php
This commit is contained in:
parent
aeed844033
commit
1b8957f9c7
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
// $Id: wmessage.php,v 1.1 2009-01-08 19:28:11 mcfly_e107 Exp $
|
||||
// $Id: wmessage.php,v 1.2 2009-07-09 20:51:57 e107coders Exp $
|
||||
|
||||
function wmessage_shortcode($parm)
|
||||
{
|
||||
|
||||
global $e107, $e107cache, $pref;
|
||||
$prefwmsc = varset($pref['wmessage_sc'], FALSE);
|
||||
if (($prefwmsc && $parm == 'header') || (!$prefwmsc && ($parm !='header')) )
|
||||
@ -43,16 +44,17 @@ function wmessage_shortcode($parm)
|
||||
|
||||
if (!defined('WMFLAG'))
|
||||
{
|
||||
|
||||
$qry = "
|
||||
SELECT * FROM #generic
|
||||
WHERE gen_type ='wmessage' AND gen_intdata IN (".USERCLASS_LIST.')';
|
||||
$wmessage = '';
|
||||
$wmessage = array();
|
||||
$wmcaption = '';
|
||||
if($e107->sql->db_Select_gen($qry))
|
||||
{
|
||||
while ($row = $e107->sql->db_Fetch())
|
||||
{
|
||||
$wmessage .= $e107->tp->toHTML($row['gen_chardata'], TRUE, 'BODY, defs', 'admin').'<br />';
|
||||
$wmessage[] = $e107->tp->toHTML($row['gen_chardata'], TRUE, 'BODY, defs', 'admin');
|
||||
if(!$wmcaption)
|
||||
{
|
||||
$wmcaption = $e107->tp->toHTML($row['gen_ip'], TRUE, 'TITLE');
|
||||
@ -65,12 +67,12 @@ function wmessage_shortcode($parm)
|
||||
ob_start();
|
||||
if ($pref['wm_enclose'])
|
||||
{
|
||||
$ns->tablerender($wmcaption, $wmessage, 'wm');
|
||||
// $ns->tablerender($wmcaption, $wmessage, 'wm');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ($wmcaption) ? $wmcaption.'<br />' : '';
|
||||
echo $wmessage;
|
||||
echo ($wmcaption) ? $wmcaption.'<br />' : '';
|
||||
echo implode('<br />',$wmessage);
|
||||
}
|
||||
|
||||
$cache_data = ob_get_flush();
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
|
||||
| $Revision: 1.30 $
|
||||
| $Date: 2009-07-09 11:37:36 $
|
||||
| $Revision: 1.31 $
|
||||
| $Date: 2009-07-09 20:51:59 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -431,7 +431,6 @@ class themeHandler{
|
||||
|
||||
function renderThemeHelp()
|
||||
{
|
||||
|
||||
if(function_exists($this->id."_help"))
|
||||
{
|
||||
return call_user_func($this->id."_help");
|
||||
@ -444,7 +443,7 @@ class themeHandler{
|
||||
{
|
||||
global $theme_pref;
|
||||
$this -> loadThemeConfig();
|
||||
|
||||
|
||||
$confile = e_THEME.$this->id."/".$this->id."_config.php";
|
||||
|
||||
if(function_exists($this->id."_process"))
|
||||
@ -515,7 +514,7 @@ class themeHandler{
|
||||
<h2 class='caption'>".$theme['name']."</h2>
|
||||
<div class='admintabs' id='tab-container'>";
|
||||
|
||||
if(function_exists($theme['name']."_help"))
|
||||
if(function_exists($this->id."_help"))
|
||||
{
|
||||
$text .= "
|
||||
<ul class='e-tabs e-hideme' id='core-thememanager-tabs'>
|
||||
|
58
e107_themes/_blank/_blank_config.php
Normal file
58
e107_themes/_blank/_blank_config.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
// Dummy Theme Configuration File.
|
||||
|
||||
function _blank_process()
|
||||
{
|
||||
global $theme_pref;
|
||||
$theme_pref['example'] = $_POST['_blank_example'];
|
||||
$theme_pref['example2'] = $_POST['_blank_example2'];
|
||||
save_prefs('theme');
|
||||
}
|
||||
|
||||
|
||||
function _blank_config()
|
||||
{
|
||||
global $theme_pref;
|
||||
|
||||
$var[0]['caption'] = "Sample configuration field";
|
||||
$var[0]['html'] = "<input type='text' name='_blank_example' value='".$theme_pref['_blank_example']."' />";
|
||||
|
||||
$var[1]['caption'] = "Another Example";
|
||||
$var[1]['html'] = "<input type='text' name='_blank_example2' value='".$theme_pref['_blank_example2']."' />";
|
||||
|
||||
return $var;
|
||||
}
|
||||
|
||||
function _blank_help()
|
||||
{
|
||||
return "
|
||||
<div class='block-text' style='text-align:left;margin-left:auto;margin-right:auto;width:80%'>
|
||||
|
||||
|
||||
<a href='http://e107.org'>All the HTML that you want</a>.<br /><br />
|
||||
|
||||
|
||||
Mauris sit amet arcu arcu. Curabitur ultrices, felis ac sagittis elementum, justo dolor posuere eros, eu sollicitudin eros mi nec leo. Quisque sapien justo, ultricies at sollicitudin non; rhoncus vel nisi. Fusce egestas orci a diam vestibulum ut gravida ipsum tristique. Nullam et turpis nibh; eu dapibus ligula. Fusce ornare massa ac ante tincidunt euismod varius augue volutpat? Suspendisse potenti. Morbi eget velit in nulla tristique ultricies suscipit consequat ligula. Integer quis arcu vel sem scelerisque gravida vitae vel tortor! Suspendisse tincidunt scelerisque nibh, quis consectetur mauris varius sit amet! Pellentesque et urna vel est rutrum viverra?
|
||||
|
||||
<br /><br />
|
||||
<ul>
|
||||
<li>Curabitur ultrices</li>
|
||||
<li>Ollicitudin eros</li>
|
||||
<li>Felis ac sagittis</li>
|
||||
<li>Quisque sapien</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
";
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -9,7 +9,13 @@ $THEME_CORE_JSLIB = array(
|
||||
$register_sc[]='FS_ADMIN_ALT_NAV';
|
||||
$no_core_css = TRUE;
|
||||
|
||||
define("STANDARDS_MODE",TRUE);
|
||||
|
||||
|
||||
function theme_head() {
|
||||
|
||||
global $theme_pref;
|
||||
|
||||
$ret = '';
|
||||
$ret .= '
|
||||
<link rel="stylesheet" href="'.THEME_ABS.'menu/menu.css" type="text/css" media="all" />
|
||||
@ -38,6 +44,18 @@ function theme_head() {
|
||||
}, document, true);
|
||||
|
||||
</script>";
|
||||
|
||||
if(THEME_LAYOUT == "alternate") // as matched by $HEADER['alternate'];
|
||||
{
|
||||
$ret .= "<!-- Include Something --> ";
|
||||
}
|
||||
|
||||
if($theme_pref['_blank_example'] == 3) // Pref from admin -> thememanager.
|
||||
{
|
||||
$ret .= "<!-- Include Something Else --> ";
|
||||
}
|
||||
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@ -91,7 +109,19 @@ function tablestyle($caption, $text, $mod) {
|
||||
}
|
||||
}
|
||||
|
||||
$HEADER = '';
|
||||
$FOOTER = '';
|
||||
$HEADER['default'] = '';
|
||||
$FOOTER['default'] = '';
|
||||
|
||||
$HEADER['alternate'] = '';
|
||||
$FOOTER['alternate'] = '';
|
||||
|
||||
/*
|
||||
|
||||
$CUSTOMHEADER, CUSTOMFOOTER and $CUSTOMPAGES are deprecated.
|
||||
Default custom-pages can be assigned in theme.xml
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
?>
|
@ -4,7 +4,7 @@
|
||||
<description>Blank e107 admin theme</description>
|
||||
<compliance xhtml="true" css="true"/>
|
||||
<layouts>
|
||||
<layout name='3_column' title='3 Columns' preview='preview.jpg' previewFull='preview_full.png' requiredPlugins='chatbox' default='true' >
|
||||
<layout name='default' title='3 Columns' preview='preview.jpg' previewFull='preview_full.png' requiredPlugins='chatbox' default='true' >
|
||||
<menuPresets>
|
||||
<area id='1' >
|
||||
<menu name='login' />
|
||||
@ -17,6 +17,8 @@
|
||||
</area>
|
||||
</menuPresets>
|
||||
</layout>
|
||||
<layout name='2_column' title='2 Columns' preview='preview.jpg' previewFull='preview_full.png' />
|
||||
<layout name='alternate' title='2 Columns' preview='preview.jpg' previewFull='preview_full.png' >
|
||||
<custompages>usersettings.php</custompages>
|
||||
</layout>
|
||||
</layouts>
|
||||
</e107Theme>
|
Loading…
x
Reference in New Issue
Block a user