SMFHacks.com

Ad Seller Pro => Support => Topic started by: mrnuke7175 on January 26, 2014, 01:54:18 pm

Title: Multiple ads in a tower on a side.
Post by: mrnuke7175 on January 26, 2014, 01:54:18 pm
Another issue has come up for me, trying to monetize my site.

When I try to have multiple ads on the right side of the site, the 2nd set of ads does not start until the bottom of the page.

I'll attach a pic to show it.

I went into Ad locations and added a new right side location. Then I added the code it gave me below the existing right side ad code as shown here :
-------------------------------------------
// Begin Ad Seller Pro Location - Right Side of the Forum
if (ShowAdLocation(9,0,true) || ShowAdLocation(10,0,true))
{
   echo '</td>';
   global $sourcedir;
   include_once $sourcedir . "/adseller2.php";

   $adSellerAdData =  ShowAdLocation(10);
   if ($adSellerAdData != false)
   {
      echo '<td valign="top">';

      echo $adSellerAdData;

      echo '</td>';
   }
   echo '</tr></table>';
}
// End Ad Seller Pro Location - Right Side of the Forum
      
   
// Begin Ad Seller Pro Location - Right Side of Forum 2

global $sourcedir;
include_once $sourcedir . "/adseller2.php";

$adSellerAdData =  ShowAdLocation(1000);

// Check if any ads where found
if ($adSellerAdData != false)
{
   // Dispaly the advertising code
   echo $adSellerAdData;
}

// End Ad Seller Pro Location - Right Side of Forum 2
------------------------------------------------

It doesn't put it neatly under eachother as I'd want it to.

Any ideas?
Title: Re: Multiple ads in a tower on a side.
Post by: SMFHacks on January 26, 2014, 02:03:27 pm
There is another way to do it as well with just one ad location.
Requires modification to the call ShowAdLocation()
Change to
Code: [Select]
   $adSellerAdData =  ShowAdLocation(10);
To
Code: [Select]
ShowAdLocation(10, 0,  false, 5,true);

I believe that will do it. What it does will show a max of 5 ads vertically.
Title: Re: Multiple ads in a tower on a side.
Post by: mrnuke7175 on January 26, 2014, 02:07:12 pm
There is another way to do it as well with just one ad location.
Requires modification to the call ShowAdLocation()
Change to
Code: [Select]
   $adSellerAdData =  ShowAdLocation(10);
To
Code: [Select]
ShowAdLocation(10, 0,  false, 5,true);

I believe that will do it. What it does will show a max of 5 ads vertically.

When I change the code to what you posted, all my right aide ads are gone. Nothing is being displayed.
Title: Re: Multiple ads in a tower on a side.
Post by: SMFHacks on January 26, 2014, 02:08:56 pm
OOps forgot this part should be
Code: [Select]
   $adSellerAdData =  ShowAdLocation(10, 0,  false, 5,true);
Title: Re: Multiple ads in a tower on a side.
Post by: mrnuke7175 on January 26, 2014, 02:14:04 pm
Yup, that did it. thank you, again.  :D
Title: Re: Multiple ads in a tower on a side.
Post by: mrnuke7175 on January 26, 2014, 02:18:35 pm
One drawback though, all these banner ads (up to 5) have to use the same location though, right?

My intent was to have some ads displayed for guests and some to members, etc..

So I wanted location 1 (ad1) for guests only, and a new location (right side 2 for example) for Ad2 that only members see.
Title: Re: Multiple ads in a tower on a side.
Post by: SMFHacks on January 26, 2014, 02:22:44 pm
Yeah they would need to use the same location

You coudl try  with this code untested

Change
Code: [Select]
$adSellerAdData =  ShowAdLocation(10);
   if ($adSellerAdData != false)
   {
      echo '<td valign="top">';

      echo $adSellerAdData;

      echo '</td>';
   }
   echo '</tr></table>';
To


Code: [Select]
$adSellerAdData =  ShowAdLocation(10);
   if ($adSellerAdData != false)
   {
      echo '<td valign="top">';

      echo $adSellerAdData;

$adSellerAdData =  ShowAdLocation(1000);

echo $adSellerAdData;
      echo '</td>';
   }
   echo '</tr></table>';
Title: Re: Multiple ads in a tower on a side.
Post by: mrnuke7175 on January 26, 2014, 02:33:03 pm
Ahh, yes that's the sort of integration I was looking for. Thank you. I think that did it.