The Admin's Advent Calendar - The Lost Days 1 - 11


Because of size restrictions for articles on the Community platform, I had to remove the first days of the Admin's Advent Calender 2017  

Here they are again:



Do you export your Confluence pages to pdf? And do you know that you can customize the look and feel of your exported content?

This is the first part of the pdf export options package. It will be continued in more of the other packages until Christmas Eve :-)


First: Page Orientation
Sometimes you want to export a page with a wide table to pdf. It would be great, if the page would use the landscape format.

Set this in the PDF Export Stylesheet of your space:


And add the following to the PDF Stylesheet:

/*A4-sized pages in landscape orientation are 297 mm wide by 210 mm long*/
size: 297mm 210mm;

Second: Page Breaks
Exporting more than one page usually results in a pdf document where the page breaks do not correspond to the page breaks of your Confluence pages. Force the pdf export to set a page break before each new Confluence page with the following PDF Stylesheet:

page-break-before: always;

Third: Page Numbering
Do you need page numbers on your PDF? Here's how to do that:

Add this to your pdf Stylesheet:

content: counter(page);

And this to your PDF Space Export Footer:

<span id="pageNum"/>

13 Days left...



Lazy Sunday #2 - package number 10 reveals a second candle, nothing else. No macros and no tips today. Light the candle and enjoy the day with your friends and family!


It’s also time for decorating your home. Get all your Christmas hodge podge from the  attic or the cellar or buy some new decoration, as much as you can. The more decoration you have, the more likely Santa will find your home  :-)

Just 14 days from now...



Talking of macros... Do you want to know, which macros your users really like and which ones are not used at all? Maybe you pay a lot for an app and it is hardly ever used? 


How can you research the usage of macros in your Confluence instance? Just look at the page "Macro Usage" in your Confluence Administration Dashboard:

http://<your confluence url>/admin/pluginusage.action

But, be careful. This view might be disenchanting. Don't be disappointed, if the people in your kingdom don't use your super awesome, amazing and extremely expensive app with all these great macros. Maybe they just don't know that it exists. Make some noise, trainings and advertising, then the macro usage will increase, I'm sure :-)   

15 Days left...




Once upon a time, the admin's people wanted to highlight table cells including the text "NOK" (no, it's not Norwegian Krone, but short for Not OK). They didn't want to add the color manually, it should happen on the fly.


You already know, the admin loves user macros, so he wrote another one:

Macro Body Processing: No macro body

## @noparams

<style type="text/css">
background: #F6DFD4;

<script type="text/javascript">
AJS.$("td").filter(function() {return $(this).text() == "NOK";}).addClass('rotfaerben');

Save the macro and then add it to your page containing the table. Now, every table cell that includes "NOK" will be colored.

16 Days left...




The admin built a macro called "Baustelle". This is German for "Construction Site".  It is based on a regular Confluence panel, embedding a construction site picture and a text. The code looks like that:

Macro Body Processing: Rendered

## @noparams

<ac:structured-macro ac:name="panel">
<ac:parameter ac:name="bgColor">#f4e0a4</ac:parameter>
<ac:parameter ac:name="titleBGColor">#f4e0a4</ac:parameter>
<ac:parameter ac:name="title">!Startseite:bilder^underconstruction.png! &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In Arbeit</ac:parameter>
<ac:parameter ac:name="borderWidth">0</ac:parameter>

The image "underconstruction.png" is attached to a page "bilder" in the space "Startseite". This page is used as an image storage. Every occurence of the Baustellen-macro is using the central image. Why not surprising your users now and then with a new seasonal picture?


17 Days left...




December, 6th is the Nikolaus day in the admin's kingdom. It is said, that the Nikolaus is visiting every house and puts some sweets into every boot he can find. So children (younger and older and even grownups) put their boots and shoes out of the closet and hope, the Nikolaus fills them with some chocolate at night.


Here's your chocolate for Nikolaus day: As an admin, are you tired of answering questions like "what kind of permissions has user Thomas in space ABC"? Then you can easily give your user a self-service page, where they can lookup granted permissions in their space (even if they are no space admins).

You need to use groups for granting permissions. Add your users into some space-related groups, maybe a group for writing, another one for just viewing or commenting and grant the permissions to the groups instead of single users.

Then, add a page to your space, e.g. "Permissions in space ABC", add one "User List" macro to the page for every group you use in that particular space, add some comments to the info page and save it. On such a page, your users are able to research, whether another user is granted access to a space. If you don't want that information going public, add some page restrictions to the page.

18 Days left...




Today's package contains a very small, but very useful hint. The admin experienced, that hardly noone knows, that you can click the mousewheel the same way as you can click the left and right mouse button.
And what's the big benefit? Click on a link with the mousewheel - the target page will open in a new browser tab! Tadaa!

If your people ask once again, how they can open a linked page in a new browser window, tell them the secret of the mousewheel! 


19 Days left...



Monday morning, users complain about being kicked out of Confluence after they came back from Christmas Shopping. It takes definitely too long to get all the presents for the whole family...


So, here's how you give them more time until they have to login again:

Find the file /confluence/WEB-INF/web.xml in your installation directory
Set the session-timeout from 60 to anything you like - this is the value in minutes that the server-side session stays valid while a user is not active anymore (for example when he is going Christmas shopping).
But don't set the value too large, the sessions will never be removed and you could get into trouble with your serverside memory then.

20 Days left...




Today, it's Sunday. The admin is not working. But anyway, he opens the next package: 


Have a nice day, relax, have some tea and a gingerbread and do not even think of trying out any new user macros today! 

 21 Days left...




Have you ever wanted to welcome your user on your Confluence page by name? Not just "Hi, dear lovely user, nice to see you", but "Hi, Santa, nice to see you"?
Then this user macro is for you:

## @noparams

#if($username && $username.length()>0)
dear lovely user,

Put the macro on your page like this: Hi, {macro} nice to see you


22 Days left...




So, today is December 1st. Let's open the first package.

Opening the first package reveals a small macro for displaying big, large and yellow tooltips:



How is this implemented:

First, you have to add a user macro with the following code:

Macro Body: rendered

## @param tip:title=BigTooltip|type=string|required=true

<span class="link">
<a href="javascript&colon; void(0)">
<font face=verdana,arial,helvetica size=2>$body</font>

Then, add the following to your space stylesheet: a span {
display: none;
} a:hover span {
display: block;
position: absolute;
margin-top: 10px;
margin-left: -10px;
width: 300px; padding: 5px;
z-index: 100;
color: #000000;
background: #FFFFAA;
font: 15px "Arial", sans-serif;
text-align: left;
text-decoration: none;

Add the macro to your page, edit the tooltip-text (you can use the usual HTML-tags for linebreaks or formatting the text) and finally put the hover-text as content into the macro. That's it.

23 days left...





Log in or Sign up to comment
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked yesterday in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

76 views 4 4
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you