Sidehistorik
...
Hide children |
---|
Here are different User Macros
...
that I have made, ripped off, copied
...
and changed/customized.
Some are just ready, and some are raw or pure samples. Find several good ones also at
...
...
...
google-analytics
facebook-button
Exclude "&layout=button_count" to get more text beside the button
Kodeblok |
---|
<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
Kodeblok |
---|
## @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
Update: I have found it better to put the slimbox javascript-includes into the Main template (url: /admin/editdecorator.action?decoratorName=decorators/main.vmd) so I can use it with all stuff, like the {me-map} macro
Kodeblok |
---|
<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
Kodeblok |
---|
## @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.
Kodeblok |
---|
<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" />
|
make-top
Macroes to make a Top mark and references to it
Kodeblok |
---|
<A NAME="top">
|
go-top
Create Link to Top, requires the make-top macro
Kodeblok |
---|
<a href="#top">Gå til Top</a><br>
|
msn-presence
MSN Presence Button. This is SAMPLE code for my presence, go to http://settings.messenger.live.com/applications/websettings.aspx to create Your code
Kodeblok |
---|
<script type="text/javascript" src="http://settings.messenger.live.com/controls/1.0/PresenceButton.js"></script>
<div
id="Microsoft_Live_Messenger_PresenceButton_1f13b57b60373c0"
msgr:width="100"
msgr:backColor="#DBDBDB"
msgr:altBackColor="#FFFFFF"
msgr:foreColor="#424542"
msgr:conversationUrl="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee=xxxxxxxxxxx@apps.messenger.live.com&mkt=en-US&useTheme=true&themeName=gray&foreColor=676769&backColor=DBDBDB&linkColor=444444&borderColor=8D8D8D&buttonForeColor=99CC33&buttonBackColor=676769&buttonBorderColor=99CC33&buttonDisabledColor=F1F1F1&headerForeColor=729527&headerBackColor=B2B2B2&menuForeColor=676769&menuBackColor=BBBBBB&chatForeColor=99CC33&chatBackColor=EAEAEA&chatDisabledColor=B2B2B2&chatErrorColor=760502&chatLabelColor=6E6C6C"></div>
<script type="text/javascript" src="http://messenger.services.live.com/users/xxxxxxxx0@apps.messenger.live.com/presence?dt=&mkt=en-US&cb=Microsoft_Live_Messenger_PresenceButton_onPresence"></script>
|
skype-presence
Skype Presence Button. This is SAMPLE code for my presence, go to http://www.skype.com/intl/en-us/tell-a-friend/get-a-skype-button/ to create Your code
Kodeblok |
---|
<!--
Skype 'My status' button
http://www.skype.com/go/skypebuttons
-->
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
<a href="skype:mos-eisley.dk?call"><img src="http://mystatus.skype.com/balloon/xxxxxx" style="border: none;" width="100" height="40" alt="My status" /></a>
|
me-map
This little Macro gives the possibility to present an adress with a link to a Google map, actually presenting itself in a lightbox. THis requires the {include-lightbox} macro, or the lighbox code loaded via the Template.
Take a look at http://code.google.com/apis/maps/documentation/staticmaps/index.html#Addresses - It is very Easy to make more parameters in the Macro, giving more options.
Also, my macro requires the image, placed in the images folder under the Tomcat.
...
Feel free to contact me at bnp@mos-eisley.dk for questions or advice.
My User Macro categories:
UI Children |
---|
Small programming Tips
Random number:
$action.dateFormatter.calendar.timeInMillis
Links
- http://confluence.atlassian.com/display/DOC/Writing+User+Macros
- http://confluence.atlassian.com/display/DOC/Guide+to+User+Macro+Templates
- https://developer.atlassian.com/display/CONFDEV/Confluence+Objects+Accessible+From+Velocity
- http://confluence.atlassian.com/display/DOC/Examples+of+User+Macros
- http://confluence.atlassian.com/display/DISC/Shared+User+Macros
- http://velocity.apache.org/
- Confluence List Space Administrators User Macro
- Confluence
- Confluence User Macros
- Confluence Objects Accessible from Velocity
- Confluence API – Space
- Confluence API – SpacePermission
- Confluence API – UserAccessor
- http://blog.networkedcollaboration.com/category/atlassian/
Macro Guide
See my Macro Guide
...