January 21, 2018, 02:35:48 AM

Author Topic: Building a TSP style Sponsorship Banner System  (Read 4969 times)

David Galloway

  • Global Moderator
  • Mentor
  • *****
  • Posts: 119
  • Karma: +9/-0
    • View Profile
    • David Galloway
    • Email
Building a TSP style Sponsorship Banner System
« on: December 12, 2011, 07:48:45 AM »
Hi everyone, I remember in a recent episode of 5MWJ Jack said he had no problem if other people used the same type of sponsorship banner system as used on The Survival Podcast as long as he was credited for the design. I believe the Bryan at ITS Tactical uses the same design as well except he uses 2 columns of 5 square banners each instead of 17 rectangular banners.

I'd like to eventually use this system, but I'm not sure how to build it into my blog.

Does anyone know if there is an existing WordPress widget that will display and rotate sponsor banners automatically?

Thanks!

JakeR

  • Mentor
  • ***
  • Posts: 128
  • Karma: +6/-0
    • View Profile
    • JakeFactor.com
Re: Building a TSP style Sponsorship Banner System
« Reply #1 on: December 12, 2011, 01:13:09 PM »
Hi everyone, I remember in a recent episode of 5MWJ Jack said he had no problem if other people used the same type of sponsorship banner system as used on The Survival Podcast as long as he was credited for the design. I believe the Bryan at ITS Tactical uses the same design as well except he uses 2 columns of 5 square banners each instead of 17 rectangular banners.

I'd like to eventually use this system, but I'm not sure how to build it into my blog.

Does anyone know if there is an existing WordPress widget that will display and rotate sponsor banners automatically?

Thanks!

ITS tactical uses the Thesis framework, but personally I like standard theme from 8bit.  The reason is I am a developer and I bought the developer license for 99 bucks which gives me free updates, support, and unlimited installs on my clients sites.  Thesis charges for each client install. Standard theme allows for ad rotation as a random function or if you want it to change monthly, you can rearrange the widgets manually. Here's the link http://standardtheme.com/  and if you want to, here's my affiliate link for it.  Won't cost you anymore, but it will send me a few bucks if you buy it.  https://www.e-junkie.com/ecom/gb.php?ii=606601&c=ib&aff=194351&cl=64302  I highly recommend the support license.  To make it look good, you will need a designer (or at least an already designed header) as well as some knowledge of CSS to customize the colors, fonts, spacing etc.
Resources I use.
Bluehost Web Hosting. Reliable uptime, great interface and amazing customer service.
Standard Theme The wordpress them I use for most of my sites

jackspirko

  • Administrator
  • Mentor
  • *****
  • Posts: 198
  • Karma: +12/-0
    • View Profile
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #2 on: December 12, 2011, 06:18:02 PM »
Dude all I did was standardize on a banner size, make a column that would fit the width.  Then each week I move the banner from the bottom to the top and so on.  I just use a text widget for the banners.

What Bryan at ITS emulates is my sponsor approval system.  I kind of helped him figure out how to fit it to what he was doing.  Instead of one weekly move Bryan has all the banners rotate on each page load.  He is a programmer and designer so he uses those skills to do something more complex.  He uses a PHP call function to do this, honesty I could do it if I screwed around with it I just like the way I do things and the fact that anyone even with no programming skills can do it too.

Either way works.  The big key is no sponsor gets screwed, you can't buy the top etc.  My system and Bryan's do the same thing, his uses technology and I use simplicity.  Of course I am selling show mentions and banners, not just banners so I like the longer exposure cycles and slower non random rotation.  

Ian

  • Apprentice
  • **
  • Posts: 56
  • Karma: +4/-0
    • View Profile
    • Forgotten Weapons
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #3 on: December 12, 2011, 09:59:46 PM »
I'm surprised, Jack - with all you talk about automating systems, I assumed you had a nifty widget to rotate the banners for you. I was actually getting ready to write you to ask what it was. :)

« Last Edit: December 13, 2011, 06:35:21 PM by Ian »

