SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question OK, I'm pulling my hair out....

    Ok, need a bit of help here.

    I have a site for my company that was started out just as a static site--and it's big...like 350 pages and counting. Anyhow, ALL of my marketing resides on this site...works well too.

    I now want to add a few banners rotating around here and there. I have hunted for the last 5 hours for what I want and can't find it.

    The site is located on an NT machine because we are now adding a bit of ASP work around the static pages, so I'm looking for a banner rotation system that will let me go through some banners but be able to keep the actual banner config in a seperate file that I can adjust and upload.

    It seems that every sript I have found defines the images and links IN THE PAGE, which could be a pain on a site that large (obviously) I'm using ultrdev, which means I could make that a library file, but I really don't want to have upload EVERY page of my site everytime I add an advertisement to the list.

    Anyone have any ideas? I'm not stuck on java either, I will use ANYTHING that works and is light to load, not worried about transition effects, just a new banner each time a page is loaded..

    Thanks in advance...JH

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is extremely simple to accomplish using ASP, all you'll need to do is put together a simple rotating script, written in VBScript, and place it in your root directory, then use include virtual - <!--#include virtual="/adrotator.inc"--> to place where you want. Of coarce if you dont want to convert all your pages to ASP, you could make a second one using JS for all your html pages..

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Salt Lake City Utah
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Try This

    http://www.aspin.com/func/search?tre...&cat=&x=41&y=5

    Aspin.com is a great resource for ASP script information.

    Also try http://www.4guysfromrolla.com

    Good luck...

  4. #4
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I would love to try that..

    I know that ASP would do great, but the majority of all of my pages right now are HTM pages and they all have two years worth of search engine marketing behind them, so to change them all to asp pages right now would stop my entire business in it's tracks.

    I need a solution that will work on both asp and htm pages.

    Any ideas?

    Thanks again JH

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Salt Lake City Utah
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Give this a shot and see what happens:

    http://www.4guysfromrolla.com/webtech/052400-1.shtml

    (assuming .ASP on server)

  6. #6
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I checkout a few JS rotators, and found this.one to be pretty good.

    Its setup for 5 ads which are radomly seleted each time the page is loaded, you could set it for more or less ads easly (just change all #5 to how many you have) when done put the first script in a exturnal.js file, the 2nd in ur pages..






    <html>
    <head>
    <title>Untitled</title>

    <script>
    // Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
    function create() {
    this.width = ''
    this.height = ''
    this.src = ''
    this.href = ''
    this.border = ''
    this.mouseover = ''
    this.sponsor = ''
    }
    ads = new Array()
    for(var i=1; i<=5; i++) { ads[i] = new create() }

    ads[1].width = "468"
    ads[1].height = "60"
    ads[1].src = "banners/banner1.gif"
    ads[1].href = "http://planmagic.com/businessplanning.html"
    ads[1].border = "0"
    ads[1].mouseover = "Click here to enter the PlanMagic Business world"
    ads[1].sponsor = "PlanMagic Business"

    ads[2].width = "115"
    ads[2].height = "55"
    ads[2].src = "banners/banner2.gif"
    ads[2].href = "http://simplythebest.net/shareware.html"
    ads[2].border = "0"
    ads[2].mouseover = "Our Hot shareware & freeware"
    ads[2].sponsor = "SimplytheBest Shareware"

    ads[3].width = "287"
    ads[3].height = "60"
    ads[3].src = "banners/banner3.gif"
    ads[3].href = "http://simplythebest.net"
    ads[3].border = "0"
    ads[3].mouseover = "Do we need to say more?"
    ads[3].sponsor = "Simply the Best"

    ads[4].width = "468"
    ads[4].height = "60"
    ads[4].src = "banners/banner4.gif"
    ads[4].href = "http://planmagic.com/marketingplanning.html"
    ads[4].border = "0"
    ads[4].mouseover = "Marketing planning software"
    ads[4].sponsor = "PlanMagic Marketing"

    ads[5].width = "468"
    ads[5].height = "60"
    ads[5].src = "banners/banner5.gif"
    ads[5].href = "http://webquestpro.com"
    ads[5].border = "0"
    ads[5].mouseover = "Enter the world of professional online marketing"
    ads[5].sponsor = "WebQuest Pro"

    var n = Math.random() + ''
    n = parseInt(n.charAt(5))
    if(n >5) {
    n = n - 5
    }
    else if(n==0) {
    n = n + 5
    }
    n += ""

    var image = ads[n]
    var ad = ""
    ad += '<a href="' + image.href + '" \n'
    ad += 'onMouseOver="self.status=\'' + image.mouseover + '\'\;return true" \n'
    ad += 'onMouseOut="self.status=\'\'"> \n'
    ad += '<img src="' + image.src + '" width=' + image.width
    ad += '\n height=' + image.height + ' border=' + image.border
    ad += '\n><br>Please visit our sponsor: ' + image.sponsor + '</a>'
    </script>






    </head>

    <body>
    <script language="JavaScript"><!--
    document.write(ad)
    // --></script>


    </body>
    </html>

  7. #7
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Got it..

    I found a ton of scripts that would do the job similar to the one you posted. My big dilemma was that I was going to have banners on all 350 pages, my fear was that when I wanted to add a new banner, I would have to update EVERY page, which is not a huge deal with advanced remove and replace OR Dreamweaver library files, but it's a pain to upload that many pages that often.

    Was looking for one that would let me control the images and links from a seperate file.

    I think though this morning, I found a script that is perfect, will be trying it out this afternoon and if it works, I will post it here.

    Thanks for everything.
    JH

  8. #8
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Salt Lake City Utah
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also put the entire JS banner script as shown previous in a file without the <script></script> tags, save it as rotatorname.js and put it in a common folder.

    then in the head of each page

    <script language="javascript" src="rotatorname.js"></script>

    this way you only have to edit the one file

  9. #9
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hehe, thought that was taken for granted

    plasma, you would put it a exturnal.js, say (adrotator.js) and put it in your root directory, then you'll only need to update the JS file.

    You'll need to put this in all ur pages, where you want the ad to display..
    <script language="JavaScript" src="adrotator.js"></script>

    GL..

  10. #10
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I'm with ya,

    I'll try exactly that.

    Thanks,

    JH

  11. #11
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loops

    Please consider, when you're writing scripts, if a loop with eval's could do what you're writing faster.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

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