Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 221
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 231
Total: 232

Author Topic: Multiple ads in a tower on a side.  (Read 5962 times)

0 Members and 1 Guest are viewing this topic.

Offline mrnuke7175

  • Member
  • *
  • Posts: 24
    • View Profile
Multiple ads in a tower on a side.
« 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?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Multiple ads in a tower on a side.
« Reply #1 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline mrnuke7175

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Multiple ads in a tower on a side.
« Reply #2 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.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Multiple ads in a tower on a side.
« Reply #3 on: January 26, 2014, 02:08:56 pm »
OOps forgot this part should be
Code: [Select]
   $adSellerAdData =  ShowAdLocation(10, 0,  false, 5,true);
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline mrnuke7175

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Multiple ads in a tower on a side.
« Reply #4 on: January 26, 2014, 02:14:04 pm »
Yup, that did it. thank you, again.  :D

Offline mrnuke7175

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Multiple ads in a tower on a side.
« Reply #5 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.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Multiple ads in a tower on a side.
« Reply #6 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>';
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline mrnuke7175

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Multiple ads in a tower on a side.
« Reply #7 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.

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
7453 Views
Last post July 08, 2009, 11:21:05 pm
by armorbeast
2 Replies
4574 Views
Last post September 16, 2010, 05:28:34 pm
by endomorph
1 Replies
3390 Views
Last post October 10, 2011, 11:29:00 am
by SMFHacks
11 Replies
10371 Views
Last post August 06, 2014, 10:39:59 pm
by SMFHacks
18 Replies
8758 Views
Last post January 27, 2016, 10:13:05 pm
by northview

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal