Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 01:05 pm EDT

Geeklog Forums

nexpro theme issue


Status: offline

dosborn

Forum User
Newbie
Registered: 10/06/08
Posts: 6
I installed the nexpro theme.. added all the custom code.. double checked it all...

and..

everything seems to work just fine...

until i log in.. then i get the dreaded.. {header_javascript} and equally lame {showhide}

these issues were happening all the time (not just when logged in) prior to me adding the custom code.. but...

still happening now that its in place..
Happens in both IE and FF

Anyone have this prob or have an idea about it?
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hi dosborn,

Witch Geeklog version do you run?

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

Status: offline

dosborn

Forum User
Newbie
Registered: 10/06/08
Posts: 6
newest version available via this site..

was upgraded from 1.3.x
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
dosborn,

With the help of nexpro theme documentation :

In the [geeklog_dir]/system/lib-custom.php change the function CUSTOM_templateSetVars to :

Text Formatted Code

function CUSTOM_templateSetVars ($templatename, &$template)
{
    global $_USER, $_CONF;
       
if ($templatename == 'header') {
    nexpro_theme_required_code(&$template);

    }
}
 


Add this code to the end of lib-custom.php:

Text Formatted Code
function nexpro_theme_required_code(&$template) {
    global $_CONF;
 
    if ($_COOKIE['leftblocksmode'] == 'none') {
        $template->set_var( 'showhide', '<img src="'.$_CONF['layout_url'].'/images/showleftblocks.gif"
            onClick="toggleleftblocks(this);" ALT="Click to show Left Block" TITLE="Click to show Left Blocks" border="0">' );
    } else {
        $template->set_var( 'showhide', '<img src="'.$_CONF['layout_url'].'/images/hideleftblocks.gif"
            onClick="toggleleftblocks(this);" ALT="Click to hide Left Block" TITLE="Click to hide Left Blocks" border="0">' );
    }
    $template->set_var( 'leftblockmode', $_COOKIE['leftblocksmode']);
 
    if (!isset($CONF_NEXMENU)) $template->set_var('nexmenu','');
 
    if (file_exists("{$_CONF['path_layout']}/header.js")) {
        $code = '<script type="text/javascript">' . LB;
        $code .= '  var layout_url = "'. $_CONF['layout_url'] .'";' . LB;
        $code .= '</script>' .LB;
        $code .=  '<script type="text/javascript" src="'.$_CONF['layout_url'] .'/header.js"></script>';
    }            
 
    $code .= "\n\n<!-- Load Yahoo UI Javascript Libraries -->\n";
    $code .= '<script type="text/javascript" src="' . $_CONF['layout_url'] . '/javascript/yui/yahoo-min.js"></script>' . LB;
    $code .= '<script type="text/javascript" src="' . $_CONF['layout_url'] . '/javascript/yui/dom-min.js"></script>' . LB;
    $code .= '<script type="text/javascript" src="' . $_CONF['layout_url'] . '/javascript/yui/event-min.js"></script>' . LB;
    $code .= '<script type="text/javascript" src="' . $_CONF['layout_url'] . '/javascript/yui/animation-min.js"></script>' . LB;
    $code .= "<!-- End of Yahoo UI libraries -->\n";
 
    $template->set_var('header_javascript',$code);
}


This theme seems to work with Geeklog 1.5.1.

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

Status: offline

dosborn

Forum User
Newbie
Registered: 10/06/08
Posts: 6
I did all that.. added the code.. hence it now works whenever i'm not logged in.. and is still having issues when I am logged in...

its extremely strange...

unless the additional code they provide at their site differs from documentation that comes with the newest version of the theme.. which I did not check.. but I'm pretty sure it's the same code..


 Quote

ironmax

Anonymous
Try clearing your cache and history. You may want to delete the cookie for that dite as well. Then see if it makes a difference.

Michael
 Quote

All times are EDT. The time is now 01:05 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