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

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

0 Members and 1 Guest are viewing this topic.

Offline Shades

  • Full Member
  • ***
  • Posts: 219
  • 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: 16436
    • 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: 219
  • 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: 16436
    • 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: 219
  • 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

  • Full Member
  • ***
  • Posts: 219
  • 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: 16436
    • 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: 219
  • 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

  • Full Member
  • ***
  • Posts: 219
  • 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

  • Full Member
  • ***
  • Posts: 219
  • 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: 16436
    • 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

  • Full Member
  • ***
  • Posts: 219
  • 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: 16436
    • 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

  • Full Member
  • ***
  • Posts: 219
  • 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: 16436
    • 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
4387 Views
Last post April 30, 2011, 03:07:23 pm
by David8
8 Replies
5928 Views
Last post September 01, 2011, 05:00:55 pm
by ApplianceJunk
9 Replies
7615 Views
Last post June 04, 2013, 11:23:57 am
by amwebby
5 Replies
3423 Views
Last post May 03, 2012, 10:08:30 pm
by ApplianceJunk
3 Replies
3066 Views
Last post August 31, 2015, 07:53:56 am
by SMFHacks

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