HTML for Admins only?

Discussion in 'vBulletin Discussions' started by ArnyVee, Jun 13, 2009.

  1. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    I started this thread on vB.org....

    Looking to post HTML for Admins only - vBulletin.org Forum

    ....I want to use HTML to post my banners/links for my affiliate program through ShopToEarn.net

    If I can get it to work properly, I want to add the html code in the first post with the spoiler mod displaying the discount codes for my registered members and allowing them to go shop on the normal websites, but with my referral link (and discount/coupon code via spoiler mod) that they could use at the shopping cart of that site.

    So, again, I'd like to have it so that I can have the admin (and admin only) be allowed to post HTML within a particular forum. Hopefully someone out there in AA-land has a solution for me ;)
     
  2. Peggy

    Peggy Regular Member

    Joined:
    May 18, 2009
    Messages:
    1,641
    Likes Received:
    58
    I use html to post my banners etc. anywhere on the forum.
     
  3. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Arny, I'm not sure if this is a viable option for you but I think you can enable HTML in announcements on a per-announcement basis. Perhaps that's something you could do?
     
  4. vB Style

    vB Style Newcomer

    Joined:
    Jun 8, 2009
    Messages:
    3
    Likes Received:
    0
    First Name:
    Adrian
  5. Boss

    Boss Resident Silly Man

    Joined:
    May 23, 2009
    Messages:
    941
    Likes Received:
    23
    Location:
    California
    First Name:
    Alex
    What would stop non-members from using that coupon code?
     
  6. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    He will probably hack the spoiler mod so that only registered members can see the contents. (Like vBulletin.org does for contents within code tags)
     
  7. Boss

    Boss Resident Silly Man

    Joined:
    May 23, 2009
    Messages:
    941
    Likes Received:
    23
    Location:
    California
    First Name:
    Alex
    Yeah, but vB.org probably uses a conditional. ;)

    Code:
    <if condition="$post['X'] != x">
    
    </if>
     
  8. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Yes; hence the hacking of the spoiler code. i.e. wrapping its contents with a conditional. :)
     
  9. Boss

    Boss Resident Silly Man

    Joined:
    May 23, 2009
    Messages:
    941
    Likes Received:
    23
    Location:
    California
    First Name:
    Alex
    Do'h!
     
  10. Chris

    Chris Regular Member

    Joined:
    Dec 27, 2007
    Messages:
    5,422
    Likes Received:
    86
    :doh:
     
  11. Dan Hutter

    Dan Hutter aka Big Dan

    Joined:
    Jul 20, 2006
    Messages:
    1,412
    Likes Received:
    515
    Location:
    New York
    Can you accomplish this without HTML?

    Just upload the banner some where and use img code to embed it you can wrap it with a link too.

    The use the spoiler mod as planned.
     
  12. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    Yes, I planned to use a spoiler/hide hack for the discount code. :)

    Dan, I might need some help (or just some rest before re-reading it) on your suggested solution. But, sounds like it might work.
     
  13. Dan Hutter

    Dan Hutter aka Big Dan

    Joined:
    Jul 20, 2006
    Messages:
    1,412
    Likes Received:
    515
    Location:
    New York
    Just holler if you need anything. :)
     
  14. Wayne Luke

    Wayne Luke Regular Member

    Joined:
    Apr 2, 2009
    Messages:
    991
    Likes Received:
    276
    Have you heard of Replacement Variables?

    You could easily make a replacement variable that looked for [banner-advertiser1] and replaced it with the HTML that is necessary to actually show the banner. You could then use that in any post and vBulletin would replace it every time it is seen. You could even create one that looked for [Random-Banner] to show a random banner.

    If you are just looking for a way to insert advertising but not actually include it in the content of the post, vBulletin 3.7.0 and higher includes Ad Location Templates. Two of them are actually in the first post. One at the start and another in the signature area. There is a third that is immediately after the first post. You can put your advertising code in those templates and even use conditionals to control how they show up.

    The only drawback, or is it a bonus, is that Replacement Variables are considered part of the style. So you would need to create one for each style unless they are children of the default style so you can take advantage of parent hierarchies.
     
  15. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Replacement Variables do indeed come in handy. I wonder why none of us thought of that so far. :P
     
  16. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    Replacement variables? Hmm..interesting. Gotta do some reading now on how to get those setup. Sounds like that's the way to go for me :)

    Thanks Wayne!
     
  17. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
  18. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
  19. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    So, I can make the "Search for Text" field be anything that I want. For example, I can use "Banner_Affiliate_1" and then input in the "Replace with Text" field the html for the banner and associated referral link that I want to use?

    Then, for my next one I could use "Banner_Affiliate_2", etc. Is that right?
     
  20. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Yes, that is correct, Arny. :)

    We have a RV set up here... for censoring of a certain competitor. If you can figure out who (name starts with a 'T') feel free to mention it in a post here and you will see what happens. :unhunh:
     

Share This Page