Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • aliegeni Friend
    #131268

    How to turn on Header decoration?
    I have new joomla 1.5.4 instalation with default JA POLLUX template.
    Header-deco.gif 1,2,3 images not showing up?
    Is there any setting to turn this feature on or is it on by default?
    I yes why not working?

    Sherlock Friend
    #261957

    Hi aliegeni !
    Please send url of your site . i will check it for you.

    aliegeni Friend
    #261968

    php script generate wrong path to images – two slashes “// “
    /templates/ja_pollux/images/red/header-deco//header-deco3.gif
    How to replace this?
    I replace string in file ja_vars.php from:

    [PHP]$dir = “/images/”.$tmpTools->getParam(JA_TOOL_COLOR).”/header-deco/”; //You could change this to the folder store your header images. [/PHP]

    to:

    [PHP]$dir = “/images/”.$tmpTools->getParam(JA_TOOL_COLOR).”/header-deco”; //You could change this to the folder store your header images. [/PHP]

    Is this correct?

    Sherlock Friend
    #261980

    Hi aliegeni !
    No, there isn’t problem in your site , You open ja_vars.php file :
    section code from line 84 to 104 is code for header background :


    $dir = "/images/".$tmpTools->getParam(JA_TOOL_COLOR)."/header-deco/"; //You could change this to the folder store your header images.
    $regex = '/(.gif)|(.jpg)|(.png)|(.bmp)$/i'; //Support image type: gif, jpg, png, bmp
    $headerimage = "";

    $live_path = $tmpTools->templateurl().$dir;
    $abs_path = dirname(__FILE__).$dir;
    $dh = opendir($abs_path);
    $files = array();
    while (false !== ($filename = readdir($dh))) {
    $files[] = $filename;
    }
    if (count ($files) > 0){
    $i = 0;
    while (++$i < 10) {
    $rnd = rand(2, count($files)-1);
    $imgname = $files[$rnd];
    if (is_file($abs_path."/".$imgname) && preg_match($regex, $imgname)) {
    $headerimage = $live_path."/".$imgname;
    break;
    }
    }
    }

    in index.php file at about line 52 :


    <div id="ja-header" class="clearfix" style="background: url(<?php echo $headerimage; ?>) no-repeat bottom right;">

    is code for set background for header.

    aliegeni Friend
    #262850

    <em>@hainn84 69204 wrote:</em><blockquote>Hi aliegeni !
    No, there isn’t problem in your site , You open ja_vars.php file :
    section code from line 84 to 104 is code for header background :
    </blockquote>

    That’s because I changed php code in ja_vars.php file. By default there was an error. Php return wrong path reference to header pictures – with two // in path.

    [PHP]$dir = “/images/”.$tmpTools->getParam(JA_TOOL_COLOR).”/header-deco/”;
    $headerimage = $live_path.”/”.$imgname;[/PHP]

    you must remove one slash from any line.

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  aliegeni 16 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum