Search Form and Social Buttons

HotThemes Logo and Top Menu

To request a forum account, please login here and open support ticket. Only customers with active order(s) can open forum account!

× Discussion about Hot Effects Slider Joomla module.

Topic-icon Hot Effects Rotator Loading Problem

More
6 years 10 months ago - 6 years 10 months ago #1711 by nathan@xacommerce.com
nathan@xacommerce.com created the topic: Hot Effects Rotator Loading Problem
When the Hot Effects Rotator is loading on my page, it displays a strange, unwanted side effect that has all of the images on top of one another, improperly displayed in the image below.



My client has continued to ask how we can prevent this, since it does it across all major platforms and browsers.

Do you have any ideas how to clean this up?

Thanks in advance,
-nathan
Last Edit: 6 years 10 months ago by nathan@xacommerce.com.

Please Log in to join the conversation.

More
6 years 10 months ago #1712 by milos
milos replied the topic: Re: Hot Effects Rotator Loading Problem
You can try to preload images that you are using in the rotator. Please copy this code above the </head> in your template's index.php file:
<script type="text/javascript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>
Change <body> tag in the same file, and list all the images for preloading:
<body onload="MM_preloadImages('http://www.yoursite.com/images/imagename.jpg','http://www.yoursite.com/images/imagename2.jpg')">

Please Log in to join the conversation.

More
6 years 10 months ago #1713 by nathan@xacommerce.com
nathan@xacommerce.com replied the topic: Re: Hot Effects Rotator Loading Problem
If I add this code, wouldn't it force these images to preload for every page on my website? I'm only using the H.E.R. on the frontpage.

Is there a way to have this work only for the homepage?

Thanks.

Please Log in to join the conversation.

More
6 years 10 months ago #1714 by milos
milos replied the topic: Re: Hot Effects Rotator Loading Problem
Once loaded, the images would be stored in visitor's cache, so they won't be loaded from server every time. Anyway, if you want preload to happen only on the home page, and assuming you are using Frontpage component for the home page, please change code in <body> with:
<body <?php if (@$_REQUEST['view'] == 'frontpage') { ?>onload="MM_preloadImages('http://www.yoursite.com/images/imagename.jpg','http://www.yoursite.com/images/imagename2.jpg')"<?php } ?>>

Please Log in to join the conversation.

More
6 years 1 week ago #7968 by nathan@xacommerce.com
nathan@xacommerce.com replied the topic: Re: Hot Effects Rotator Loading Problem
And what's the easiest way to edit the header/body tags in Joomla?

Will I need to add both as you mentioned above or just <body tag change?


Thanks for your help with this.

Please Log in to join the conversation.

More
6 years 1 week ago #7974 by ivan.milic
ivan.milic replied the topic: Re: Hot Effects Rotator Loading Problem
Go to Template Manager -> <your template> -> Edit HTML

You need to edit them both because change in body tag actually calls the function that is defined in that script block.

Please Log in to join the conversation.

Time to create page: 0.161 seconds

Links, Partners and Social Media