jackspirko

  • Administrator
  • Mentor
  • *****
  • Posts: 198
  • Karma: +12/-0
    • View Profile
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #4 on: December 13, 2011, 11:52:10 AM »
If you find one let me know but to do it weekly is going to require a cron job and may not play nice with WP all the time.  Since I do it weekly it really isn't any effort, I just do it when I log in for my morning post it can't take more then 10 seconds to do.

David Galloway

  • Global Moderator
  • Mentor
  • *****
  • Posts: 119
  • Karma: +9/-0
    • View Profile
    • David Galloway
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #5 on: December 13, 2011, 01:09:10 PM »
Thanks for letting us know how it's setup, Jack. I too figured you had some sort of fancy custom widget.

j4mo

  • Mentor
  • ***
  • Posts: 153
  • Karma: +10/-0
    • View Profile
Re: Building a TSP style Sponsorship Banner System
« Reply #6 on: December 18, 2011, 11:55:50 PM »
You can do something like this using the PHP Code Widget Plugin: http://wordpress.org/extend/plugins/php-code-widget/

Install the plugin, insert a PHP code widget where you want the banners to cycle and then use some code like this:

Code: [Select]
<?php

$banners
[0]->img 'https://www.google.com/intl/en_com/images/srpr/logo3w.png';
$banners[0]->url 'http://www.google.com';

$banners[1]->img 'http://pic.mk/images/facebo1306089055.gif';
$banners[1]->url 'http://www.facebook.com';

$banners[2]->img 'http://www.ingyenesen.net/webimages/bing.jpg';
$banners[2]->url 'http://www.bing.com';

shuffle($banners);
foreach (
$banners as $banner) echo '<a href="'.$banner->url.'"><img src="'.$banner->img.'"></a><br/>';

?>


However if you don't like it changing every time the user refreshes the site, which I think would be very annoying, you could have it increment exactly like Jack said across any unit of time:

Code: [Select]
<?php

$banners
[0]->img 'https://www.google.com/intl/en_com/images/srpr/logo3w.png';
$banners[0]->url 'http://www.google.com';

$banners[1]->img 'http://pic.mk/images/facebo1306089055.gif';
$banners[1]->url 'http://www.facebook.com';

$banners[2]->img 'http://www.ingyenesen.net/webimages/bing.jpg';
$banners[2]->url 'http://www.bing.com';

$offset floor(time() / 5) % count($banners);
for (
$i $offset$i count($banners); $i++) echo '<a href="'.$banners[$i]->url.'"><img src="'.$banners[$i]->img.'"></a><br/>';
for (
$i 0$i $offset$i++) echo '<a href="'.$banners[$i]->url.'"><img src="'.$banners[$i]->img.'"></a><br/>';

?>


You see the 5 above ($offset = ...), in Jack's case where he wants that to change every week he would change it to (60*60*24*7). If you want it to change every day change it to (60*60*24).

The benefit of Jack's method is that it will be fair, as it increments opposed to randomizes... but you could make it random and change every period too:

Code: [Select]

.. setup banners like above

srand(floor(time() / X));
$offset = rand(0, count($banners)-1);

... two for loops like above


That would ensure that the offset is recalculated every X seconds

This code is not really tested, I ran the first and second one to make sure I wasn't crazy.

You could also, fairly easily, create ratios for which the banners are displayed. ie) Google is displayed in position 1 90% of the time. The sky is the limit

VideoGameRescue

  • Mentor
  • ***
  • Posts: 182
  • Karma: +9/-0
  • Bring an old friend back to life!
    • View Profile
    • Video Game Rescue
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #7 on: December 31, 2011, 08:32:13 AM »
@JackSpirko  Let's take info like this and make it a sticky. We are going to start getting the same questions if we don't.
Retro Gaming and bring an old friend back to life!


TPPrepper

  • Apprentice
  • **
  • Posts: 53
  • Karma: +0/-0
    • AOL Instant Messenger - tpprepper
    • View Profile
    • The Practical Prepper
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #8 on: February 16, 2012, 09:02:32 AM »
I have always thought the KISS principle keeps you from falling to far.... So rotating "who's on top" seems simple.
Looking at Jack's site, the banners flip and change on their own?
Is the banner created to do that?
I like the effect and would like to know how to do that.

Thanks
Vic

