Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 188
Total: 188

Author Topic: ad locations?  (Read 5991 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: 16436
    • 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: 16436
    • 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: 16436
    • 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
3015 Views
Last post March 16, 2007, 05:58:14 pm
by SMFHacks
2 Replies
4178 Views
Last post February 06, 2010, 11:34:55 am
by Vincent Volmer
7 Replies
5326 Views
Last post June 20, 2010, 09:43:38 am
by Cutter
10 Replies
6313 Views
Last post September 06, 2010, 09:27:47 pm
by Scoobie
7 Replies
5036 Views
Last post November 03, 2011, 12:48:01 am
by cosmicx

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

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

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal