Count Up BBCode

Ordinary BBCode Database
BBCodes that need nothing else than installation through ACP
There is no support here! Only Read Access!
Locked
User avatar
BBCode Bot
BBCoder IV
BBCoder IV
Posts: 239
Joined: 04 Mar 2010, 15:04
Location: bbcode table

Count Up BBCode

Post by BBCode Bot »

Count Up BBCode

Author: fl0o
Description: With the Count Up BBCode you can post a Count Up in a mesage on your board.

BBCode:

Code: Select all

[CountUp]{NUMBER1}/{NUMBER2}/{NUMBER3} {SIMPLETEXT}[/CountUp]
HTML:

Code: Select all

<script type="text/javascript">

/*
Count up from any date script-
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countup(yr,m,d){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" days"
document.write("It\'s been "+difference+" since {SIMPLETEXT}")
}
//enter the count up date using the format year/month/day
countup({NUMBER3},{NUMBER2},{NUMBER1})
</script>
Helpline:

Code: Select all

CountUp: [CountUp]day/month/year text[/CountUp]
Example:

Code: Select all

[countup]12/05/2008 phpbb3bbcodes.com startet[/countup]
Demo:
[countup]12/05/2008 phpbb3bbcodes.com startet[/countup]
Locked