Jump to content
Sign in to follow this  
MTrafzer

Display Calendar on Confluence 2.2.6 page via Macro

Recommended Posts

I have run into issues trying to get trumba calendars to display properly when using a confluence server.

 

The original java script that is supplied looks like this:

 

<script type="text/javascript" src="http://www.trumba.com/scripts/spuds.js"></script>'>http://www.trumba.com/scripts/spuds.js"></script>

<script type="text/javascript">$Trumba.addSpud({webName:"SomeCalendar",spudType : "mix" });</script>

 

I have tested this by pasting this code into a text doc and then loading it into a browser. Displays properly.

 

Where my problem come in is, that the $ and {} brackets are reserved characters on a confluence server.

 

(Confluence server = http://www.atlassian.com/software/confluence/)

 

because of these reserved characters, an error is displayed on a confluence page, rather than the calendar.

 

I have been in touch with tech support at confluence and they suggested the following macro code be used instead:

 

#set ($Trumba = '$Trumba')

 

<script type="text/javascript" src="http://www.trumba.com/scripts/spuds.js">

 

var params = new Object();

params.webName = "SomeCalendar";

params.spudType = "main";

 

$Trumba.addSpud(params);

 

</script>

 

While this will now execute without any errors on the Confluence side, I'm still left without any ccalendar being displayed.

 

Has anyone attempted displaying a trumba calendar on a confluence server previously, and been successful?

 

If so, any help I can get would be greatly apreciated.

 

Thanks

-MattT

Share this post


Link to post
Share on other sites

Originally, I tried so many variations on the javascript to get it to work inside Confluence. It appears I summitted a problematic piece of code to Confluence for their analysis. I have corrected the issue and the following code can be used for displaying a trumba calendar on a Confluence page.

 

The following gets pasted into a user macro:

 

#set ($Trumba = '$Trumba')

 

<script type="text/javascript" src="http://www.trumba.com/scripts/spuds.js">

</script>

<script type="text/javascript">

var params = new Object();

params.webName = "SomeCalendarName";

params.spudType = "main";

 

$Trumba.addSpud(params);

</script>

 

Hope this helps someone else too!

Share this post


Link to post
Share on other sites

Hi MTrafzer,

Wow, thank you for this information! This definitely helps me. Looking at the Confluence customer list, it seems that we might run into this again in the future. I'll share this info with our spud developers. Thanks again!

 

Jill / Trumba UA

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×