Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11834
Latest: Volker S
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 42319
Total Topics: 7381
Most Online Today: 219
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 34
Total: 34

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

0 Members and 1 Guest are viewing this topic.

Offline Shades

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • 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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • 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

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • 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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • 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

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • 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

Offline Shades

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • 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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • 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

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • 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

Offline Shades

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • 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

Offline Shades

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • 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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • 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/

Offline Shades

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #11 on: April 18, 2022, 11:42:49 pm »
I'm trying to figure this out again lol! I've got the banners showing where I want but I can't get the site slogan to go underneath where I want it. I don't know php very well at all. I gave up on it last time but I really need to solve this if you can help. I'm uploading a couple images to show what I'm trying to do.

Hoping you could help me!

Here is the code as I have it now:

Code: [Select]
echo '
</div><!-- .inner_wrap -->
</div><!-- #top_section -->';

echo '
<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>';

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

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>';

// Show the menu here, according to the menu sub template, followed by the navigation tree.
// Load mobile menu here

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

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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • View Profile
Re: Banner placement question?
« Reply #12 on: April 23, 2022, 09:49:39 am »
Can you attach your index.template.php of your theme if you still need help with it.
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

  • Community Suite Customer
  • Full Member
  • ******
  • Posts: 185
  • Community Suite Customer
    • View Profile
    • Bikerhound.com
Re: Banner placement question?
« Reply #13 on: April 24, 2022, 10:20:48 pm »
Yes here it is! :)

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

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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16045
    • View Profile
Re: Banner placement question?
« Reply #14 on: April 25, 2022, 02:02:07 pm »
I put a div tag around it. See if this helps
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
4128 Views
Last post April 30, 2011, 03:07:23 pm
by David8
8 Replies
5304 Views
Last post September 01, 2011, 05:00:55 pm
by ApplianceJunk
9 Replies
6331 Views
Last post June 04, 2013, 11:23:57 am
by amwebby
5 Replies
2986 Views
Last post May 03, 2012, 10:08:30 pm
by ApplianceJunk
3 Replies
2735 Views
Last post August 31, 2015, 07:53:56 am
by SMFHacks

+- Recent Topics

Profile Gallery Link by Hatshepsut
July 04, 2022, 11:00:01 pm

Trying to access array offset on value of type null by SMFHacks
July 04, 2022, 08:14:20 pm

Pictures appearing in post by SMFHacks
July 04, 2022, 12:56:40 pm

Error When Uploading Gifs To Subcategories by SMFHacks
July 03, 2022, 05:50:19 pm

SMF forum by davejo
June 27, 2022, 01:16:25 am

Quick-moderation checkboxes by davejo
June 22, 2022, 09:27:24 am

Add option to Main Menu bar by Shades
June 21, 2022, 12:23:00 am

Logo and Category? by SMFHacks
June 12, 2022, 03:43:31 pm

prettyurls - TroubleShooting.wiki by GhostHunting
June 12, 2022, 02:52:57 pm

[Mod]Modification Update Version Checker by SMFHacks
June 06, 2022, 09:25:39 pm

Powered by EzPortal