mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 12:51:52 +02:00
theme admin handler - deprecated call_user_method() replaced with call_user_func(); e_theme_config interface class added, theme configs now implement it
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
<?php
|
||||
|
||||
// Dummy Theme Configuration File.
|
||||
class theme__blank
|
||||
{
|
||||
var $themePref;
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// Dummy Theme Configuration File.
|
||||
class theme__blank implements e_theme_config
|
||||
{
|
||||
function process()
|
||||
{
|
||||
$pref = e107::getConfig();
|
||||
@@ -26,38 +25,32 @@ class theme__blank
|
||||
|
||||
$var[1]['caption'] = "Another Example";
|
||||
$var[1]['html'] = "<input type='text' name='_blank_example2' value='".e107::getThemePref('example2')."' />";
|
||||
//var_dump(e107::getThemePref());
|
||||
return $var;
|
||||
}
|
||||
|
||||
function 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>
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,15 +1,20 @@
|
||||
<?php
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// Dummy Theme Configuration File.
|
||||
class theme_e107v4a
|
||||
class theme_e107v4a implements e_theme_config
|
||||
{
|
||||
function process()
|
||||
{
|
||||
global $theme_pref;
|
||||
$pref = e107::getConfig();
|
||||
|
||||
$theme_pref = array();
|
||||
$theme_pref['example'] = $_POST['e1074a_example'];
|
||||
$theme_pref['example2'] = $_POST['e1074a_example2'];
|
||||
save_prefs('theme');
|
||||
return "Custom Settings Saved Successfully";
|
||||
|
||||
$pref->set('sitetheme_pref', $theme_pref);
|
||||
|
||||
return $pref->dataHasChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,15 +23,18 @@ class theme_e107v4a
|
||||
global $theme_pref;
|
||||
|
||||
$var[0]['caption'] = "Sample configuration field";
|
||||
$var[0]['html'] = "<input type='text' name='e1074a_example' value='".$theme_pref['example']."' />";
|
||||
$var[0]['html'] = "<input type='text' name='e1074a_example' value='".e107::getThemePref('example')."' />";
|
||||
|
||||
$var[1]['caption'] = "Another Example";
|
||||
$var[1]['html'] = "<input type='text' name='e1074a_example' value='".$theme_pref['example2']."' />";
|
||||
$var[1]['html'] = "<input type='text' name='e1074a_example2' value='".e107::getThemePref('example2')."' />";
|
||||
|
||||
return $var;
|
||||
}
|
||||
|
||||
function help()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user