Test - Useful Coding

Handy Wikidot codes, just copy / paste and alter…………………….


Page Lists

[[module ListPages separate="no" limit="10000" perPage="1000" order="title desc (or title)" category ="cat1,cat2" tags="tag1,tag,2"]]
%%title_linked%%
[[/module]]

Count

[[module CountPages category="song" tags="+song,+tour_sob"]]
In total **%%total%%** different songs were performed on the tour.
[[/module]]

Gallery

[[module FlickrGallery userName="brucebase wiki" sort="date-posted-desc" perPage="50" tagMode="all" tags="mmmm,dd,yyyy"]]

ShareButtons

Addthis Floating - Works! (On Addthis currently disabled)

[[html]]
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-54689dd615767dba"></script>
[[/html]]

Addthis Inline - Works

[[html]]
<script type="text/javascript"> var addthis_share = { url: document.referrer } </script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-54689dd615767dba"></script>
<div style="float: right;">
<div class="addthis_sharing_toolbox"></div>
</div>
[[/html]]

Addthis OLD style - Works

[[>]]
[[html]]
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_pub="ra-54689dd615767dba";</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-addthis-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
<!-- AddThis Button END -->
[[/html]]
[[/>]]

Wikidot own Facebook Module - Works

[[table style="float: right; padding: 0px; width: 20px"]]
[[row]]
[[cell style="border: 0px solid silver; width: 20px; height: 20px; padding: 0px; vertical-align: bottom"]]
[[social facebook]] 
[[/cell]]
[[/row]]
[[/table]] _

Twitter (Remove the $)

$$[[include :snippets:tweet-button
|url=%%link%%
|text=%%title%%
|via=wikidot
|count=horizontal
|align=left
]]$$

Google+ (Remove the $)

$$[[include :snippets:plusone-button
|url=%%link%%
|size=small
|count=false
]]$$
 (Remove the $)
$$[[include :snippets:plusone-button
|url=%%link%%
|size=tall
|count=false
]]$$

Previous/Next

[[div style="float:left; width:50%; "]]
[[<]]
[[[PreviousPage|<<  Previous]]]
[[/<]]
[[/div]]
[[div style="float:right; width:50%;"]]
[[>]]
[[[NextPage|Next   >>]]]
[[/>]]
[[/div]]

HTML5 Media

(Remove the $)

$$[[include :snippets:html5player
|type=audio
|url=audio file url
]]$$
$$[[include :snippets:html5player
|type=video
|url=video file url
]]$$
$$[[include :snippets:html5player
|type=video
|url=video file url
|autoplay=true
]]$$

Buttons

[[>]]
[[button source style="background-image: url(http://www.wikidot.com/local--files/files/view-source.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]]
[[button print style="background-image: url(http://www.wikidot.com/local--files/files/document-print.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px;color: #444"]]
[[/>]]

Last Update

[[div style="font-size: x-small; whitespace:no-wrap; float: right"]]
[[table]][[row]][[cell]]
This site [[[*system:recent-changes|updated]]]
[[/cell]][[cell]]
[[module ListPages category="*" tags="-_system,-_redirect,-_include"  limit="1" order="dateEditedDesc" separate="no"]]
%%date_edited| %O ago%%.
[[/module]]
[[/cell]][[/row]][[/table]]
[[/div]]

Tabs

[[tabview]]
[[tab 1]]
Content 1
[[/tab]]
[[tab 2]]
Content 2
[[/tab]]
[[/tabview]]
 (http://extensions.wdeditor.com/extension:13#post-35)
(Remove the $)
$$[[include :csi:include:css3-tabview
|TabColor=#666666
|TabFadeColor=#111111
|SelectColor=#0088eb
|SelectFadeColor=#0077eb
|ActiveColor=#00558b
|ActiveFadeColor=#0672b7
|textcolor=#333333
|textcolor1=#ffffff
|textcolor2=#ffffff
|textcolor3=#eeeeee
|Background=#fafafa
|Border=#eeeeee
]]$$
[[=]]
[[tabview]]
[[tab Tab title 1 goes Here]]
Tab content 1 goes here...
[[/tab]]
[[tab Tab title 2 goes Here]]
Tab content 2 goes here...
[[/tab]]
[[tab Tab title 3 goes Here]]
Tab content 3 goes here, and so on...
[[/tab]]
[[/tabview]]
[[/=]]

Include Anypage

[[iframe http://www.springsteenlyrics.com/lyrics.php?song=dancinginthedark width="95%" height="100" scrolling="yes"]]

Show/Hide

[[collapsible show="+ Show media information" hide="- Show media information"]]
No known audio.
[[/collapsible]]

Tables

[[table style="width: 70%;"]]
[[row style="vertical-align:top;"]]
[[cell style="border: 1px solid silver; Width: 50%;"]]
Data1
[[/cell]]
[[cell style="border: 1px solid silver; Width: 10%;"]]
Data2
[[/cell]]
[[cell style="border: 1px solid silver; Width: 40%;"]]
Data3
[[/cell]]
[[/row]]
[[row style="vertical-align:top;"]]
[[cell style="border: 1px solid silver; Width: 50%;"]]
Data4
[[/cell]]
[[cell style="border: 1px solid silver; Width: 10%;"]]
Data5
[[/cell]]
[[cell style="border: 1px solid silver; Width: 40%;"]]
Data6
[[/cell]]
[[/row]]
[[/table]]

[[table style="width: 70%; border-collapse:collapse;"]]
[[row style="font-weight: bold;"]]
[[cell style="border: 1px solid silver; Width: 50%;"]]
Data 1
[[/cell]]
[[cell style="border: 1px solid silver; Width: 10%;"]]
Data 2
[[/cell]]
[[cell style="border: 1px solid silver; Width: 40%;"]]
Data 3
[[/cell]]
[[/row]]
[[row style="font-weight: bold;"]]
[[cell style="border: 1px solid silver; Width: 50%;"]]
Data 4
[[/cell]]
[[cell style="border: 1px solid silver; Width: 10%;"]]
Data 5
[[/cell]]
[[cell style="border: 1px solid silver; Width: 40%;"]]
Data 6
[[/cell]]
[[/row]]
[[/table]]

Current Year

[[html]]
<p>Current year is: 
<script language="JavaScript" type="text/javascript">
    now = new Date
    theYear=now.getYear()
    if (theYear < 1900)
    theYear=theYear+1900
    document.write(theYear)
</script> 
[[/html]]
[[html]]
<script>

    var mydate=new Date()
    var year=mydate.getYear()

    if (year < 1000)
        year+=1900

    var day=mydate.getDay()
    var month=mydate.getMonth()
    var daym=mydate.getDate()

    if (daym<10)
        daym="0"+daym

    var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday",
                            "Friday","Saturday")
    var montharray=new Array("January","February","March","April","May","June",
                            "July","August","September","October","November","December")

    document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+year)

</script>
[[/html]]

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License