Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12404
Latest: azaratir
New This Month: 10
New This Week: 0
New Today: 0
Stats
Total Posts: 39925
Total Topics: 7028
Most Online Today: 109
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 75
Total: 75

Author Topic: Why such a different location between these two?  (Read 2377 times)

0 Members and 1 Guest are viewing this topic.

Offline ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Why such a different location between these two?
« on: September 01, 2011, 10:14:20 pm »
I was just using a image of a google ad until I got the ad placement where I wanted.

Code: [Select]
<br><img src="https://www.google.com/adsense/static/en_US/images/728x15.gif">
I had to use one br to drop the image down just were I wanted it in the center as show in first attachment, adgood..

Then I replaced the ad code with the google adsense script and it drops it way down, as show in the second attachment, adlow...

I have been trying to adjust the google adsense code placement, but don't know if it's possible.

Here is the code as I have it in the index.template.php file.

Code: [Select]
echo '
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '';


// Begin Ad Seller Pro Location - Test Location

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 - Test Location
 
 echo '



</div> <div id="upper_section" class="middletext">
<div class="user">';

I have tried moving the Ad Seller Pro code around, but just seem to break it everytime I try something different.

Is it just the way it is or can it be adjusted so the google adsense ad displays higher up?

Thanks,

Offline ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Re: Why such a different location between these two?
« Reply #1 on: September 02, 2011, 08:31:30 am »
After sleeping on it I wondered what would happen if I put the adsense code in a table first. :)

That did the trick...

With the adsense in a table it acts just like my image did that I was using to help locate the ad placement.

Anyway I go the ad just where I want it now, thanks for the great mod!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14969
    • View Profile
Re: Why such a different location between these two?
« Reply #2 on: September 02, 2011, 08:38:35 am »
Glad you got it working. Yeah sometimes a table will keep the code in place. Adsense and scripts like that behave a little differently so sometimes either a table or div helps keep them in order.
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/

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
3391 Views
Last post June 18, 2010, 08:50:58 am
by jos
7 Replies
4114 Views
Last post October 20, 2010, 12:13:37 am
by SMFHacks
2 Replies
2317 Views
Last post October 19, 2010, 07:27:03 pm
by tj.baker
1 Replies
1236 Views
Last post September 22, 2011, 02:26:18 pm
by SMFHacks
3 Replies
2338 Views
Last post September 25, 2011, 10:48:05 am
by SMFHacks

+- Recent Topics

Update detect mobile mode PHP5 to PHP7 by Rock Lee
November 16, 2019, 07:18:13 pm

PHP error by davejo
November 12, 2019, 12:09:47 pm

Message Editor Pro Issues by SMFHacks
November 06, 2019, 09:58:33 pm

most popular categories doesnt work by fussilet
November 02, 2019, 02:51:42 pm

Change colors of Halloween theme by SMFHacks
October 24, 2019, 11:44:59 am

prettyurls - TroubleShooting.wiki by Rock Lee
October 10, 2019, 11:37:09 am

Some issues with adding and editing a listing by ajac63
October 07, 2019, 04:16:40 am

Problem update 1.1.21 to 2.0.15 by Rock Lee
October 06, 2019, 06:09:16 pm

[Mod]SMF 2.0.x PHP 7.2 Support by sah62
October 04, 2019, 01:46:00 pm

Ideas by shuban
October 03, 2019, 10:19:06 pm

Powered by EzPortal