j4mo

  • Mentor
  • ***
  • Posts: 153
  • Karma: +10/-0
    • View Profile
Re: Building a TSP style Sponsorship Banner System
« Reply #9 on: February 16, 2012, 09:55:20 AM »
Is my code to complicated? I thought it was pretty dang simple myself. Do I need to wrap it into a plugin before you guys will touch it?

Joshuab

  • Mentor
  • ***
  • Posts: 164
  • Karma: +3/-0
    • View Profile
Re: Building a TSP style Sponsorship Banner System
« Reply #10 on: February 16, 2012, 11:04:57 AM »
Is my code to complicated? I thought it was pretty dang simple myself. Do I need to wrap it into a plugin before you guys will touch it?
J4mo,
Most of us are code-phobic or code-newbees. Having said that, when I'm ready for the banners I'll give it a try :)
But a widget always makes it easier.

Joshuab

TPPrepper

  • Apprentice
  • **
  • Posts: 53
  • Karma: +0/-0
    • AOL Instant Messenger - tpprepper
    • View Profile
    • The Practical Prepper
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #11 on: February 16, 2012, 11:33:16 AM »
Hey J4mo,
Wasn't beating on your work brother... just don't quite understand it.  :-[
I am new to code and just starting to get it.
What's a good way to learn some coding, willing to pull on the big boy panties and forge ahead!

Vic

jrj

  • Mentor
  • ***
  • Posts: 152
  • Karma: +16/-0
  • Recovering serial entrepreneur
    • View Profile
    • jrjBlog
Re: Building a TSP style Sponsorship Banner System
« Reply #12 on: February 16, 2012, 11:41:57 AM »
Hey J4mo,
Wasn't beating on your work brother... just don't quite understand it.  :-[
I am new to code and just starting to get it.
What's a good way to learn some coding, willing to pull on the big boy panties and forge ahead!

Vic

Best way to learn is by doing. Take something that works and modify it for your needs, after a while you'll get used to things and be able to make your own stuff. It's worth picking up a quick book (just go to Amazon and search for a beginning PHP guide and order by rating.) I recommend PHP for you not because it's the best language (let me put some emphasis on that... I *HATE* php) but if you're wanting to learn to extend wordpress you're going to need to know PHP.

I started writing code professionally in '93, had my first really dev-oriented job in '94, haven't looked back (though now I'm more of a nerd herder than developer.) No "traditional" education in comp-sci. However, the way I got started was in the late 80s and early 90s modifying games in BASIC to be the games *I* wanted to play. Learning by doing in development is superior to getting a comp-sci degree (though when used IN ADDITION to a degree it's even better-- I'm not bagging on academia here.)
« Last Edit: February 16, 2012, 06:29:06 PM by jrj »
--- JRJ : Adobe PM, former Microsoftie, recovering serial entrepreneur, Geek.
       http://www.jrj.org | http://twitter.jrj.org | http://facebook.jrj.org

Richard

  • Apprentice
  • **
  • Posts: 87
  • Karma: +5/-0
  • Cheating Death and Fighting Communism
    • View Profile
    • BlueSheepdog.com
Re: Building a TSP style Sponsorship Banner System
« Reply #13 on: February 16, 2012, 04:34:59 PM »
I missed this thread previously...but  a huge thank you to j4mo for posting the code.  I look forward to playing with it.

-Richard
Dad, husband, cop and defender of The Wall.  If you are interested in firearms, self defense, or police stuff, check out my websites BlueSheepdog.com and GunsHolstersAndGear.com.

save our skills

  • Mentor
  • ***
  • Posts: 196
  • Karma: +23/-0
    • View Profile
    • Save Our Skills
    • Email
Re: Building a TSP style Sponsorship Banner System
« Reply #14 on: March 22, 2012, 11:39:48 AM »
We use this at work
http://www.realitychecknetwork.com/managed-applications/openx?gclid=CNiD7ZmG-64CFUZN4Aod3ETWxA
I think there is an open source version.

Don't think that's what your after.. but maybe can open you up to some other possibilities
Save Our Skills
It is up! The Survival Channel If you have a survival or prepper blog please PM me!