i installed cmotion modul for my cmsms
this is a modul with image motion
the problem was that my images stayed in place not moving
the solution waht i found is that the problem was in the motiongallery.js function
Code: Select all
function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
if(typeof crossmain.style.maxWidth!=='undefined')
crossmain.style.maxWidth=maxwidth+'px';
menuwidth=crossmain.offsetWidth;
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (startpos)
cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
crossmain.onmousemove=function(e){
motionengine(e);
}
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
here the crossmain is null
so that after this row nothing is working because its null
the solution what i found is that i put this code
Code: Select all
<link rel="stylesheet" type="text/css" href="plugins/js/gallerystyle.css">
{literal}
<!-- Do not edit IE conditional style below --><!--[if gte IE 5.5]>
<style type="text/css">
#motioncontainer {
width:expression(Math.min(this.offsetWidth, maxwidth)+'px');
}
</style>
<![endif]--><!-- End Conditional Style -->
<__script__ type="text/javascript" src="plugins/js/motiongallery.js">
/***********************************************
* CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
* Modified by Jscheuer1 for autowidth and optional starting positions
***********************************************/
</__script>
{/literal}
and this i include in my template in this way
{global_content name='cmotion_inc'}
{cms_module module='CMotion' thumbdir='kugelsch/small' largedir='kugelsch/full' height='55' width='180'}
the global content just before {cms_module module='CMotion'
why:
because i think that function fillup() is executed before the motioncontainer is created or it is not executed after the is created
but in my way it goes fine
thats all folks