The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User Macro to Watch for New Blog Posts in a Space

Deleted user
October 13, 2021

Is there a user macro I can create that would allow users to click on it and it would have them watch for new blog posts in a space? I would like to put a button on my blog's home page that would allow them to watch all blog posts in the space?

The out of the box watch functionality when you click on "watch" on the home page does not allow you to just watch for new blogs. You can watch for all content, but we only want the blog notifications. Is this possible?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Dominic Lagger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 25, 2021

Hi @[deleted] 

There are 2 options for you.

First option: Out of the box from confluence. Click on a space on the left the "Blog" link. then on the right you have the option, to "Watch the blog"

image.png

Second option:

I wrote a user macro:

## Macro title: Watch Blog Button
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Dominic
## Date created: 18.07.2019
## Installed by: Dominic

## This is an example macro
## @param spacetitle:title=Space Title|type=string|required=true|default= |desc=Den Titel, welcher im Button angezeigt wird
## @param spacekey:title=Space Key|type=string|required=true|default= |desc=Den Space Key von dem Space, welcher du abonnieren willst.

<button id="twtr-watch-space-blog" class="aui-button">Abonnieren den $paramspacetitle Blog</button>
<script>
AJS.toInit(function(){
AJS.$('#twtr-watch-space-blog').on('click', function(){
addBlogWatcher();
});
});
function addBlogWatcher(){
jQuery.ajax({
url: AJS.contextPath() + "/spaces/addspacenotification.action?contentType=blogpost&key=$paramspacekey&atl_token="+AJS.Meta.get('atl-token'),
success: function (xhr) {
AJS.$('#twtr-watch-space-blog').text('Du hast geraden den Blog abonniert.');
AJS.$('#twtr-watch-space-blog').attr('disabled','disabled');
}
});
}
</script>

Regards, Dominic

Deleted user
October 27, 2021

Howdy Dominic,

That user macro looks exactly like what I want, I'll definitely give it a shot! Thank you so so much!

Marco Leist
March 18, 2024

Hi @Dominic Lagger your solution worked really well during the last years 👍

Unfortunatly, in our instance, with the updated to Confluence 8.5.6 this user macro stopped working :(

Do you or another reader happen to know of an 8.5 compatible solution?

Like Mandy P_ likes this
TAGS
AUG Leaders

Atlassian Community Events