Her are different Macros that I have made, copied og changed. Find several good ones also at http://confluence.atlassian.com/display/DISC/Shared+User+Macros
Google Analytics
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-10804579-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>
Facebook like Button
Exclude "&layout=button_count" to get more text beside the button
<script language="JavaScript" type="text/javascript">// <![CDATA[ { document.write('<iframe src="http://www.facebook.com/plugins/like.php?href='+location.href+'&layout=button_count" frameborder="0" scrolling="no" width="100%" height="62px" allowtransparency="true" style="height: 62px; width: 100%;"></iframe>'); } // ]]></script>
Image lightbox with Confluence style
Images are resized on the fly, making it pretty slow
## @param path:title=Status\|type=string\|required=true\|desc=Status to display ## @param image:title=Status\|type=string\|required=true\|desc=Status to display ## @param group:title=Status\|type=string\|required=true\|desc=Status to display <a href="/images/${parampath}thumbs/800pxHigh/${paramimage}" class="confluence-thumbnail-link" title="${paramimage}"><img src="/images/${parampath}thumbs/200pxHigh/${paramimage}"></a>
Slimbox2 including
Slimbox JS and Jquery must bedownloaded from http://www.digitalia.be/software/slimbox2 and placed in something like /opt/confluence/confluence/slimbox
<script type="text/javascript" src="/slimbox/js/jquery.js"></script> <script type="text/javascript" src="/slimbox/js/slimbox2.js"></script> <link rel="stylesheet" href="/slimbox/css/slimbox2.css" type="text/css" media="screen" />
Image lightbox with Slimbox2
This required the "Slimbox2 including" Macro
## @param path:title=Status|type=string|required=true|desc=File Path ## @param image:title=Status|type=string|required=true|desc=Image Name ## @param group:title=Status|type=string|required=true|desc=Group <a href="/images/${parampath}thumbs/800pxHigh/${paramimage}" rel="lightbox-${paramgroup}" title="${paramimage}"><img src="/images/${parampath}thumbs/200pxHigh/${paramimage}"></a>
Fancybox including
Confluence also uses Fancybox, this can give issues.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="/fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <script type="text/javascript" src="/fancybox/jquery.mousewheel-3.0.4.pack.js"></script> <link rel="stylesheet" href="/fancybox/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
Go To Top
Macroes to make a Top mark and references to it
Make Top Anchor
<A NAME="top">
Create Link to Top
<a href="#top">Gå til Top</a><br>