Results 1 to 13 of 13
  1. #1
    Newbie
    Join Date
    February 20th, 2008
    Posts
    7
    Rotating banner?
    I'm an affiliate on Shareasale. Is there a way to take all the 160x600 banners from one merchant I am an affiliate of and make them rotate every time someone loads one of my pages?

    My page is based on Wordpress and has a banner on the right side. Every time you click refresh I'd like a new banner shown.

  2. #2
    Tax Paying Member
    Join Date
    November 14th, 2005
    Location
    Chapel Hill, NC
    Posts
    2,119
    An across the board rotator...........I don't know of one.

    Rotate per page click....Why not just insert a different banner on each page??

    Rotate on a per page basis.........There are numerous scripts available to do that. I hate to do it..........but that damn search box will tell you a lot.
    Do a google per your specs.


    BTW......Welcome aboard.
    You must climb this mountain. There is no elevator. ---- Don't stick your finger in the liquid nitrogen.
    Carolina China

  3. #3
    Newbie
    Join Date
    February 20th, 2008
    Posts
    7
    1 - Can't make every page different banner because it's php. It has code in it to load one banner. That is used for every page.

    2 - Yeah search is my mistake. I did a search on the Shareasale Knowledge Base, but forgot to do one here once I registered.

    3 - Will do search here and some Googling. Thanks.

  4. #4
    ABW Veteran Mr. Sal's Avatar
    Join Date
    January 18th, 2005
    Posts
    6,795
    Quote Originally Posted by yuppicide
    I'm an affiliate on Shareasale. Is there a way to take all the 160x600 banners from one merchant I am an affiliate of and make them rotate every time someone loads one of my pages? My page is based on Wordpress and has a banner on the right side. Every time you click refresh I'd like a new banner shown. 1 - Can't make every page different banner because it's php. It has code in it to load one banner. That is used for every page.
    yuppicide,

    Try this php script:

    banners.php CODE:
    --------------------
    $codes = array(
    "http://www.shareasale.com/r.cfm?b=XXXXX&u=XXXXX&m=XXXXX&urllink=&afftrack=\">http://www.shareasale.com/image/XXXXXXXXXXXX.jpg\" border=\"0\" alt=\"THE BANNER ALT TXT\">
    ",
    "http://www.shareasale.com/r.cfm?b=XXXXX&u=XXXXX&m=XXXXX&urllink=&afftrack=\">http://www.shareasale.com/image/XXXXXXXXXXXX.jpg\" border=\"0\" alt=\"THE BANNER ALT TXT\">
    ",
    "http://www.shareasale.com/r.cfm?b=XXXXX&u=XXXXX&m=XXXXX&urllink=&afftrack=\">http://www.shareasale.com/image/XXXXXXXXXXXX.jpg\" border=\"0\" alt=\"THE BANNER ALT TXT\">
    "
    );
    srand ((float) microtime()*1000000);
    shuffle($codes);
    $i=0;
    $number=1; while(list(, $code) = each($codes)) {
    if ($i>=$number) { break; }
    echo "$code";
    // echo '
    ';
    $i++;
    }
    ?>
    --------------------

    b=XXXXX -------------- replace the xxxxx with the banner number.
    u=XXXXX -------------- replace the xxxxx with your SAS ID.
    m=XXXXX -------------- replace the xxxxx with the Merchant ID.
    XXXXXXXXXXXX.jpg -------------- replace the xxxxx with the Merchant image name.
    THE BANNER ALT TXT -------------- put the alt text for the banner here.

    This is avery easy and simple php script to use, I have three banners there, but you can add more.

    If you name it banners.php and want to call it from any page, just put that banners.php on the directory and called from any page with this:




    I use it on some sites and every time the page is refreshed it will rotate the banners on that script. (it will show one different banner on every page view)

  5. #5
    ABW Ambassador PatrickAllmond's Avatar
    Join Date
    September 20th, 2005
    Location
    OKC
    Posts
    1,219
    Look for openx / openads. it is a very big hammer, but it will do what you want and more.
    ---
    This response was masterly crafted via the fingers of Patrick Allmond who believe you should StopDoingNothing starting today.
    ---
    Focus Consulting is where I roll | Follow @patrickallmond on Twitter
    Search Engine Marketing | Search Engine Optimization | Social Media | Online Video

  6. #6
    Member suniliu's Avatar
    Join Date
    March 7th, 2007
    Posts
    162
    I use a javascript rotator as I have a mix of php and html pages.

    Script as below:
    --------------------------------------------------------------------------

    --------------------------------------------------------------------------


    keep in mind that there should be only single inverted commas between the banner[number++] = " and "

    infact you enter anything between the double inverted commas as long as there are only single inverted commas in the html code and ofcourse NO ; and it will randonly rotate.
    - Sunil

    [SIZE=1]The impossibility of today is a hint of what shall be...[/SIZE]

  7. #7
    Newbie
    Join Date
    February 20th, 2008
    Posts
    7
    Thanks for the help, so sorry for getting back here so late. I am working on another website as well right now.

    I've tried this twice and cannot seem to get it to work. If I load up my page it doesn't show the ads at all. If I go directly to my banners.php file on my website it says:

    "Parse error: syntax error, unexpected T_STRING, expecting ')' in /path/to/banners.php on line 3


    -- I took out the path to my banners.php so nobody would go there directly.

    Quote Originally Posted by Mr. Sal
    yuppicide,

    Try this php script:

    banners.php CODE:
    --------------------
    $codes = array(
    "http://www.shareasale.com/r.cfm?b=XXXXX&u=XXXXX&m=XXXXX&urllink=&afftrack=\">http://www.shareasale.com/image/XXXXXXXXXXXX.jpg\" border=\"0\" alt=\"THE BANNER ALT TXT\">
    ",
    "http://www.shareasale.com/r.cfm?b=XXXXX&u=XXXXX&m=XXXXX&urllink=&afftrack=\">http://www.shareasale.com/image/XXXXXXXXXXXX.jpg\" border=\"0\" alt=\"THE BANNER ALT TXT\">
    ",
    "http://www.shareasale.com/r.cfm?b=XXXXX&u=XXXXX&m=XXXXX&urllink=&afftrack=\">http://www.shareasale.com/image/XXXXXXXXXXXX.jpg\" border=\"0\" alt=\"THE BANNER ALT TXT\">
    "
    );
    srand ((float) microtime()*1000000);
    shuffle($codes);
    $i=0;
    $number=1; while(list(, $code) = each($codes)) {
    if ($i>=$number) { break; }
    echo "$code";
    // echo '
    ';
    $i++;
    }
    ?>
    --------------------

    b=XXXXX -------------- replace the xxxxx with the banner number.
    u=XXXXX -------------- replace the xxxxx with your SAS ID.
    m=XXXXX -------------- replace the xxxxx with the Merchant ID.
    XXXXXXXXXXXX.jpg -------------- replace the xxxxx with the Merchant image name.
    THE BANNER ALT TXT -------------- put the alt text for the banner here.

    This is avery easy and simple php script to use, I have three banners there, but you can add more.

    If you name it banners.php and want to call it from any page, just put that banners.php on the directory and called from any page with this:




    I use it on some sites and every time the page is refreshed it will rotate the banners on that script. (it will show one different banner on every page view)

  8. #8
    ABW Ambassador PatrickAllmond's Avatar
    Join Date
    September 20th, 2005
    Location
    OKC
    Posts
    1,219
    Did you check out openx/openads? If you are opening another site this would be perfect for you. You can set up all of the banners in there and then reuse those same banners on any website. You can also just add banners in there and they appear on all your sites.

    Since you were sharp enough to install wp you can handle openx.
    ---
    This response was masterly crafted via the fingers of Patrick Allmond who believe you should StopDoingNothing starting today.
    ---
    Focus Consulting is where I roll | Follow @patrickallmond on Twitter
    Search Engine Marketing | Search Engine Optimization | Social Media | Online Video

  9. #9
    Newbie
    Join Date
    February 20th, 2008
    Posts
    7
    I did take a look at Openx. Really quickly. I downloaded it also. I am at work, so even though I'm not busy I have to LOOK busy LOL. So, there's certain things I do at work and certain things I stay away from. Mostly I edit my web pages in Notepad.. looks nice and plain.

    Anyway, I think the problem is on my end. I can't get Sunil's javascript thing to show up either.

    I am trying this script on a new site I am designing. I have a script that automatically generates websites with content on any subject I want. All I do is enter a few keywords.I am modifying the template to include the rotating ads and will add a menu up top to enhance it.

    My goal with the new site isn't unrealistic.. I'd like to make $13.33 a day from advertising LOL.. that would be about $400 a month which is my half of the rent payment.

  10. #10
    ABW Ambassador PatrickAllmond's Avatar
    Join Date
    September 20th, 2005
    Location
    OKC
    Posts
    1,219
    Good deal. Let me know if you need help with openx. Very easy to use.

    Try to install it on a 'main' domain someplace independent of all of your affiliate sites.

    Congrats on the goal. I should set one At least enough to buy a cup of coffee a month would be good.
    ---
    This response was masterly crafted via the fingers of Patrick Allmond who believe you should StopDoingNothing starting today.
    ---
    Focus Consulting is where I roll | Follow @patrickallmond on Twitter
    Search Engine Marketing | Search Engine Optimization | Social Media | Online Video

  11. #11
    Newbie
    Join Date
    February 20th, 2008
    Posts
    7
    Well, so far I do know my changes work because I wrote "test test test" and see it on the site.

    I will let you guys know when the site is finished so people can check it out.

    I was thinking of turning my whole thing into an E-Book. It uses one piece of software that you can purchase for $3-$15 depending on where you go, web hosting, and other tools that are freely available on the internet, such as GiMP to edit photos.

    You can setup a site within minutes using this software that populates your site with content. People don't need to know how to use this software it's so easy, but I could also go through guiding people tips on picking a domain name, paid web hosting vs free web hosting, and customizing the templates such as I am trying to do here with the rotating banners.

    The program itself includes Adsense and Amazon Affiliate already. I wanted to add one or two more.

    My original goals were to make the website pay for itself, which is $5.95 a month.

  12. #12
    Newbie
    Join Date
    February 20th, 2008
    Posts
    7
    Tried Sunil's script on a blank page of it's own with no luck either. Maybe I need some other script in the head which I wasn't provided.

    Will go take a more indepth look at Openx, although it seems like a lot of files just to accomplish something so small.

  13. #13
    Newbie
    Join Date
    February 20th, 2008
    Posts
    7
    Tried even putting a single image on the page with no luck. I finally decided to try and stick it on another page that loads also.. works fine. Thanks guys.

  14. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Rotating Banner
    By NarrowsBridge in forum ShareASale - SAS
    Replies: 14
    Last Post: January 28th, 2009, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •