Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Display current datet -> macro / user macro / plugin?

krzychus April 22, 2015

Hello!

Today I started to read the documentation for confluence and to be honest I'm a little bit confused. I found a nice topic here somewhere about the differences between macro and plugin, but still I don't know which should I choose for my task. 

For the first thing, I would like to create plugin/macro (don't know which one should I choose) just to display the current date and time - that's it.

The second task which I want to do is create a button, after which I will be able to generate a PDF file out of the page and then send it to another website (where I  have build an API for uploading data). This task is not related to the first one - the first is just for "training" smile

I hope I can receive some help here.

Thank you 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2015

A plugin is a chunk of code that provides new functions in Confluence.  The bit that confuses a lot of new users is that those functions could be macros.

You also have the option of user macros - an admin can write these directly in Confluence without needing to code a plugin (they need a bit of coding knowledge, but not a lot).  And to confuse it more, you can share and distribute these via plugins too...

For your date thing, I'd write a user macro, I suspect it's only a few lines (as an ex-developer, I'd try to do it in one...)

The second task is probably a plugin frankly, a web-fragment for the button, then some code behind it to prepare the pdf and do the "send"

0 votes
krzychus April 22, 2015

Hi, 

thank you for your answer. 

According to the first task now I know how to:

  1. create user macro
  2. use the code for getting the date for example
  3. insert a button which redirects to URL

But still I don't know how to create a button which will send something to slack...

 

Thank you in advance.

 

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2015

I think you need to write a plugin for the second one - a user macro doesn't have the back-end capability for your "send" unless the send is a simple "http post" of some sort

krzychus April 23, 2015

The http post would be fine. This is my second topic: https://answers.atlassian.com/questions/15278125

krzychus April 23, 2015

I've solved the issue from the link.

TAGS
AUG Leaders

Atlassian Community Events