SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 25, 2012, 04:33:42 am

Login with username, password and session length
Members
Total Members: 10071
Latest: cdavidson012
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 60
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 60
Total: 60
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: ad locations?  (Read 675 times)
ApplianceJunk
Ad Seller Pro Customer
Sr. Member
*****
Offline Offline

Posts: 368



View Profile WWW
« on: September 01, 2011, 05:24:18 pm »

In the attachment I marked three locations I would like to place ads.

First one is the top of the page between the logo and forum name.
Second one is in the middle, just above the line that goes across the page.
The third is just below that same line, but above the forum links.

Do I need need to create new locations for all three of these places and if so where do I start?

Thanks,
Logged

ApplianceJunk
Ad Seller Pro Customer
Sr. Member
*****
Offline Offline

Posts: 368



View Profile WWW
« Reply #1 on: September 01, 2011, 07:22:05 pm »

Ok, so I'm starting to see how things work.

I can create a ad location code and find where to edit index.template.php to put it above the link tree.... but it's above the link tree and that line. I would like it above the link tree and below the line...

Here is where I place the code in index.template.php, but I can't see how that line is created or where it's coming from.

Code:
// Custom banners and shoutboxes should be placed here, before the linktree.


// 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


// Show the navigation tree.
theme_linktree();
Logged

SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #2 on: September 01, 2011, 07:35:57 pm »

You would create a new location for each of them.

 Overall header gets sort of close to the main SMF one middle banner

You might need to place the ad location right after the menu call to get that affect. If you have firebug you can get the exact html of that line and find it inside the template.php
Logged
ApplianceJunk
Ad Seller Pro Customer
Sr. Member
*****
Offline Offline

Posts: 368



View Profile WWW
« Reply #3 on: September 01, 2011, 07:55:09 pm »

Ok, installed firebug and it shows the top section as...


Quote
<div id="top_section">
         <h1 class="forumtitle">
            <a href="http://localhost/smf2/index.php">ApplianceJunk.com</a>
         </h1>
         <img title="Simple Machines Forum" alt="Simple Machines Forum" src="http://localhost/smf2/Themes/default/images/smflogo.png" id="smflogo">
      </div>


So then I go to index.template.php and locate this code.

Quote
<div id="top_section">
         <h1 class="forumtitle">
            <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
         </h1>';
         
         
   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>', '
      </div>

I have tried to insert this add code in a couple places, but I just must not be getting it in the right location as it breaks the forum

Quote
// 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

Could you explain just were to inset the code in the above <div id="top_section">

I think after I get one working I should be on my way. Smiley
Logged

SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #4 on: September 01, 2011, 08:37:07 pm »

Find
Code:
  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>', '
Add the code after that you will need to format it so it does not error out.
Logged
ApplianceJunk
Ad Seller Pro Customer
Sr. Member
*****
Offline Offline

Posts: 368



View Profile WWW
« Reply #5 on: September 01, 2011, 08:42:24 pm »

Format it?

Logged

SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #6 on: September 01, 2011, 08:48:36 pm »

Code:
This
[code]
   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>', '
      </div>
To
   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>
[/code]
Logged
ApplianceJunk
Ad Seller Pro Customer
Sr. Member
*****
Offline Offline

Posts: 368



View Profile WWW
« Reply #7 on: September 01, 2011, 09:01:52 pm »

working, thanks!
Logged

Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 24, 2012, 08:02:50 am]

[May 24, 2012, 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.221 seconds with 17 queries.