Smart way to change code in the middle of the month?

Discussion in 'HTML & Website Design' started by postcd, Feb 19, 2014.

  1. #1
    Hi,

    i have a smarty code template (it supports html and javascripts) and i want to ask how to achieve that around half of time is displayed one code and half time another code.

    I mean my livechat system has limit of 30 chats per month, so i want to use it limitted time and some time appear nother chat system which has also 30 chats limit.

    How to randomize code appearance, but possibly not fully random each pageload time? I mean like one hour one code, next hour other.. or in scale of days..
     
    postcd, Feb 19, 2014 IP
  2. jumbldrohit

    jumbldrohit Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    You could just do a random load.

    So if you know you could do with two chat systems do this: When the website loads, pull out a random number from 1 or 2 and depending upon that show the plugin. With a 50% probability, you can be *almost* sure it works the way you want it to.
     
    jumbldrohit, Feb 21, 2014 IP