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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.