SharePoint 2010: Blog post alerts - sharepoint-2010

When creating an alert to a single blog post, I would have assumed that you would receive a notification email each time a comment was left on that post. This is not the case.
The alert will only notify you of any changes that are made to the actual item in the Posts list (e.g. if you alter the text in the Title or Body fields).
Does anyone know a nice way to go about creating an alert to notify the user whenever a comment has been left on the post? Ideally, I'm looking to replicate the behaviour here on stackoverflow where you can be alerted when anyone adds comments or answers to your post.

The solution that Raymund listed works for individual blogs.
We needed it for each and every blog though, so I wrote an Event Receiver and used Feature Stapling to attach it to the blog site template. This way, everytime someone posts a comment I look up which posting the comment was made against, lookup the creator of that post, and send them an email.

Blog Comments are treated as lists in Sharepoint
if you create a workflow when an item is added to that list to email you on create and/or change then your requirement is satisfied. You will need Sharepoint Designer on this one. Let me know if you need assistance I will show you step by step procedures if you want.

You could use the OOB alert functionality built into SharePoint. Just setup an alert on the comments list. You can do this with an Event Receiver and Feature Stapling as well.

Related

open document with alternate form from a link

Similar to the functionality of using a form formula in a view, I would like to figure a way to provide someone with a link to a document via a URL and have it open in an alternate form. I'm trying not to modify the actual form value on the document, that gets messy to keep straight.
The form is a very complicated form with tabbed tables and 90% admin data, but I would like to turn over the maintenance of just one small set of fields to the user community without them seeing everything else.
Is there a way to force a link to open it BY WAY OF A VIEW that has a form formula? That is what I am thinking. Either that or I create/populate some smallish document when providing the link, then send them a link to this smaller document and have it update the 'parent' in it's webquerysave event.
Thanks,
Matt
If you want to open the document in Notes, you could try to send them a notes-URL, in the form of
notes://yourServer/yourDatabase.nsf/yourView/yourKey?OpenDocument
I remember having a conversation about this with one of the original developers of the Domino web server many, many years ago -- but I wasn't 100% certain that I remembered the answer correctly. So, I just searched through my old documents looking for a draft of the article I was writing when I had that conversation (in 1997!). It turns out that I didn't cover it in that particular article, but I did cover it several years later in one of the chapters that I wrote for the Lotus Notes & Domino 6 Programming Bible
You may be wondering why, since a UNID uniquely identifies any note, is it necessary to include both a Document UNID and a View UNID in a URL. The same question actually applies to doclinks, which were discussed above. The truth is that you don’t have to include a View UNID in either case, but it does serve a purpose if you do. You can replace the View UNID in a URL with a zero, retaining the slash characters that surround it. If you do this, Domino will not be able to execute a Form formula, which you may have included in the code of one or more Views in your application. See chapter 15 for more information about Form formulas.
In other words, if you include the UNID of a view that has the Form Formula that you wnat in the ?OpenDocument URL that you are sending to the server. The Form Formula will be respected.

How to get github edit history of issue and issue comments via api?

I only found api to get issue list, issue content, issue comments list and content, no issue content edit history, no issue comments edit history.
No, this cannot currently be done purely from the API.
However, if we reverse engineer the way GitHub loads past edits in the web interface, and do a bit of scraping, we can accomplish the same thing without the API. Unfortunately, this means that we don't have the reliability of an API - GitHub's web interface is liable to change at any time, breaking our code. But it's better than nothing!
So, first we need a log of all the edits for a comment. Let's do this with the comment https://github.com/seisvelas/crypsee/issues/1#issue-874033952 (from a test repo provided by the gentleman who set the bounty on this question). On order to get a log of this issue's comments, we will need to base64 encode the issue number with '05:' then the word 'Issue' at the beginning. Why '05:'? I have no idea. But it's always there and it won't work with out it. So we'll be base64 encoding the string "05:Issue874033952", which gives us MDU6SXNzdWU4NzQwMzM5NTI=
Great, now we insert MDU6SXNzdWU4NzQwMzM5NTI= into this URL scheme: https://github.com/_render_node/{BASE64 ENCODING HERE}/comments/comment_edit_history_log, resulting in a link to https://github.com/_render_node/MDU6SXNzdWU4NzQwMzM5NTI=/comments/comment_edit_history_log
Following that link, we see an edit history, but not the contents of the edits themselves:
However, this gives us the information we need! If we look at the HTML, we see that all edits prior to the current edit are defined as buttons with a link to that edit:
<button
type="button"
class="btn-link dropdown-item p-2"
role="menuitem"
data-edit-history-url="/user_content_edits/MDE1OlVzZXJDb250ZW50RWRpdElzc3VlRWRpdDo1MzIxODcxNzE="
>
The URL pointed to by the data-edit-history-url is the same URL loaded via the browser's networking tab when clicking to view a past edit in the web interface!
Unfortunately, if you attempt to view that page on it's own, you get a 404. It is intended to be viewed only from the web interface. But that's no problem, just go to the web interface, view one of the edits, and copy the headers it sends along. In my case I'm using Chromium, so I just find the request to the edit in my networking tab, right click and hit 'copy as Fetch request (nodejs)' and viola, with those headers I'm good to go!
For example, for the comment we've been using this whole time, I make that request and get back a bunch of HTML. The content of the original edit is near the end:
<ins><p class="rich-diff-level-zero">before edit</p></ins>
There it is! I could write a script to automate this, but then I'd be doing everything for you :3 Suffice it to say that with a day's work of cleverly organized scraping, this is roughly what you must to in order to view these revisions. If someone does make such a tool, the OSINT community will surely be immensely grateful!
To see the features of github api, it is better to read the following link
The best source to get the answer:
https://docs.github.com/en/rest/reference/issues
Check the issues you mentioned, ie issue comments, edit history issue, etc. in the link above
As far as I saw it is possible to receive issue comments but I did not see a section for edit history issue
I also suggest you see the following links for the edit history issue:
https://github.com/isaacs/github/issues/954

