LiQL Post Count, Kudo count, an solution count for user
Hi, I try to show post count, kudo count and solution count for specific user on View Profile Page. I create custom component and I'm using query SELECT messages.count(*), solutions_authored.count(*) FROM users WHERE id = '31' I checked in API Browser in Studio, and data I recive are correct, but when I try to use it in component it breaks component (it doesn't show at all). Here is my component code: <#attempt> <#assign userViewProfileUserId = page.context.user.id /> <#assign userQuery = "SELECT messages.count(*), kudos_received.sum(weight), solutions_authored.count(*) FROM users WHERE id='" + userViewProfileUserId +"'" /> <#assign userData = restadmin('2.0','/search?q=' + userQuery?url('UTF-8')) /> <div class="view-profile-user-details"> <div class="user-statistics"> <div class="user-statistics__item"> <span class="user-statistics__value">${userData.kudos_received.weight}</span> likes</div> <div class="user-statistics__item"> <span class="user-statistics__value">${userData.solutions_authored.count}</span> solutions</div> <div class="user-statistics__item"> <span class="user-statistics__value">${userData.messages.count}</span> posts</div> </div> </div> <#recover> </#attempt> What am I doing wrong? I would be grateful for your help.SolvedSamuelS16 years agoContributor524Views0likes1CommentAdd a custom class to a quilt?
Is there a way to add an additional class to a quilt, such as <quilt layout="two-column.main-side" nestable="false" disableTopCssClass="false" class="some-custom-class"> So that I'll get <div class="lia-quilt lia-quilt-file-name lia-quilt-layout-two-column-main-side lia-top-quilt some-custom-class">Inactive User6 years ago126Views0likes4CommentsChanging or appending content of a OOB component.
Hey all. Is there any way through which an OOB Components content can be changed or appended. I know@override but I suppose that is used for changing the whole component and not just a part of it. My requirement is basically to append the title of an OOB component and I think there is way it can be done through jQuery, I'm not sure though. But my question is can an OOB component's content be manipulated through Freeemarker as well? Or is there any API call through which I can get the content (title) of that component and then manipulate it? If yes what will be the best way to do it. It will be great if anyone can explain through a snippet. Thanks in advance.pp_016 years agoMentor240Views0likes7CommentsSetting search scope through parameters
Hi, is it possible to give search scope as a parameter for the search form? As I want to limit the search to Idea Exchange without having the search granularity options shown. Right now I have: <component id="common.widget.search-form" defaultToCommunity="false" hideGranularity="true"/> So in theory the search form should pick up the search scope automatically but it's still searching across the community. We could not use 'Search And Post Page' directly due to design reasons and needed to create a custom version of that. So could it be that when using a custom page included in the Idea Exchange Page the scope does not get picked up? Cheers, .Mmiikka6 years agoMaven224Views0likes4CommentsREST API: Edit Q&A Answer
How can I edit a given Q&A answer using the REST API? I tried to edit a Q&A Answer via REST API v1 by issuing the following POST request: POST /restapi/vc/messages/id/197500/edit?restapi.session_key=XXXXX.&restapi.response_style=view&restapi.format_detail=full_list_element HTTP/1.1 Host: stage-community.XXX.ch Content-Type: application/x-www-form-urlencoded; charset=utf-8 message.author=id%2FXXXX&message.body=Hello&message.subject=&qanda.is_answer=true&credentials.identity_user=id%2FXXXX Which results in a API error: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <response status="error"> <error code="100"> <message> message: XXXX hat keinen Zugriff zum Bearbeiten dieser Nachricht </message> </error> </response> Issueing the same POST request without the "qanda.is_answer=true" works.thilo6 years agoMentor119Views1like1CommentWhy cannot I retrieve users.id via users.email address?
Hi, I am really struggling to figure out why I cannot retrieve a user id from an email address. I have tried the v1 API and keep getting a 100 error. I have tried the v2 API and get the error below.... { "status" : "error", "message" : "invalid query syntax for SELECT id FROM users WHERE users.email = 'user@email.com'", "data" : { "type" : "error_data", "code" : 604, "developer_message" : "", "more_info" : "" }, "metadata" : { } } I've been using the v2 API regularly since starting with Lithium, I have auth code and this works. I refreshed my auth code before attempting this and tried other queries which worked. The querY I fired is below (encoded).... https://api.lithium.com/community/2.0/{code removed}/search?q=SELECT%20id%20FROM%20users%20WHERE%20users.email%3D%27user%40email.com%27&api.pretty_print=true ....(decoded).... https://api.lithium.com/community/2.0/{code removed}/search?q=SELECT id FROM users WHERE users.email='user@email.com'&api.pretty_print=true Also, in the error codes section, code 604 is given as an example but isn't explained?!Solved126Views0likes2CommentsWhat should the community-name be in the URL call?
Hey Community Members, perhaps you can help me with something. The thought process here is that I am currently building an app that will take a spread sheet of email address, find their userid by searching the community for the email address, using thehttp://community.lithium.com/community-name/restapi/vc/users/email/[email] api and then adding the role using the role update api. (I have a separate file that links@company.com emails to the roleIDs) The documentation seems to indicate I need to authenticate before I start making these calls but I'm not seeing documentation regarding header information or anything else that might indicate where to put the auth key. 1) Do I need to authenticate before calling those API's 2) Is there an easy place to find that community-name, is it the ID or the text name? What exactly is the api expecting here. The example provided doesn't change community-name in the example for email look up but I am not able to apply the same in my community. Happy to share the job when it's finished as I suspect many others are getting tired of manually updating roles, just need help understanding the API a little more. Let me know, NickSolvednpiette6 years agoHelper262Views0likes6CommentsStatus update comment on idea posts
Hi, When changing the status status of an idea on an idea board,moderators have the option to make a comment with the status change. I can see from the product ideas board on the Lithium community that it's possible to have the last status change comment appear at the top of an idea page, separate to the comments list. However I can't see how this is achieved. I haven't been able to see a component that shows this information. I also can't see any field within the message collection, that shows whether a given reply was a status change or what the latest status change comment for an idea message was. How can I highlight the latest status change comment on an idea on our idea exchange?SolvedLiam_M6 years agoGuide254Views0likes4CommentsEarly Warning Dashboard
An area of our business has approached me about leveraging Community data for an early warning alert system around trending issues. I'm thinking it would need to leverage live search and IP / location data to prove useful for their use case. I'd like to build it into a dashboard then where time filters can be applied to the data. Just curious if anybody had any experience of building something similar using the Community API?Kev_B6 years agoAdvisor75Views1like1CommentCan I call a V2 API url in Javascript?
I want to make a call to the Lithium API via Javascript. I know I can do it with V1; can I do with with V2 as well? Something like "/restapi/2.0/search?q="SELECT * FROM messages WHERE labels.text IN ('Jupiter')" I want to be able to select messages by tag.id or tag.text (preferably id, if possible), called from Javascript.SolvedInactive User6 years ago232Views1like3CommentsArticle attachments in subscription email template
Hi, Is there a way to get message attachment is email template using velocity variables. For example is there a context object to show message attachment's count in the email template like notification.message.attachment.count? Thankshim_varma6 years agoAdvisor46Views0likes0CommentsHow to make the short title the primary display?
I need to make the long title in lower case because that is the title appearing in the url, and I need the url to be in lowercase. Can I then make the short title in regular casing and have that one be the primary display? How do I change all places using the long title to now use the short title (besides in the url)?SolvedLindsey6 years agoLeader158Views0likes3CommentsStyling Font-Awesome Icons
We need to change the background colors on some of the font-awesome icons. Where in the SASS files can this be done? The vendor.scss file names the icons but nowhere in the other ones am I able to find the background colors for "triangletop", which I assume is the backdrop for the font-awesome icons. Has anyone done this?Solved504Views0likes14CommentsSubscribing user for specific board.
Hi, I have a requirement in which I need to subscribe user to specific board. I came across below link, but got error when I tried making calls. https://lithosphere.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv1&leaf-id=Board.subscriptions#Board.subscriptions.global.add Please let me know can we subscribe user to specific board. Thanks,171Views0likes6CommentsMetrics Available in Klout
Hello All, We have a requirement to build a web application using Klout and display below metrics: Section 1: Technical SEO User shall be able to view reports on: 1. Meta tags 2. Keywords optimization 3. On page factors 4. number of backlinks Section2: Website Performance User shall be able to view reports on: 1. Load speed 2. Responsiveness 3. Monthly traffic 4. Keywords ranking 5. Competitor analysis 6. Content performance Section3: Branding and Engagement User shall be able to view reports on: 1. Social media engagement 2. Outreach 3. Number of followers How many metrics are possible to display using Klout ?mayank_cygnet6 years agoContributor82Views0likes1CommentHow to do inline rich text replies
On forums on the Lithosphere as well as in the Dropbox community, I see that clicking reply creates an inline reply box with rich text - not the plain text quick reply. I was wondering how this was implemented - is it a Lithium feature? Or is extra styling required? Thanks!Lindsey6 years agoLeader152Views0likes4Comments- Denizbaby6 years agoGuide112Views0likes3Comments
Export Email Template to SDK
Hi All, How we can export all the email templates available in studio to the SDK, We tried using the command in SDK liexport-studio-plugin--email--force . But only few custom templates downloaded. Thanks in Advance Thanks, DVBDenizbaby6 years agoGuide82Views0likes1CommentAPI call for Top Most viewed and Most Helpful
Hi, I want to retrieve Most viewed and Most Helpful data from the posts for that each category category and board level. Below V2 API will help to get most viewed message across all blogs. SELECT * FROM messages where conversation.style='blog' ORDER BY metrics.views DESC limit 3 Please let me know how can I restrict this for specific category or board to get Most Viewed and Most Helpful posts. Thanks.Solved164Views0likes3CommentsSome "Macro xx title" labels are not being translated
Hi All, In site preferences, their is a Macros tab. Only first 25 macros are translated into other language(example Portuguese,Chinese...) remaining macros are not translated. So, Is their any setting related to text key available to translate all the macros? ThanksADS_PSI6 years agoMentor100Views0likes2CommentsCreating an outbox_note via Community API
Hi there! I'm wondering if it is possible to create an outbox_note via the Community API? Either via v1 or v2? It looks like the v2 API does not support Create operations on the outbox_note field, but thought it would be worth double checking. Thanks!Solvedm4ttyb0y6 years agoAdept94Views1like1CommentAPI V1 and V2 returning different result.
Hi, I wanted to check total number of users in our community. I did both V1 and V2 calls and Results are attached. API v1: /users/count <responsestatus="success"> <valuetype="int">89805</value> </response> API v2: select count(*) from users { "status": "success", "message": "", "http_code":200, "data": { "count":60750 }, "metadata": {} } Why I am getting difference in user count. Thanks,108Views2likes2CommentsEmail - Plain Text Content
Hi All, In the Email template (Studio -> Text Editor -> E-mail Text ), we have two options for editing the template Plain Text Content HTML Content When will the contents in the "Plain text Content " area will be displayed to the user while sending the mail. Thanks In Advance. Thanks, DVBDenizbaby6 years agoGuide92Views0likes1CommentSend Email to self - option
Hi All, For testing Email template (Studio -> Text Editor -> E-mail Text ), we have an option "Send Email to self". But while sending the email, the variable name itself is displayed in the Email but can we get the variable value instead. For Eg : Text received in Mail : ${notification.message.author.login} mentioned you in a post. Expected Response : DVB mentioned you in a post. Thanks In Advance. Thanks, DVBDenizbaby6 years agoGuide79Views0likes1CommentForgot password - URL Expiry
Hi, How we can set the expiration time for the reset password link. For eg : If user click on reset password, the email will be triggered to the user with link. We need to make the link active only for 40 minutes so that user can only reset the password with in 40 minutes. After the link should expire. Thanks in Advance, Thanks, DenizDenizbaby6 years agoGuide99Views0likes2CommentsWhen did these users last log in
Hi folks. I have a list of, say, 1500 user ids. I want to throw this list at the system and get back their respective most recent logins. Is there a fairly easy way to do this that I'm overlooking? I'm just assuming API 2 won't be happy if I tell it to give me last_login_date where user_id IN(<1500 ids>) . And I'd prefer to not loop through smaller batches as an ongoing practice.72Views0likes1CommentAPI V1 equivalent for IN(x,y,z) and MATCHES(x y z)
Trying to find it in the documentation; unable. I'd like to create a V1 query that has multiple IN values, i.e., in V2, it would be: WHERE id MATCHES ("alpha beta gamma") or WHERE id IN('1','2','3') I saw something like this but I can't find it again in the documentation, which is frustrating /restapi/vc/boards/id/discussions/tagging/tags/id/IN=1,2,3 Specifically, I want to make an API V1 call for multiple labels or tags Thanks! Note: I can't even find the IN and MATCHES in V2 anywhere in the V2 documentation even though I know it exists...Inactive User6 years ago250Views0likes10CommentsChanging labels on a post without using edit api
We are working on creating a fast and easy way for our moderators to label topics without them needing to go in and edit the post each time. We've been able to get it working using the Message edit API but unfortunately when this is used, the "read by moderator" flag is placed back on the post and the moderator is forced to refresh the page anyway to get the moderator flag removed which kind of defeats the purpose. So I was looking to see if there's a way to edit labels without needing to use the message edit api. I noticed there is the labels api:https://lithosphere.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv1&leaf-id=Message.labels#Message.labels.labels If lists supporting both GET and POST methods but there's no documentation under POST. Anybody know if it's possible to use the POST method to change labels on a message directly?SolvedFranzG6 years agoGenius120Views0likes1CommentEvent subscription view_href
Hi, Is there any way of gettingrestapi.response_style=viewto work with event subscription? Everytime a new message is posted I receive a HTTP-POST XMLcall on my server but I cannot construct a URL of the message without doing a seperate external API-call (which I really don't want to do). I tried adding the parameter like this: /restapi/vc/events/subscriptions/events/name/MessageCreate/subscribe?restapi.response_style=view&event.callback_url=http://mywebsite.com/without any success.... The XML I receivedoesn't have the full nice view_href. If this is not a possibility, is there any way I can construct the full forummessage URL with only knowing the ID of the board, thread and message (without doing any API-call)? Cheers, KjartanSolvedkjartan6 years agoContributor452Views0likes6CommentsGenerate list of Labels or Tags in a Board or Category
Is there a way in LiQL to generate a list of the labels and tags that are used (or allowed) in a given Board or Category? I can't find a way to do this. I can tell if predefined or user labels are allowed, but I haven't been able to generate a list of them ... any ideas?SolvedInactive User6 years ago261Views0likes6CommentsLink to forum post using message_id
Hey Parshant- just following upon thequestion I asked here. Getting the "board_id" and "message_id" works great, however I'm still having a bit of trouble actually linking back to the forum post from the"Post Success Page". For example, on this Lithosphere board the message ID is as follows: The forum post itself includes the title of the post and another link before the"message_id" and this number is different for each of the boards so I'm not entirely sure how I can use the"message_id" to go back to the post after it was successfully posted. Any tips or advice here would be great so that I can add a link to return to the forum post when it was posted successfully.Solved124Views0likes2CommentsCannot get last_post_time
I want to put a banner at the top of a thread if the last_post_time is older than three months. Here's my code (just using a static message ID while testing): <#assign cutoff = (.now?long - 90 * 86400000)?number_to_date /> <#assign msgQuery = "SELECT conversation.last_post_time FROM messages WHERE id='170' AND depth=0" /> <#assign msgInfo = rest("2.0", "/search?q=" + msgQuery?url) /> <#assign postDate = msgInfo.data.items.conversation.last_post_time?long /> <#list msgInfo.data.items as message> <#if postDate?number_to_date <= cutoff> <div id="post-closed"> <p>This conversation is old. If you have a question please start a new post.</p> </div> </#if> </#list> No matter what I've tried, I can't seem to get the last_post_time value. In the code above, it falls over at the <#assign postDate...> line. It tells me: The following has evaluated to null or missing But testing the query in the API browser tells me the value is there! I'm pretty sure I'm missing something rea-a-ally obvious but I've tried everything I can think of. Can anyone help me out please? Thanks in advance. PaulSolvedPAULEM6 years agoAdvisor100Views0likes2CommentsRepeated customer
Hi There, I want to check the repeated customers contacted us on our SM accounts. I tried to generate a report to have the correct analysis with the reason of contact. Can you guide me through to have a solid way to extract this data? Thanks,Tariq6 years agoContributor56Views0likes0CommentsPost Success Page links
Hey folks! Wondering how to go about adding links on the post confirmation page, similar to how it is done on Lithium. Would it require some JS to store the location of the forum board or is there a simpler solution? Any tips would be appreciated!Solved162Views0likes4CommentsIs a teaser from multiple TKBs possible?
I'm not a developer but I'd like to know if it's possible to create a teaser custom content box from multiple TKBs? We currently have the following code to provide a teaser for a single blog that I could probably change to pull from a single TKB but I need content from multiple TKBs: <#-- Blog teaser v4--> <#-- change the "board.id" in the query to focus on a different blog/board --> <#include "message-macros"/> <#assign qry = "SELECT id, view_href, author.id, author.view_href, author.login, subject, teaser, body, post_time, post_time_friendly, conversation.style, board.id, board.title, board.view_href, current_revision.last_edit_time FROM messages WHERE conversation.style = 'blog' AND board.id='sws-571'ORDER BY post_time DESC LIMIT 5" /> <#assign messages = executeLiQLQuery(qry) /> <#if messages?size gt 0> <#assign brd = messages[0] /> <div class="lia-panel lia-panel-standard custom-component-blogteaser"> <div class = "lia-panel-content-wrapper"> <div class="lia-panel-content"> <#list messages as msg> <a href="${getFieldValue(msg.view_href)}" target="_top"> <ul> <li> <h3 style='display:inline'>- ${getFieldValue(msg.subject)} </h3></a> <p style='display:inline'> By: ${getFieldValue(msg.author.login)}</p> </li> </ul> </#list> </div> </div> </div> </#if>Solved89Views0likes1CommentSpace is not displaying between Paragraph and bullet point
Hello, We are using REST API v2 to sync messages across Lithium and another system. We have a requirement to flowthe article from another system to Lithium. When we are creating new Article in another system So it should be flow same as it is in Lithium. When we create new article and giving space between paragraph and bullet points, but Spacing between end of paragraph and numbered section or bullet points are not being respected. I am attaching both the screen shotfor your reference. Lithium Article : Another System Article : Any help would be very appreciated! Regards, Shubhamshubham13136 years agoContributor109Views0likes1CommentInclude component inside another compment
Hi All, Can we include a component inside another component. For eg: Custom_Component_A : <#assign currentDate = .now /> <span class="loggedtime"><Br/>Time Now : ${currentDate }</span> Custom_Component_B: <#assign user_id = user.id> <span class="loggedtime"><Br/>Hi : ${user_id}</span> <component id="Custom_Component_A"/> Can we includeCustom_Component_AinsideCustom_Component_B. Thank you in advance for your time and assistance! Thanks, DVBDenizbaby6 years agoGuide118Views0likes3CommentsRest API to update board Id of existing message
Hi, We am using REST API v2 to sync messages across Lithium and another system. We have a requirement to archive the article if the sync criteria is not met after the article was sent to Lithium. I believe there is no mechanism in Lithium to archive the article (or soft delete). Hence we took the route of creating another board where we can store the archived article. I thought it would be simple to update the board id of a message after it has been created. I tried using the PUT method to change the board id, but it doesn't seem to be working. Any help would be very appreciated! Regards, Hiteshhiteshpatel6 years agoContributor125Views0likes2CommentsUnable to Import User Using CSV File.
Hi, I am trying to import user in our community and I followed the documenthttps://lithosphere.lithium.com/t5/Default-user-profiles/Import-users-using-a-CSV-file/ta-p/69470. But it didnt work. I am importing CSV file from Community Admin > User > Import Roles option. I am using basic fully registered user import. Thanks93Views0likes1CommentPrivate Content
I need best practices on how to handle this request from one of my developers: They wish to use the V2 API call to access private community messages How do I do this? I believe I have to give the username (using the V2 API) permission to access this data so does this mean I have to create a new role in this private category? So they can see this content and be able to pull the data? In fact, I would not mind meeting with someone to give me a review on how they handle API requests in their organization.Jaime_Lee6 years agoMaven97Views0likes1CommentAPI Requests
I need best practices on how to handle this request from one of my developers: They wish to use the V2 API call to access private community messages How do I do this? I believe I have to create a new role in this private category. So they can see this content and be able to pull the data? In fact, I would not mind meeting with someone to give me a review on how they handle API requests in their organization. I am completely out of my element and could use some tutoring in this area. Thank You!Jaime_Lee6 years agoMaven119Views0likes1Comment