Jump to content

Blend Transition JS


hungryOrb

Recommended Posts

Hihi! :)

Got a small script that I borrow from a cool Joomla Template which works a slideshow that fades.

However, trying to move it to another template is a little difficult because my skills are so low!

The JS is attached and here is what I have moved to try get it to work:

 

sublime.php (connected to index.php)

<?php

$jc_template_path = JURI::base().'templates'."/".$this->template;
global $template_path, $template_absolute_path,$template_name;
$template_path = $jc_template_path;

$header_rotate = True;	// True|False
$header_image_count = 3;  // number of images
$header_rotate_time = 1;	// time in seconds to rotate header
?>

<?php if($header_rotate) { ?> <!-- BLEND TRANS -->
<script src="<?php echo $jc_template_path ;?>/js/blendtrans.js" type="text/javascript"></script>
  <?php
$slideshow = "RunSlideShow(\"headerImage\",\"blendimage\",\"";
for ($i=1; $i <= $header_image_count; $i++) {
	$slideshow .=  $jc_template_path . "/colors/".$tplColor."/images/ani_" . "py" . $i . ".jpg;";
}
$slideshow = substr($slideshow,0,-1);
$slideshow .= "\"," . $header_rotate_time . ");";
}
?> <!-- END BLEND TRANS -->

 

CSS

/* BLENDTRANS */
div#headerImage {
position	: relative;
background	: url(../images/ani_py1.jpg) 0 50% no-repeat;
height		: 160px;
overflow	: hidden;
}

div#blendimage {
height				: 160px;
background-position	: 0 50%;
background-repeat	: no-repeat;
}

#aniWrapper
{
margin		: 0;
margin-top	: 0px; /*12*/
margin-left	: 0px !important; /*24px*/
margin-right: 0px; /*20px*/
width		: 490px;
float		: left; /* Was: left */
}
/* end BLENDTRANS */

 

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/112709-blend-transition-js/
Share on other sites

The index.php and CSS files are only important ones, except the JS of course ;p

 

As far as I know, I have the blendtrans.js file called correctly. After that, the DIV is set up to correctly display the picture files, and the variables are set so that the fade interval is good. I don't know what else I'm missing.

 

Those files are the originals. The modified sublime index.php is not there for download. If anyone has the heart/time to help please let me know

:)

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/112709-blend-transition-js/#findComment-578810
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.