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: 175
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 152
Total: 152

Author Topic: ad locations?  (Read 6018 times)

0 Members and 1 Guest are viewing this topic.

Offline ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
ad locations?
« 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,

Offline ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Re: ad locations?
« 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: [Select]
// 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();

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: ad locations?
« 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
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 ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Re: ad locations?
« 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. :)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: ad locations?
« Reply #4 on: September 01, 2011, 08:37:07 pm »
Find
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>', '
Add the code after that you will need to format it so it does not error out.
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 ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Re: ad locations?
« Reply #5 on: September 01, 2011, 08:42:24 pm »
Format it?


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: ad locations?
« Reply #6 on: September 01, 2011, 08:48:36 pm »
Code: [Select]
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]
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 ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Re: ad locations?
« Reply #7 on: September 01, 2011, 09:01:52 pm »
working, thanks!

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
3025 Views
Last post March 16, 2007, 05:58:14 pm
by SMFHacks
2 Replies
4214 Views
Last post February 06, 2010, 11:34:55 am
by Vincent Volmer
7 Replies
5339 Views
Last post June 20, 2010, 09:43:38 am
by Cutter
10 Replies
6336 Views
Last post September 06, 2010, 09:27:47 pm
by Scoobie
7 Replies
5060 Views
Last post November 03, 2011, 12:48:01 am
by cosmicx

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