Forum Discussion
AndrewF SuzieH ClaudiusH VikasB Can you folks give any input on this?
I'm trying to create *some* form of blog manager board for our blog manager, who is frustrated by the lack of one OOTB. I know SMM offers this, so I'm hoping there is some hook I can use to get the same info. We don't need SMM, since we already use other tools for Social Media. All we'd like is a blog dashboard for the editor.
However, as far as I can tell there's no ability to use LiQL to get draft status articles, especially if they're not your own. For example,
is_draft
is only available for Create and Update, not a Query (Read).
When a post is in draft, it doesn't seem to be able to be accessed by LiQL, either. It just doesn't show up. For example, this returns no rows even though I just saved a post to draft with that author id:
SELECT * FROM messages WHERE author.id = '30'
Returns:
{ "status" : "success", "message" : "", "http_code" : 200, "data" : { "type" : "messages", "list_item_type" : "message", "size" : 0, "items" : [ ] }, "metadata" : { } }
However, if I switch to the user (id=30) and look for the post id in the Canonical Url field, I can get the post ID, and when I search for that with LiQL, it returns the record.
SELECT * FROM messages WHERE id = '7833' Returns 1 record (leaving out results for sake of space)
Maybe I can set up a subscription for whenever a post is created and get the message.id from that? However, those instructions are fairly confusing. And where would I store the list of new posts? Can I set up a server-side array?
Whatever the method to get there:
How can I use LiQL to generate ANY approximation of a manager board for our blog manager where I can display other authors' draft articles so she can review them before publishing happens?
I'm stuck and can't find anything to truly help solve this on the boards or documentation.
Happy to use API v1 or v2, hacks, pretzel logic, sorcery, or anything else. I'm asking you guys to think out of the box, please.
I know it likely "can't be done" using normal means. Please offer suggestions of how I might make it happen. For example, how does the VIEW ALL DRAFTS get the drafts? Thanks!
Inactive User, let me know if this approach might work for you.
Try the Community API v1 call for topics/recent. It supports returning messages that are in draft state. The call (using session key authentication) would be:
/restapi/vc/boards/id/<board-id>/topics/recent?visibility.scope=draft&restapi.session_key=<auth-token>
Note that only permissible users are able to see drafts as configured in user permissions for the given node. Furthermore, this will only work for drafts in Blogs and TKBs which are different than the autosave messages available on other interaction styles.
This REST API endpoint supports the following query parameters and possible values:
- moderation.scope
- approved
- rejected
- unmoderated
- marked_undecided
- marked_approved
- marked_rejected
- all_unmoderated
- mod_private
- approved_and_all_unmoderated
- level2_unmoderated
- moderation_with_reason_code
- visibility.scope
- public
- public_moderateable
- draft
- on_hold
- rejected
- unmoderated
- marked_undecided
- marked_approved
- marked_rejected
- deleted
- disabled
- personal
- friends_only
- public_and_draft
- private
- not_deleted
- all
- none
- public_and_unmoderated
- all_moderated
- mod_private
- moderator
- published
- revision.state
- any
- show_hidden
- true
- false
- Inactive User7 years ago
Thanks SuzieH I'll look into this.
I don't see permissions for viewing or editing drafts in Blogs, only Knowledge Base articles.
Can admins see the drafts of authors in the blogs? I haven't been able to make this happen so far.
- SuzieH7 years agoKhoros Alumni (Retired)
Hi Inactive User. Check out the Manage any article and Manage own articles permissions under Blog Articles. I believe those two permissions include the ability to see drafts inherently. I have the Blog Author role for the Lithium Community, for example for the Release Notes blog. I am able to see my own drafts, but not others' drafts. I believe only the author of a blog is able to access/edit their drafts.
- Warren_Brill7 years agoBoss
This is one of the reasons why bundling permissions is counter-productive for users. I have made this point before. Community admins should have access to many more discrete permissions, and be able to create their own bundles. For example, a bundle of permissions would be a role, and a role should be able to bundle other roles. The algorithm for this already exists under ranking.
If the "view drafts" permission is a standalone for TKB, then the algorithm exists, and it should be simple to port it over to blog permissions. I believe I put this in a product idea some time ago.
Related Content
- 8 years ago
- 3 years ago