Welcome to Geeklog Wednesday, October 18 2017 @ 08:55 am EDT


Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
I just made a custom theme based on Denim theme. Everything seems to be ok, but user settings page is not complete. Footer is missing on http://geeklog.fr/usersettings.php

If I revert to Denim theme, the page is display correctly. Strange...
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/2005
Posts: 1230
Are you using custom user setting templates? If so you may be missing a div somewhere. Some weird things can happen if you miss closing a div. Big Grin
One of the Geeklog Core Developers.

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
No custom user setting templates and it's working perfectly on my local computer.
I uploaded again the denim theme and my theme variation folder but still get this issue Frown

It's not a browser issue. Code of the page stop with the end of the preferences/profile.thtml file. Very very strange Geek
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/2005
Posts: 1230
Did you want to send me the theme to take a quick look?
One of the Geeklog Core Developers.

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
Yes Tom, you can download the theme here. Also, feel free to test the theme settings on the main "Command & Control" page.
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/2005
Posts: 1230
The footer and left column are missing when I view my user settings page on Geeklog.fr.

On my development site though when I use the cool theme it does appear (I have the forum, ban, and gus plugins installed). Maybe it is another plugin that is causing the issue?

Also with the cool theme I downloaded I notice that it has a jquery_ui directory. It isn't needed.
One of the Geeklog Core Developers.

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
Ok this is a mediagallery (1.16.17) issue Geek



I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
To solve this issue set "Display MG Info in User Profile" to No on mediagallery config page. This seems to be an issue with KZ_Template class but I can't find where Question

Anyway, Tom did you see the options for customize the Cool theme on the public_html/admin/index.php page and if yes what do you thing about? It would be a nice feature to include something like this in Geeklog Smile
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/2005
Posts: 1230
Yes I did but I haven't had a chance to figure out how you did it. Was it code you added to functions.php? Where does it save the color info?

Something like this would be a nice a edition especially if we could do it for all major parts of Geeklog (like error message etc...)

I am not really the theme guy though. You should mention it to Dengen.

Maybe it would be better if it was incorporated into Geeklog and then theme's could support it...

Hard to say as I haven't really looked into it. Maybe you should mention it on the mailing list and then list how you see it working?


One of the Geeklog Core Developers.

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
The main code is store in the commandcontrol.html

PHP Formatted Code
 

<form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post">
<h2>Theme <?php global $TLANG; echo $TLANG['theme_name']; ?></h2>
<h3 style="padding-left:20px;">Settings</h3>
<blockquote>
<?php
//New settings
if(isset($_POST['submit']))
{
        //Save settings to file
        $style = '.navigation_bg { background-color:' . $_POST['navigation_bg'] . '; }' . LB ;
        $style .= '#footer { background-color:' . $_POST['footer_bg'] . '; }' . LB ;
        $style .= '.header_bg1 { background-color: ' . $_POST['header_bg1'] . '; }' . LB ;
        $style .= '.header_bg2 { background-color: ' . $_POST['header_bg2'] . '; }' . LB ;
        $style .= '#header { background: rgba(0, 0, 0, 0) linear-gradient(to bottom, ' . $_POST['header_bg1'] . ', ' . $_POST['header_bg2'] . ' 50%, ' . $_POST['header_bg2'] . ' 90%, ' . $_POST['header_bg1'] . ') repeat scroll 0 0; }' . LB ;
        $style .= '/* end of custom settings */';
       
        file_put_contents($_CONF['path_data'] . $_CONF['theme'] . '_style.txt', $style);
}
// Select settings from file
function parse($file){
    $css = file_get_contents($file);
    preg_match_all( '/(?ims)([a-z0-9\s\.\:#_\-@,]+)\{([^\}]*)\}/', $css, $arr);
    $result = array();
    foreach ($arr[0] as $i => $x){
        $selector = trim($arr[1][$i]);
        $rules = explode(';', trim($arr[2][$i]));
        $rules_arr = array();
        foreach ($rules as $strRule){
            if (!empty($strRule)){
                $rule = explode(":", $strRule);
                $rules_arr[trim($rule[0])] = trim($rule[1]);
            }
        }

        $selectors = explode(',', trim($selector));
        foreach ($selectors as $strSel){
            $result[$strSel] = $rules_arr;
        }
    }
    return $result;
}
if(file_exists($_CONF['path_data'] . $_CONF['theme'] . '_style.txt')) $css = parse( $_CONF['path_data'] . $_CONF['theme'] . '_style.txt' );

?>
<h4>Header</h4>
<h5>Gradiant top & bottom</h5>
<p><input name="header_bg1" class="color no-alpha" value="<?php echo $css['.header_bg1']['background-color']; ?>" /></p>
<h5>Gradiant center</h5>
<p><input name="header_bg2" class="color no-alpha" value="<?php echo $css['.header_bg2']['background-color']; ?>" /></p>

<?php  global $_PLUGINS; if(in_array('menu', $_PLUGINS)) {?>

<h4>Navigation</h4>
<p><input name="navigation_bg" class="color no-alpha" value="<?php echo $css['.navigation_bg']['background-color']; ?>" /></p>

<?php } ?>

<h4>Footer</h4>
<p><input name="footer_bg" class="color no-alpha" value="<?php echo $css['#footer']['background-color']; ?>" /></p>
<p><input type="submit" name="submit" value="Valid"></p>
</blockquote>
</form>
 


Settings are saved in a text file as css rules in the data directory. Then the header.thml use this file like this

PHP Formatted Code
<style><?php if(file_exists($_CONF['path_data'] . $_CONF['theme'] . '_style.txt')) echo LB . file_get_contents( $_CONF['path_data'] . $_CONF['theme'] . '_style.txt' ) . LB ?></style>


Very simple and easy to customize
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
Mediagallery 1.7 is coming soon and will solve this issue. You can try the code from
https://github.com/dengenxp/MediaGallery

Thanks.
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

ivy

Forum User
Full Member
Registered: 25/11/2004
Posts: 290
Location:Tokyo Japan
MediaGallery 1.6.16 have old original template engine.
So error occure by using 'theme_default' .
'theme_default' => 'xxx'

MediaGallery 1.7 use Geeklog 2.0 new theme engine, so works 'theme_default'.


Geeklog Japan https://www.geeklog.jp

All times are EDT. The time is now 08:55 am.

  • 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