Welcome to Geeklog, Anonymous Tuesday, November 26 2024 @ 07:32 pm EST
Geeklog Forums
Themes and config GUI
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hello developers,
With theme like the one call Pure there is two parts for the header set on two files htmlheader.thtml and header.html
and the config GUI return only header.thtml when you submit a modification (See demo site on demo.geeklog.net).
What can we change to include the complete header?
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
With theme like the one call Pure there is two parts for the header set on two files htmlheader.thtml and header.html
and the config GUI return only header.thtml when you submit a modification (See demo site on demo.geeklog.net).
What can we change to include the complete header?
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
12
17
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Yes. To see what I'm talking about, you can go to the demo.geeklog.net, log in as an admin, change to pure theme and then go to the config panel and hit Save Changes.
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
20
11
Quote
ironmax
Anonymous
Ben,
Was the pure theme revamped from the nouveau theme? If so, then some changes to the lib-common and a theme api will need to be included in the system folder. If not, then putting the contents from the htmlheader.thtml into the beginning of the header.html file should resolve your problem. Let me know if this worked.
Michael
Edit
I just took a look at it briefly and its going to take some work to get it to work right. I seen the function call in the functions.php file, so that pretty much covers the header. I did notice that the function file does not have the configuration info in there to cover that.
Was the pure theme revamped from the nouveau theme? If so, then some changes to the lib-common and a theme api will need to be included in the system folder. If not, then putting the contents from the htmlheader.thtml into the beginning of the header.html file should resolve your problem. Let me know if this worked.
Michael
Edit
I just took a look at it briefly and its going to take some work to get it to work right. I seen the function call in the functions.php file, so that pretty much covers the header. I did notice that the function file does not have the configuration info in there to cover that.
12
15
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Proper theme is not set in configuration.php and I found a hack from Mark Evans
// MAIN
if (array_key_exists('set_action', $_POST) && $tokenstate){
if (SEC_inGroup('Root')) {
if ($_POST['set_action'] == 'restore') {
$config->restore_param($_POST['name'], $conf_group);
} elseif ($_POST['set_action'] == 'unset') {
$config->unset_param($_POST['name'], $conf_group);
}
}
}
if (array_key_exists('form_submit', $_POST) && $tokenstate) {
$result = null;
if (! array_key_exists('form_reset', $_POST)) {
$result = $config->updateConfig($_POST, $conf_group);
/*
* An ugly hack to get the proper theme selected
*/
if( $_CONF['allow_user_themes'] == 1 )
{
if( isset( $_COOKIE[$_CONF['cookie_theme']] ) && empty( $_USER['theme'] ))
{
$theme = COM_sanitizeFilename($_COOKIE[$_CONF['cookie_theme']], true);
if( is_dir( $_CONF['path_themes'] . $theme ))
{
$_USER['theme'] = $theme;
}
}
if( !empty( $_USER['theme'] ))
{
if( is_dir( $_CONF['path_themes'] . $_USER['theme'] ))
{
$_CONF['theme'] = $_USER['theme'];
$_CONF['path_layout'] = $_CONF['path_themes'] . $_CONF['theme'] . '/';
$_CONF['layout_url'] = $_CONF['site_url'] . '/layout/' . $_CONF['theme'];
}
else
{
$_USER['theme'] = $_CONF['theme'];
}
}
}
}
echo $config->get_ui($conf_group, $_POST['sub_group'], $result);
} else {
echo $config->get_ui($conf_group, array_key_exists('subgroup', $_POST) ?
$_POST['subgroup'] : null);
}
I submit a bug-feature request.
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
Text Formatted Code
// MAIN
if (array_key_exists('set_action', $_POST) && $tokenstate){
if (SEC_inGroup('Root')) {
if ($_POST['set_action'] == 'restore') {
$config->restore_param($_POST['name'], $conf_group);
} elseif ($_POST['set_action'] == 'unset') {
$config->unset_param($_POST['name'], $conf_group);
}
}
}
if (array_key_exists('form_submit', $_POST) && $tokenstate) {
$result = null;
if (! array_key_exists('form_reset', $_POST)) {
$result = $config->updateConfig($_POST, $conf_group);
/*
* An ugly hack to get the proper theme selected
*/
if( $_CONF['allow_user_themes'] == 1 )
{
if( isset( $_COOKIE[$_CONF['cookie_theme']] ) && empty( $_USER['theme'] ))
{
$theme = COM_sanitizeFilename($_COOKIE[$_CONF['cookie_theme']], true);
if( is_dir( $_CONF['path_themes'] . $theme ))
{
$_USER['theme'] = $theme;
}
}
if( !empty( $_USER['theme'] ))
{
if( is_dir( $_CONF['path_themes'] . $_USER['theme'] ))
{
$_CONF['theme'] = $_USER['theme'];
$_CONF['path_layout'] = $_CONF['path_themes'] . $_CONF['theme'] . '/';
$_CONF['layout_url'] = $_CONF['site_url'] . '/layout/' . $_CONF['theme'];
}
else
{
$_USER['theme'] = $_CONF['theme'];
}
}
}
}
echo $config->get_ui($conf_group, $_POST['sub_group'], $result);
} else {
echo $config->get_ui($conf_group, array_key_exists('subgroup', $_POST) ?
$_POST['subgroup'] : null);
}
I submit a bug-feature request.
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
12
15
Quote
All times are EST. The time is now 07:32 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content