Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11790
Latest: ButtKoWitz
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 41408
Total Topics: 7255
Most Online Today: 103
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 48
Total: 48

Author Topic: Banner placement question?  (Read 433 times)

0 Members and 1 Guest are viewing this topic.

Offline Shades

  • Full Member
  • ***
  • Posts: 103
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Banner placement question?
« on: September 05, 2021, 03:37:01 pm »
2.1RC4
3.0.3a

Is there an option or a way to put a banner ad such as google adsense in the "site slogan" area? I've managed to get it to work by pasting the adsense code into the site slogan slot in admin/current theme but there no permissions control that way.

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15662
    • View Profile
Re: Banner placement question?
« Reply #1 on: September 05, 2021, 05:56:30 pm »
You can. Make a new ad location call it site slogan.
After it is added. You can either grab the PHP code for fast loading or the iframe code and enter it the template area.
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 Shades

  • Full Member
  • ***
  • Posts: 103
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #2 on: September 13, 2021, 06:16:21 pm »
Ok so I created a new banner location and went to put in the code but noticed this error in admin:

Quote
Error
Type of error
Undefined_vars
Error message
8: Undefined index: show_bbc
File
/home2/*****/public_html/*****/Themes/default/adseller21.template.php
Line
1785
URL of page causing the error
https://*****/index.php?action=admin;area=adpro;sa=addlocation
Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/*****/Themes/default/adseller21.template.php on line 1785
#1: template_add_location()
Called from /home2/*****/public_html/*****/Sources/Load.php on line 2735
#2: loadSubTemplate()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 3540
#3: obExit()
Called from /home2/*****/public_html/*****/index.php on line 190

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15662
    • View Profile
Re: Banner placement question?
« Reply #3 on: September 13, 2021, 06:26:25 pm »
Posted update to fix this.
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 Shades

  • Full Member
  • ***
  • Posts: 103
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #4 on: September 13, 2021, 06:31:41 pm »
Ok thanks!

Next question lol...

How do I put this banner code:

Code: [Select]
// Begin Ad Seller Pro Location - Top Slogan Area

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 - Top Slogan Area

Into the site slogan area?

Code: [Select]
<div id="header">
 <h1 class="forumtitle">
 <a id="top" href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name_html_safe'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name_html_safe'] . '">', '</a>
 </h1>';

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

 echo '
 </div>

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Offline Shades

  • Full Member
  • ***
  • Posts: 103
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #5 on: September 14, 2021, 02:49:04 pm »
I tried copying the index.template.php at https://www.smfhacks.com/index.php/topic,10086.0.html but that is for 2.0 and I'm using 2.1RC4. Thanks!


Here is my index.template.php... (and it's a little more customized than default too, have the custom top menu mod installed)
« Last Edit: September 14, 2021, 03:06:25 pm by Shades »

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15662
    • View Profile
Re: Banner placement question?
« Reply #6 on: September 14, 2021, 08:01:03 pm »
Try this attached file
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 Shades

  • Full Member
  • ***
  • Posts: 103
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #7 on: September 14, 2021, 08:24:57 pm »
Hey thats looking good!

The ad is where I want it but the slogan image is still there to the left. How do I get rid that?

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Offline Shades

  • Full Member
  • ***
  • Posts: 103
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #8 on: September 14, 2021, 08:39:31 pm »
So I removed:

Code: [Select]
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.svg" alt="Simple Machines Forum" title="Simple Machines Forum">' : '<div id="siteslogan">' . $settings['site_slogan'] . '</div>', '
Would that be the correct way?

So now it looks like:

Code: [Select]
<h1 class="forumtitle">
<a id="top" href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name_html_safe'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name_html_safe'] . '">', '</a>
</h1>';

echo '
';

// Begin Ad Seller Pro Location - Top Slogan Area

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 - Top Slogan Area

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Offline Shades

  • Full Member
  • ***
  • Posts: 103
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #9 on: September 14, 2021, 08:58:50 pm »
So I removed:

Code: [Select]
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.svg" alt="Simple Machines Forum" title="Simple Machines Forum">' : '<div id="siteslogan">' . $settings['site_slogan'] . '</div>', '
Would that be the correct way?

So now it looks like:

Code: [Select]
<h1 class="forumtitle">
 <a id="top" href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name_html_safe'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name_html_safe'] . '">', '</a>
 </h1>';

 echo '
';

 // Begin Ad Seller Pro Location - Top Slogan Area

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 - Top Slogan Area
No that don't work cause if I do that the area is blank when the ad is not set for that area! Hmm...

ShadesWeb.com - Custom Logos
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15662
    • View Profile
Re: Banner placement question?
« Reply #10 on: September 14, 2021, 09:37:17 pm »
Get rid of
Code: [Select]
<h1 class="forumtitle">
 <a id="top" href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name_html_safe'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name_html_safe'] . '">', '</a>
 </h1>
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
7 Replies
4012 Views
Last post April 30, 2011, 03:07:23 pm
by David8
8 Replies
4753 Views
Last post September 01, 2011, 05:00:55 pm
by ApplianceJunk
9 Replies
5763 Views
Last post June 04, 2013, 11:23:57 am
by amwebby
5 Replies
2845 Views
Last post May 03, 2012, 10:08:30 pm
by ApplianceJunk
3 Replies
2416 Views
Last post August 31, 2015, 07:53:56 am
by SMFHacks

+- Recent Topics

Import downloads by mickjav
September 25, 2021, 04:47:13 am

Errors with 5.0.6 version by Hatshepsut
September 24, 2021, 10:21:24 pm

Forum ToolBox by mickjav
September 23, 2021, 03:20:07 pm

Ads Description is running into Ad Location by Shades
September 23, 2021, 09:56:42 am

S3 System For SMF Attachments by SMFHacks
September 21, 2021, 05:46:38 pm

Boards Icon by mickjav
September 18, 2021, 02:13:43 pm

Search Word Limit by SMFHacks
September 17, 2021, 08:41:01 pm

Item not appearing in category by SMFHacks
September 17, 2021, 08:39:45 pm

Undefined index: gallery_ad_seller by Shades
September 17, 2021, 01:23:10 pm

What happens if? by SMFHacks
September 14, 2021, 10:25:07 pm

Powered by EzPortal