-
AuthorPosts
-
July 24, 2008 at 12:23 am #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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 24, 2008 at 8:30 am #261957Hi aliegeni !
Please send url of your site . i will check it for you.July 24, 2008 at 9:08 am #261968php 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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 24, 2008 at 9:39 am #261980Hi 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.
July 29, 2008 at 7:28 am #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.
-
AuthorPosts
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