Button/link to watch a blog

Matthew Choy February 4, 2015

Looking for a solution and explanation to adding a button/link on a page that when clicked will add that user as a watcher to the space's blog.

4 answers

0 votes
Kevin Toth August 12, 2016

I have found a way to do this with our site without the custom code. We use ThemePress and had the same issue where we have a page serving up blog content. I was able to create a link button and direct it to this endpoint:

users/addspacenotification.action?spaceKey=[XX]&contentType=blogpost

It will redirect users to their "Watches" page in their profile but the resulting action works and they are now watching the space blogs

Jan June 5, 2019

I am looking for exactly this: Create a link or button with a link on any page to watch the blog of any (in the URL specified) space. When I try above mentioned link, Confluence tells me that the request is missing a required security token. 

When I just copy the URL from the regular space watch button, this seems to contain some kind of session or something. Can anybody help out? The user macro mentioned at the top does not work for me either. 

0 votes
Vera Henrichs
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 Leaders.
January 26, 2016

How about this feature? https://jira.atlassian.com/browse/CONF-40582 Pllease vote!

0 votes
Nick Muldoon
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 Leaders.
October 2, 2015

Hi Matthew, Stephen,

On the off chance that you don't want to maintain this code snippet and instead just want to subscribe a group of people to watch for new blogs in a space I invite you to explore Better Blogs for Confluence.

Better Blogs is a paid add-on that allows Space Administrators to subscribe users and groups to email notifications of new blogs in a space.

At Twitter we needed this feature to ensure every member of our product, design and engineering organisation (>1,500 people) were notified of new blog posts in the Engineering space. It didn't make sense to ask every new employee to subscribe to the blog in that space, and I didn't see this script at the time, hence Better Blogs was born.

With Better Blogs you can keep everyone informed, and do so with ease. If you're interested there is a 40% discount (use the promotion code HHYUWD) before the end of October 2015.

Any feedback? Contact me via nick@arijea.com or +1 415 568 7064.

Thanks gents, hope you don't mind me dropping this note here.

 

Cheers,
Nicholas Muldoon
Arijea

Jorge
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 Leaders.
January 8, 2016

What if somebody wants to opt out? Or a new person wants to opt in? We want to enable the individuals to own that instead of manage this in a centralized way, is this possible with your Plugin?

Nick Muldoon
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 Leaders.
January 10, 2016

Hi @Jorge, Today there is: - the ability to subscribe if you are not in the group, - no option for an individual to opt-out from the subscription One of our customers requested the ability to allow a subscribed group user to opt-out of notifications in December. And it sounds like it would be necessary for you too. We'll proceed with that work next week and release before end of January. Thanks Jorge, have a great week, Nick

clem
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 Leaders.
March 21, 2016

Hi @Nick Muldoon Is this work done already?

Thanks,

Cynthia

Nick Muldoon
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 Leaders.
March 21, 2016

Hi Cynthia,

Yes, we added the ability for a Space Administrator to specify whether a user subscribed as part of a group can opt-out of email notifications (on a per space basis) in 1.0.8 released last week. And the ability to opt-out for a user was added in 1.0.5 in February.

Let me know if we can help - nick@arijea.com.

Thanks Cynthia,
Nick

0 votes
Stephen Deutsch
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 Leaders.
February 5, 2015

Hi Matthew,

Here is a user macro I wrote to allow you to do that.  It is a bit hacky, but it worked when I tested it:

## @noparams
<a id="blog-watch-button" class="aui-button" href="javascript:void(0)" onclick="jQuery('#cw-watch-blogs').click();jQuery(this).hide();" style="display:none;">Watch This Blog</a>
<style>
  #inline-dialog-confluence-watch {
    opacity: 0;
  }
</style>
<script>
jQuery(window).load(function () {
  jQuery('#watch-content-button').click();
  setTimeout( breakFocus , 10 );
});
var breakFocus = function() {
  jQuery('#main-content').click();
  if(!jQuery('#cw-watch-blogs').prop('checked')) {
    jQuery("#blog-watch-button").show();
  }
  setTimeout( showAgain, 500 );
}
var showAgain = function() {
  document.getElementById('inline-dialog-confluence-watch').style.opacity = '1';
}
</script>

Actually, all this user macro does is take advantage of the fact that you can click on the watch button and click "Watch for new blog posts in this space".  This just turns it into a button.  If the user is already watching the blog space, then it will not show.

Matthew Choy February 5, 2015

Hi Stephen,

 

Thanks for this. Do you know if it is possible to tweak this to work on a different page but the same space as the blog?

 

Thanks,

 

Matthew

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events