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: 192
Total: 192

Author Topic: Multiple ads in header  (Read 16614 times)

0 Members and 1 Guest are viewing this topic.

Offline rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Multiple ads in header
« on: June 10, 2015, 08:06:58 pm »
Hi VB,
I remember reading somewhere where you explained how to add multiple ads horizontally across the header and maybe footer - can't find it now.  Maybe on the smf site?  I see that it says 2 ad packages per row in the Settings tab but not sure what that means.

Anyway, can you help me figure this out please?  Right now I need 2 across the header (and might as well do the same possibility on the footer)
I see on another thread where you asked for the index.template.php file.  I have 2 themes that seem to be what everyone is using so I will start with those two at first.  Do you need that file from each theme?

Offline rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #1 on: June 10, 2015, 08:22:36 pm »
I tried to create another header ad and config'd it for right and changed the one I already have for left and the new one showed up on the right but the previous one disappeared.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Multiple ads in header
« Reply #2 on: June 11, 2015, 02:25:26 pm »
Attach your index.template.php

Uses this code the $showAdsCount controls how many are shown.
Code: [Select]
function ShowAdLocation($LocationID, $boardID = 0, $checkReturn = false, $showAdsCount = 1, $verticalAd = false)

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 rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #3 on: June 11, 2015, 05:23:17 pm »
Attach your index.template.php

Uses this code the $showAdsCount controls how many are shown.
Code: [Select]
function ShowAdLocation($LocationID, $boardID = 0, $checkReturn = false, $showAdsCount = 1, $verticalAd = false)
If that is something that I can change I will, unless it's a new function that is needed.
Here is another question - have you figured out a way that I can show one banner at a time and rotate through multiple banners in the header with a settable rotation time? or any other spot?  I have some themes that won't support two horizontally and I think it would be more advantageous to have many header banners sold and rotate through say 3-5 mins apart.

Offline rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #4 on: June 11, 2015, 07:00:34 pm »
Here are 3 files - thanks.
I would still rather have a rotating list

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Multiple ads in header
« Reply #5 on: June 12, 2015, 02:08:31 pm »
Attached the files


If you add multiple ads to a single ad spot they will auto randomly rotate but it is not time based.
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 rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #6 on: June 12, 2015, 05:22:06 pm »
Cool, so do I create 2 header "centered" banner ads and they will rotate?  I'll give it a try on my mirror site.
Thanks for fixing the files for me.

Offline rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #7 on: June 12, 2015, 06:03:00 pm »
They do alternate when you change pages  8)
I looked in the index.template files you attached and did a search for "$showAdsCount" and I don't see it anywhere - did you change it?
Unless the function is in another file??  I'm not a programmer so I don't know what I'm doing.
I was going to try to place some in the same header but have each in a different "justified" spot - like one left and one right.  Would it show them at one time or alternate them since they are in the "header"?

How many ads can I have in the same spot and it will still alternate through them?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Multiple ads in header
« Reply #8 on: June 12, 2015, 07:08:14 pm »
Each spot shows one ad.
The header ad spot I modified to show two in the same spot.

The files I modified I changed the ShowAdLocation function call in the overall header
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 rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #9 on: June 13, 2015, 05:47:59 am »
I'm figuring it out, the overall header is a spot not "header justified left" being a spot and "header justified right" being another spot. Seems when I put ads in those places its the same as when I put them both in the "header justified centered" spot.
Is there also a way to have more then one in the "overall header"? Like right and centered and left? I guess that would be 3 different "spots".
I'm trying to satisfy sponsors that all want the header spot.

Offline rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #10 on: June 13, 2015, 06:28:50 am »
VB DELETE THIS ONE POST - ITS THE SAME WEIRD PROBLEM I MENTIONED BEFORE
I tried other spots to see if I could give the supporter as much exposure in the area of expertise they had and found this (we've talked about this before but here is an example)
I added a spot and selected Top Message Index (see problem1.png) and there was one board selected by default.
And selected the appropriate boards for them (see problem2.png) and saved.
I don't see the ad in any top message index spots (see problem3.png)
I see the note to the left of the board selection area that the board must appear in the URL and in SMF only numbers appear in the URL (see problem4.png)
So I went back in and deselected the boards I wanted and selected the one board that was selected by default (see problem5.png)
Now I see the banner in all top message index spots (see problem6.png)
Is there anything I can do about this to make it work as designed?
« Last Edit: June 13, 2015, 06:33:50 am by rickk »

Offline rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #11 on: June 13, 2015, 05:07:09 pm »
I see that you provided multiples in this topic http://www.smfhacks.com/index.php/topic,8678.msg37628.html#msg37628
Is there anything I can copy and paste from the file in mine?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Multiple ads in header
« Reply #12 on: June 15, 2015, 10:54:23 am »
I made the changes in the index.template.php for the overall header to show two ads side by side at the same time if you have two different ads.
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 rickk

  • Member
  • *
  • Posts: 43
    • View Profile
Re: Multiple ads in header
« Reply #13 on: June 15, 2015, 11:11:43 am »
I tried to put two in the same header "spot" - one justified left and one justified right and they alternated like we discussed above. Is there anything special I need to do to get two side by side?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Multiple ads in header
« Reply #14 on: June 15, 2015, 11:14:35 am »
Yes you don't need to create two header locations.

Just modify ShowAdLocation();

And change to
ShowAdLocation(#location ID goes here#,0,false,2);l
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
1 Replies
5481 Views
Last post January 30, 2007, 10:24:10 am
by SMFHacks
0 Replies
3555 Views
Last post August 31, 2007, 03:48:19 pm
by jossiejojo
2 Replies
4548 Views
Last post September 16, 2010, 05:28:34 pm
by endomorph
18 Replies
9627 Views
Last post June 28, 2014, 03:42:30 pm
by SMFHacks
0 Replies
3883 Views
Last post March 13, 2016, 10:11:34 pm
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