Hi, this module is great. Fill the gap of advertising mechanism in Drupal. Thanks for making it.

One thing it annoys me is that the ads shows up very slow, normall after 1 or 2 seconds after page finished rendered.
(I have an ad in Header region, the ad showed up after Header , Content , Footer (and all any others region) finished displaying.
Put in another word, it is like ads is waiting page to finish displaying first, then ads shows.

I tested with IE 6 to 9 and latest Chrome, Firefox. All same behavior. And I also disabled ad counting.

Anyone else experiencing same effect (delayed showing)? Or just me? Or it is designed to be like this?

Thanks again!

Comments

vikris’s picture

Hi,

I confirm with the above. At my site, simpleads load after 5-6 seconds, really frustrating. Any help woul be appreciated.

Thanks!

minnur’s picture

Assigned: Unassigned » minnur
Status: Active » Needs work
duntuk’s picture

yup, can confirm

liliplanet’s picture

What I think the reason is that the block does not set the size in advance before loading the ad, how to explain ..

the block loads at null size and only then loads the ad into to block to the ad size it has been set.

if the block did not have to resize to accommodate the ad, don't think there would be this delay.

you can see an example at http://www.filmcontact.com/

activelink’s picture

This sounds to me like it could be related to #1876732:Simpleads campaigns CPU usage skyrockets after lots of ad impressions ??

Simpleads users have noticed that adverts that are in campaigns cause Simpleads to count the number of impressions each time before an advert is displayed, even when the impression count is irrelevant. The magnitude of the delay/CPU load (it's on the database server) is related to the size of the simpleads_impressions database table - there are suggestions in #1876732 for a temporary workaround: maybe worth trying to see if they eliminate this problem?

drupalerocant’s picture

I can confirm too. As I have more than 5 ads in the front page it delays the load of the page a lot.

bessone’s picture

Same to me. In a clean new install in a dev website, my frontpage just with one banner show the image 1-2 seconds after page load.

For now isn't related with impressions, because the website and banner are pretty new.

ula888’s picture

I confirm too

deoashish’s picture

Any solution for this ??.

bessone’s picture

the behavior it seems that the javascript function that loads the banners starts at document ready event, but looking at the code does not seem so.

zdean’s picture

I'm also experiencing this....would appreciate any suggestions for fixing it.

petarb’s picture

I'm also experiencing this. Any ideas?

sistro’s picture

Happens to me too... very annoying

I'm pretty sure the module do not resize the image

minnur’s picture

Hi All,

The problem is that the module loads ads via ajax call by default. What you can try is open "simpleads/templates/simpleads_block.tpl.php" files and comment out js code and uncomment code below it.

Thanks

petarb’s picture

Thanks minnur
What are the advantages of loading the ads via ajax call?

loparr’s picture

@PeterB you can probably use it on site with caching turned on

webopius’s picture

The logic for using Javascript within SimpleAds is to make sure that the ads shown are correct regardless of block caching settings. If you want *much* faster performance and don't mind your users waiting until the cache has expired before seeing ad changes (if you have block level caching on), then the solution is to....

Edit simpleads\templates\simpleads_block.tpl.php

At about line 48 comment out the javascript call to _simpleads_load.

Within the <div class="simpleads..." block, insert these two new php lines:

  <?php $nodes = _simpleads_load_ads($tid, $ads_limit); ?>
  <?php print _simpleads_render_ajax_template($nodes, $tid, $ads_limit); ?>

The code below this can remain commented out because although it will draw the ads, it won't take account of limits within an ad block and also won't rotate the ads if you have multiple ads in a single block. However, the code above does do this.

For a future release of SimpleAds, I'd suggest that the code above was included and the option to use it or not made a configurable option?
Adam

chrisck’s picture

#17 works for me. Thank you for the temporary solution, although I have not tested rotating ads yet.

tomb-2’s picture

Fix in #17 worked for me, but you should copy the file to themes/yourtheme/templates to stop updates from overwriting the code.

lucsan’s picture

I also found the fix at #17 and the advice at #19 to work.

Tran’s picture

How does this fix work with rotating ads?

sritanu’s picture

Hi, I went through the same event of delayed rendering of ads which is unacceptable. #14 didn't do any good. It just broke the rotation of ads within my 2 ads blocks of image type which resulted in scattering of all the ad images one below the other.
Next i tried #17. I removed the script and added the 2 lines of code. In #17,

The code below this can remain commented out because although it will draw the ads, it won't take account of limits within an ad block and also won't rotate the ads if you have multiple ads in a single block. However, the code above does do this.

Well, this works for only one block. Another ad block of same image type of ads within my d7 site, just breaks all the images and no ads rotation while the other ad block is completely working with ads rotation. Simpleads version is 1.8. Any thoughts?

sritanu’s picture

Hi Tran, did u find a fix?

sritanu’s picture

Issue summary: View changes

typo

jsidigital’s picture

Issue summary: View changes

Question...

Can someone please explain #17? Do you mean to replace:
<div class="simpleads-<?php print $tid; ?><?php if ($prefix) :?>-<?php print $prefix; ?><?php endif; ?>"></div>

with this:

<div class="simpleads-<?php print $tid; ?><?php if ($prefix) :?>-<?php print $prefix; ?><?php endif; ?>"></div>
  <?php $nodes = _simpleads_load_ads($tid, $ads_limit); ?>
  <?php print _simpleads_render_ajax_template($nodes, $tid, $ads_limit); ?>

Is this correct? Or how exactly is it edited? I dont really understand what you mean by "Within the

Can someone just explain how it should end up looking?

Thanx in advance.

minnur’s picture

Status: Needs work » Closed (won't fix)