My programmer just added:
Configuration:
—-
Ad Units in block : 5 (each 125px square ad)
Rows : 3
Column : 2
Block Padding : 0
Ad Padding / Margin : both 5px
Border: 0
File: adrotate-output.php
Line No: 296
—
// determine grid size based on amount of ads
$block_count = $block->columns * $block->rows;
if($array_count < $block_count) $block_count = $array_count;
// resize block in height
if($block->rows > ($block_count / $block->rows)) $block->rows = $block_count / $block->columns;
—
Line No: 318
—
$gridheight = ($block->rows * $block->adheight) + $heightmargin.’px’;
—
Calculations results:
$array_count = 5
$block_count = 2 x 3 = 6
if(5 < 6) $block count = 5
if(3 > (5 / 3)) $block->rows = 5 / 2 = 2.5
—
Line No: 312
—
$heightmargin = (($block->admargin * 2) * $block->rows) + (($block->adpadding * 2) * $block->rows) + (($adborder * 2) * $block->rows);
$heightmargin = ((5 * 2) * 2.5) + ((5 * 2) * 2.5) + 0 = 50
$gridheight = 2.5 * 125 + 50 = 362.5px
The final output starts like this…
<div style=”float:none;margin:0;padding:0px;clear:none;width:290px;height:362.5px;border:none;”>
(so I assume the above calculation is correct)
Plugin Author
Arnan
(@adegans)
Or you just create a block of 6 ads (2 columns of 3). AdRotate will know and leave the 6th spot free if you have only 5 ads. But the sum is correct then.
It makes no sense to have a 2 column 5 ad block.
Assuming you mean this:
if(5 < 6) $block count = 5
if(3 > (5 / 3)) $block->rows = 5 / 2 = 2.5
as a solution. Makes little sense either and would deform any block at any time. No matter how many ads you put in there. Since 5 *is* always lower than 6.
Thanks Arnan de Gans for the reply. However we were unable to understand what you mean exactly.
// It makes no sense to have a 2 column 5 ad block.
We only have 5 Ads and we can fit only 2 ads/row in the sidebar. So we have 2 items/row and 3 columns to fit 5 Ads.
We DO NOT have 6th Ad.
How do we fit the 5 Ads we have in sidebar ??
Ideally the plugin should take care of the rounding off part. ie. calculate the height for 6items instead of 5items.
Any solution to solve this issue?
Plugin Author
Arnan
(@adegans)
Yes, use the original plugin and use even numbers for the block.
If you want a block of 2 columns with 2 and 3 ads (5 total) create a 2×3 block (space for 6 ads). AdRotate will correct/anticipate the missing ad. As I said a in my previous post.
@arnan, thanks for your replies. The Ad Block has always been 2 columns by 3 rows for six ads total, incorrectly display 5 ads. That’s why myself and Tamil opened this thread and reported the problem. Please advise.
OK, we are now displaying five ads via AdRotate in the right-hand sidebar here:
http://www.heartbeatofkauai.com/
Do you now understand the display problem we initially reported and have been trying to explain over the course of this entire support thread?
Please advise.
HeartBeatOfKauai.com switched to 6 ads, but is now once again displaying 5. As I shared in my post of one week ago, you can now see the problem. Arnan de Gans, could you please take a look and reply?
Plugin Author
Arnan
(@adegans)
I rarely look here, for faster help go to my ticket support site – http://www.ajdg.net/support/.
If the ads do not fit it’s a markup issue in your adcode or perhaps the sizing of the block is set wrongly (too few pixels for the ads for example).
When I look in my Safari I see 6 ads.
Thanks for your message. Yes, there are once again 6 ads running. Next time there are 5 ads, we’ll post at your support site: http://www.ajdg.net/support/