Forum at me and my mac » AdRotate

Writing different code for different banner IDs

(9 posts)

Tags:

  1. lobrex
    Member

    Hi - great plugin! I want to know if there's a way to set it up so that in the output from the "Add New Banner" page, if a particular banner ID is chosen, some code can appear in the string surrounding the bannercode. In other words, if Banner 1 is selected, <div id=1> will appear before and </div> will appear after, and if Banner 2 is selected, <div id=2> will appear before and </div> after.

    I would just plug in the code myself every time, but I'm working with students and want to limit how much code they have to write. Thanks!

    Posted 1 month ago #
  2. lobrex
    Member

    FYI - I meant banner group. We have banner group 1 in one location, banner group 2 in another, etc., and they will require different formatting around them.

    Posted 1 month ago #
  3. Arnan
    Kung-fu Jedi

    THat's not a bad idea at all, i'll put it in the bug release that i'm making now.

    Expect an update soon!

    Woohoo! Check out http://meandmymac.net
    Get my RSS feed! http://meandmymac.net/feed/
    Posted 1 month ago #
  4. lobrex
    Member

    Thanks! I'll look forward to the new release.

    Posted 1 month ago #
  5. Arnan
    Kung-fu Jedi

    Your proposed idea is included in version 2.5.1

    Woohoo! Check out http://meandmymac.net
    Get my RSS feed! http://meandmymac.net/feed/
    Posted 1 month ago #
  6. lobrex
    Member

    Thanks, but I'm a little confused on usage. If I enter %id% into the code, where do I then enter the code I want to place before or after the banner code? Maybe I'm just missing something. Thanks for your help.

    Posted 1 month ago #
  7. Arnan
    Kung-fu Jedi

    You can use this to style your ads. Say you want an ad in a sidebar with a specific thing you can write in the ad code something like:

    <div id="somecss-%id%"> AD CODE HERE </div>

    And in your CSS Style sheet add:

    #somecss-34 { YOUR CSS HERE }

    Obviously replace the 34 with the actual id of the ad.
    Please if you will, play with it a bit. Any suggestions, improvements are welcome.

    Woohoo! Check out http://meandmymac.net
    Get my RSS feed! http://meandmymac.net/feed/
    Posted 1 month ago #
  8. lobrex
    Member

    Thanks -- this makes more sense now. I'll experiment with it and see how it works.

    BTW, does %id% refer to ad groups or individual ads? I really need it to work for groups, since the ads within them will all appear in the same place in the layout.

    Thanks again for your help -- it's much appreciated.

    Posted 1 month ago #
  9. Arnan
    Kung-fu Jedi

    %id% refers to ads

    For groups you can simply use the group id you're gonna use in the code.

    <div class="css-3"> ADD CODE </div>

    etc. No need for a tag for that. Ads can only be in one group so it will always work.

    Woohoo! Check out http://meandmymac.net
    Get my RSS feed! http://meandmymac.net/feed/
    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.