Recommendations Bar: Remove read action (remove from my timeline)

The Recommendations Bar seems to work well, but there is not an ability to remove the most recent read action from a user's timeline. As all of the actions are handled by the plugin, there doesn't seem to be a way to get the ACTION_ID generated by the Read.
As such, Facebook will not approve my Read Action with the Recommendation Bar because I can't provide a link in the article that says "Remove from Timeline" that deletes the action from a user's timeline.
You read the /me/news.reads API call for the read action with your url as the object and then use that action id for removal.
I've had the same problem in getting my read action approved. Unfortunately, Facebook doesn't care and will reject your action on the basis that it doesn't provide the user the ability to later delete their actions.
The only way is to build this functionality in manually. The Recommendation Bar Plugin doesn't return the ID for the action after it has been posted to Facebook so you would have to manually query Facebook to get the information back:
$activity = $fb->api('/me/' . $action_id );
print_r( $activity );
You will then have to display the information correct and let the user delete their information from there.
For my site, I had to create a WordPress plugin to do just that. You can see it in action here:
http://www.xtremeps3.com/wp-admin/admin.php?page=facebook-activity/facebook-activity.php
And just as an update, the "social reading" function of the Recommendation Bar has been removed, probably due to the Read action issues (which were reported as a bug several months ago and marked as fixed at the same time as the feature disappeared). It just replicates the Recommend Box functionality now. –

VB.Net App to check personal Wordpress site for last post

I have a personal website that I want to see when the last post was made to it. Is there a way to find the last posted date on my blog?
In my application, I have a notification that I want to fire if we've made a 'News' post on our site so that our users are aware of any issues and I figured the best way would be to see when the last post was made.
Anyone have any ideas?
Thanks!
Since WordPress supports the metaWeblog API, you could use the XML-RPC.NET library to create a client that comminicates with your blog. You would use the metaWeblog.getRecentPosts method to get the most recent posts. You can find an example here.
http://www.pluralsight-training.net/community/blogs/aaron/archive/2008/08/19/programming-the-metaweblog-api-in-net-c.aspx
You might even be able to automate the login process, and scrape the post titles, comparing the first one to the one that was stored last. If they're different, it would indicate an update has been made.
Here's a method I came up with to automate the login part:
http://stateofidleness.com/2011/01/vbnet-automated-login-wordpress-site/
You could even connect to the mySQL database and query for the last entry date. (probably easier)

Facebook app to edit posts

Is it possible to make a Facebook app which edits user's post on his wall automatically (edits EVERY POST that user makes, app has user's permission and everything)
I don't think that's possible, but maybe I'm wrong?
Based on the Graph API docs, I actually think it could work.
Get the extended permission called
"offline_access". See
http://developers.facebook.com/docs/authentication/permissions
Periodically pull from
https://graph.facebook.com/PROFILE_ID/feed
to see if the user has posted new
posts.
If so, for each new post that has appeared:
Pull and store the text of the post.
Manipulate the text as desired.
Delete the original post using
"DELETE". See
http://developers.facebook.com/docs/api#deleting
Publish your modified version of the
post using "POST". See
http://developers.facebook.com/docs/api#publishing
#Jon: You cannot delete a post that your application has not published.
See here: https://developers.facebook.com/docs/reference/api/post/
No, it's not possible for security reasons. Even though you probably have the best of intentions, there are lots of people who unfortunately don't. The few ruin it for all.