Jump to content

User:Nicko756/Countdown tutorial

From SpongeBob Wiki
Revision as of 18:35, 11 May 2015 by imported>Nicko756 (Created page with "1. Copy this code and paste in into a new MediaWiki page called "MediaWiki:Coundowns": <pre>{{#if:{{Data:Countdowns}}|<script type="text/javascript" src="http://ajax.googleapi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. Copy this code and paste in into a new MediaWiki page called "MediaWiki:Coundowns":

{{#if:{{Data:Countdowns}}|<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" src="http://spongebobia.com/ESB/TimeCircle/inc/TimeCircles.js"></script> <link rel="stylesheet" href="http://spongebobia.com/ESB/TimeCircle/inc/TimeCircles.css"/> <div id="DateCountdown" data-date="{{Data:Countdowns}}" style="width: 100%;"></div> <script> $("#DateCountdown").TimeCircles({ "animation": "ticks", "bg_width": 1, "fg_width": 0.13333333333333333, "circle_bg_color": "#60686F", "time": { "Days": { "text": "Days", "color": "#FFCC66", "show": true }, "Hours": { "text": "Hours", "color": "#99CCFF", "show": true }, "Minutes": { "text": "Minutes", "color": "#BBFFBB", "show": true }, "Seconds": { "text": "Seconds", "color": "#FF9999", "show": true } } }); </script>|<hr/><div style="font-size:12pt; font-weight:bold; line-height:12pt; color:red;">An error occurred, <a href="http://{{SERVERNAME}}/wiki/Template:Data:Countdowns" style="color:blue;">Data:Countdowns</a> doesn't have a record for a page with this name:<ul><li>{{FULLPAGENAME}}</li></ul>Please copy the page name written above and go to <a href="http://{{SERVERNAME}}/wiki/Template:Data:Countdowns" style="color:blue;">Template:Data:Countdowns</a> for more info.</div><hr/>}}



2. Copy this code and paste into a new template called "Template:Data:Countdowns":

{{#switch:{{FULLPAGENAME}}|
|<fullpagename> = <time>
}}

3. Below "|<fullpagename> =


4. Add <nowiki><verbatim>Countdowns</verbatim> to the page where you want the countdown.