Display metrics registered users count for anonymous user
Hello! I have a page for user that are not yet signed id or registered to my community, on which some metrics are displayed : fully registered users count, posts count and online user For information, anonymous users are not allowed, every user should be register to be able to access the community and its content, and I can not allow or able it. For now, theposts count and online user are displayed correctly, but I can not seem to find a way to retrievefully registered users count. `rest("2.0","/search?q=" + 'SELECT * FROM metrics WHERE id="completed_registrations"'?url).data.items[0]["value"] ` and `rest("2.0","/search?q=" + 'SELECT count(*) FROM users"'?url).data` also give me a forbidden error. What can I do to just to display in my custom component the number of fully registered user? ThanksSolved176Views0likes1CommentLSI search results not populating
We were using a custom search component for our Community Search and noticed that we could not see the search term results in LSI. After some research we discovered that LSI discards search results from custom components because it views those searches as bot searches. Apparently a custom search component cannot include the needed "nodes" in the log for LSI to interpret as valid search queries. In attempt to correct the problem, I modified our custom component so that it only includes class identifiers(for styling), some text labels, and the standard Lithium search component (common.widget.search-form). I removed all other custom code that we previously had for creating the custom search component (see below). After pushing to production, we still don't see any search term results in LSI (its been 48+ hours). I've spoken with Lithium Support, but they are not aware of any additional configuration that is needed,and even cited another customer that is using a standard component within a customcomponent - and their LSI results are working fine. The standard search component is working as expected, but as mentioned, LSI doesn't contain any search results. Any help on the nextsteps to troubleshoot this issue would be appreciated. // Our custom component code <div class="mod simple finder"> <b class="top"><b class="tl"></b><b class="tr"></b></b><!-- ./top --> <div class="inner"> <div class="hd"> <h2 class="h1"><a href="/t5/forums/searchpage/" >${text.format("custom.community-solutions-finder.title.text")}</a></h2> </div><!-- hd --> <div class="bd"> <p>${text.format("custom.community-solutions-finder.description.text")}</p> <div> <!-- Lithium Standard 'Search Form' component --> <@component id="common.widget.search-form" showAdvancedSearchLink="false" hideGranularity="true"/> </div> <!-- Generate the text only when the user is in the search page --> <div><p>${text.format("custom.community-solutions-finder.createpost.text")}</p></div> </div><!-- ./bd --> </div><!-- ./inner --> <b style="" class="bottom"><b class="bl"></b><b class="br"></b></b> </div><!-- ./mod simple -->scottc6 years agoAdept154Views0likes4Commentsemail template- Reply by Email
Hi, In the email templates, reply by email option is not coming in the received emails for daily/weekly/immediate digests. The value for${mailActions.canReplyByEmail} is coming as false. But the option is selected in Admin settings. Please find the screenshot below. Also${mailActions.nativeReplyDemarcationText},${mailActions.replyByEmailUrl} values are coming as blank. Thanks, DenizDenizbaby6 years agoGuide147Views0likes2Commentsstyling Out Of The Box (OOTB) for Lithium
Suppose, if i want to change/customize the style of OOTB (Out Of The Box) component, how to do it? Is it possible to do it? Example: There is a Top Kudos OOTB, i want to print the text of Top Kudos in red color. How to achieve this ?saideepak6 years agoContributor91Views0likes2CommentsLIKE or CONTAINS query in API v1
this posthas a comment stating it is possible to do a partial text search in the community API v1. However I do not see that documented anywhere. Can anyone tell me how to do this? I want to query all labels that start with the text "job". Thank you!Lindsey6 years agoLeader78Views0likes2CommentsHow to get all replied members into mention
Hi, As i understand that the @mention will list last 5 replied members from the post. But i just looking into list all the replied members for the post on the mention popup. So please let me know how can we achieve this implementation.jaikumar16 years agoMentor41Views0likes0CommentsHow can I let moderators grant a specific role to users
Hi, I've got a situation where we want to introduce a new board in the community. This board however, should not be accessed by everyone. We want to solve this by introducing a new role to our community, and add specific access to that role. This is implemented and works fine. Now, we want moderators to be able to grant this role to users (preferably on the profile page). However, the list of roles a moderator can select is obviously smaller than an Administrator. Where can I add the newly created role for Moderators so they can also grant the specific role to other users (and themselves). Thanks in advance, Coen DekkerCoenDekker6 years agoHelper145Views0likes2CommentsAbout Accept as Solution Button/Component
Good day, I am creating a custom component that display the topic discussion along with it's replies and cant seem to find a way to add the Accept as Solution button. Is there an ootb component for this button? or could you suggest a way for me to implement this. Thank you, Virnvirn6 years agoAdept132Views0likes2CommentsGetting mentions via API when posting message
We started building our own reply editor, and everything works fine (upload, posting etc).. All can be done through the API. But I can't seem to find a way to create mentions.. When a user starts typing, it has to look for users 'containing' the input text. So you would think, its possible to make a api call to /users.. Retrieving all the users which username startswith the typed text.. But the API v2 only matches on complete words, not partially.. Is there a way to do a SQL LIKE %text through the API? To retrieve users which username 'contains' the input text instead of a full match? ThanksKPNOnline6 years agoMentor129Views1like2CommentsMultiple "in" queries in REST-API
I am running into an issue where i want to run: select * from messages where labels.text in ('Nursing', 'Project Manager') and labels.text in ('Walmart', 'Sprint') That is, I want to say the message must have a label in the first group AND a label in the second group. However, when I run this it seems to stop after the first "in" statement, i.e. only run the part that says: select * from messages where labels.text in ('Nursing', 'Project Manager') Does anyone know why this is happening and if there is a way around it?SolvedLindsey6 years agoLeader135Views0likes3Comments- sunny_mody6 years agoAdvisor67Views0likes1Comment
How page views and license are handled in the the application?
I would like to understand this thing from the API endpoints perspective: I mean, when that calls are counted. *when the token is valid? *when we have 403 forbidden error, this call is ignore in the count? *when we reach the max allowed of call per license? what will it happen with the following responses? Will we have some special ERROR code? *is there any differences between API v1 and v2 calls? I will appreciate any other information about this Thanks in advanceMarcosR6 years agoKhoros Staff50Views0likes0CommentsStudio: Component (OoTB) called "tabs"
How does one access the child pages of a page like My Profile Page? According to the standard (non-XML) page quilt in Studio, the main content is in a (?) component generically called "tabs" calls the child pages. I am unable to locate any documentation on how this works. What I need to do is edit one of the child pages, and since they don't show up as custom pages, it is a bit of a challenge.102Views3likes1CommentPOST over HTTPS in jQuery
I have done some searching about how to post to the REST API over HTTPS in jQuery, and I still have a couple questions. I have attached my code below. I am trying to create a button that adds a subscription for a given label on every board. How do I use the client ID? Do I just copy what's under the "CLIENT ID" column and pass that value in the header? How do I get the user's authorization token for OAuth? I saw a post where someone tried to get the cookie called 'litok' - is that where it is stored? With this code, I am getting an error saying I have been blocked by CORS policy. This code is inside an endpoint - is that why? How do I know if I already have CORS set up or not? function updateSubscriptions(labelId, methodType) { const tenantId = <myTenantId>; const clientId = <myClientId>; const hostName = $(location).attr('hostname'); let API_URL = 'api.lithium.com'; if ((hostName.indexOf("stage") >= 0) || (hostName.indexOf("qa") >= 0)) { API_URL = 'api.stage.lithium.com'; } $('.board-option').each( function () { const boardId = this.value; $.ajax({ type: methodType, url: 'https://' + API_URL + '/community/2.0/' + tenantId + '/subscriptions', data: ({"data":{ "type":"subscription", "target":{ "type":"label", "id":labelId }, "board": { "id":boardId } }}), beforeSend: function(xhr) { xhr.setRequestHeader('authorization', 'Bearer ' + $.cookie('litok')); xhr.setRequestHeader('client_id', clientId); if (methodType === 'POST') { xhr.setRequestHeader('content-type', 'application/json'); } } }); }); const pageNumber = getCurrentPage(); getEndpointAndDisplay(pageNumber); }Lindsey6 years agoLeader53Views0likes0CommentsCustom subscription
I created a custom labels page, in which you can search for posts associated with multiple labels. This search would only returns posts that have both labels, not posts that have one or the other. I wanted to create a custom "subscribe" button as well. I wanted the button to subscribe the user to that given label search. This would not be as simple as adding a subscription to each label they selected - I don't want them to get emails for posts with just one of those labels, only posts that have both labels. Is it possible to add a subscription like this? I see that the subscription collection must have a target ID - can the target ID be multiple labels in which it would be an "AND" search? The collection also must include the node of the item - can the node be all of the community?Lindsey6 years agoLeader61Views0likes0CommentsCase Community URL
We use the SF connector for Case management. Does anyone know how this field gets populated in Case:LiSFIntegration__Community_URL__c We're struggling with customers who have tens and even hundreds of open cases and not having Case Search functionality is making it difficult for them to track status. As a workaround we're planning to send them a report with open cases and we've just added a formulated field to take them to the Case URL when we noticed this field in Case but it's blank.Raya6 years agoContributor74Views0likes1CommentSubscribe to labels link on custom page
I created a custom labels page - I am no longer using the built in labels page. I would like to recreate the "Subscribe" link to a label on the custom label page I created. Is this possible? When I tried copying the subscribe link from the original labels page to use on my custom page, it takes me to an error page when clicked and does not seem to update the user's subscriptions. Is there a format to the subscribe link that I need to be using, and is there anything done behind the scenes when the link is clicked? This is the link on the original labels page: href="/t5/forums/filteredbylabelpage.filteredbylabelname.subscribetolabelname.link:subscribeaction/label-name/job_Bartender/board-id/other_job_en/subscribed/false?t:ac=board-id/other_job_en/label-name/job_bartender" And this is what I am trying to do: href="/t5/forums/filteredbylabelpage.filteredbylabelname.subscribetolabelname.link:subscribeaction/label-name/${selectedLabel}/board-id/${boardID}/subscribed/false?t:ac=board-id/${boardID}/label-name/${selectedLabel}"SolvedLindsey6 years agoLeader136Views0likes1CommentRetrieve a location the request came from.
I see that it is pretty easy to retrieve a request's source Ip Address. I'm wondering if there is anywhere in Khoros that also tracks Country/City/State origin of a request? We'd like to know where the requests are coming from. geographically.Solvedcsolis2146 years agoGuide177Views0likes4CommentsIs there some support for push notifications?
Hello, I have been reading the developer documentation But I did not find any info about push notifications. Just wondering if LIA backend have some useful endpoints to use from mobile development I will appreciate any info, thanksMarcosR6 years agoKhoros Staff207Views1like3CommentsUsing text keys in the community structure
Hi all, We're doing a lot with localization and one thing that becomes a bit of a process is creating the node structure. Has anyone found a way to use text keys in the community structure? I tried the raw key itself as well as something like ${text.format("custom.text.welcome.component.title")} but no luck. Just curious if anyone here had a creative workaround. Cheers,JeffSt6 years agoAdvisor54Views0likes0CommentsHaving trouble with code for banner ads
We need to display banner ads on certain forums and topic pages in our community. I have used the Custom Text feature. We are having issues getting the random number and viewid to generate. Additionallymy colleague reports that the div id is <div id="Ad728x90" style="text-align:center;display: inline-block;"> in the admin tool on staging. But when using Inspect Element in the browser, the Div ID is “lb728x90“ This is the code: Custom Content 2 Original: <#assign user_role = "v" /> <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#if role.name?? && (role.name == "DOT_COM_FREE")> <#assign user_role = "f" /> </#if> </#list> <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#if role.name?? && (role.name == "DOT_COM_FREECCD")> <#assign user_role = "f" /> </#if> </#list> <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#if role.name?? && (role.name == "DOT_COM_PREMIUM")> <#assign user_role = "p" /> </#if> </#list> <script type="text/javascript"> function getCookie(name) { var re = new RegExp(name + "=([^;]+)"); var value = re.exec(document.cookie); return (value != null) ? unescape(value[1]) : null; } var advUserType=''; advUserType = getCookie("ADV"); if (getCookie("ADV") == "yes") {advUserType="a";}else{advUserType='';} </script> <div id="lb728x90" style="align=center"> <script src="//msmedia.morningstar.com/mstar/jserver/site=ms.us/area=discuss.forum/size=728x90/pos=top/usrt=${user_role}" + advUserType + "/forumid=${coreNode.id}/random=${utils.numbers.randomIntWithCeiling(10000000)}/viewid=${utils.numbers.randomIntWithCeiling(10000000)}?"></script> </div>69Views0likes0Comments[SDK] unable to update email tenplate
Hi, I am trying to useSDK for development. I imported email template from my current instance which was customized using plugin export command. I was able to get it in SDK folder. After that I made changes and pushed it successfully. However did not see any changes in instance. Then I tried creating a new custom template in SDk and pushed it. Changes were successfully added there and I was able to see the changes. I made changes in the same template using UI and save them. Then I exported the plugin again. I can see the see changes in SD as well. I added some more changes to same template and pushed the plugin successfully. After this i am not able to see thee changes in instance. Does SDK stop working or can not override once we have made changes in UI for email template. Please let me know. Thanks, Sachinsachin6 years agoMentor165Views0likes4Commentsconnect to bulk data from azure
I need to connect my azure app (data factory or logic app) to the lithium api. I've managed to connect to the API using Postman, but when I use the same parameters and headers, I'm getting errors in azure. For example, with the basic authentication, in postman, no password is required. I simply use the bulk data access token for the user name and that is all. But azure requires a password. Has anyone else succeeded in connecting azure to the lithium api? I've been struggling with it all day.zachclem6 years agoContributor79Views0likes1CommentDisable Float functionality
Hello everyone, Is there a way to disable/hide the Float functionality? ThanksSolved105Views0likes1CommentEndpoint Access error in Production.
Hi, I have created an endpoint in staging to Access Salesforce Access token. Endpoint works fine when I make a request through community staging, but its throwing an error when I tried to access from community production. End point Code: <#assign response = http.client.request("https", "login.salesforce.com", "/services/oauth2/token").body("grant_type=password&client_id=<clientid>&client_secret=<ClientSecret>&username=<username>&password=<password>", "application/x-www-form-urlencoded").post()/> <#if response.hasError> ERROR <#else> ${response.content} </#if> Staging Output: {"access_token":"<AccessToken>","instance_url":"<Instance_url>","id":"<ID>","token_type":"Bearer","issued_at":"<Issued_at>","signature":"<Signature>"} Production Output: 1) Firefox: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data 2)Advanced Rest Client There was an error parsing JSON data Unexpected token E in JSON at position 0 I have checked the Login History on salesforce and couln't able to find one for community production. ThanksSolved226Views0likes3Comments[REST API] Can't find a way to sort groups by creation_time
Hi y'all, I hope you will be able to help as I'm out of ideas🙂 I'm simply trying to sort my group lists by creation_date, but I can't seem to find a way to make it works. My actual code is: <#assign groups = rest("/groups/list") /> <#list groups.group as group> <#assign groupUrl = restadmin("/groups/id/${group.id}/web_page_url").string/> <a href="${groupUrl}">Click me</a> </list> I have massively simplified the code above so it is comprehensible, so please try not to suggest modification or work around for this part, this is here as an example. Here is what I tried so far : I tried to add a "sort_by" or "sort" in the REST url without success. I have tried to add a "?sort_by" when I assign my groups list. <#assign groups = rest("/groups/list") /> <#assign groups = groups?sort_by("creation_time") /> I have tried to find with the Liql editor in the admin interface the groups column so I can change my REST request by an SQL one to add a order_by, but mySELECT * FROM groupsgives me a "Invalid query syntax" I hope I am clear enough. What can I do to achieve this "simple" task that is to sort my groups to display them by creation_date time. Thans a lot !85Views0likes2Comments- phoneboy6 years agoDirector96Views0likes2Comments
Blog article templates
We are in the process of converting our blog site to use our Khoros community blogs. We generally use two different styles for our blog posts. It would be really nice if, instead of copying all the HTML into the blog post to keep the styling, there were templates we could create for both styles of blogs, and once a template was set up, we would just have to select the template type and fill in the title and content. Does anyone know if this exists, or if there is anything I can do on my end to set up something like this? Thanks!SolvedLindsey6 years agoLeader176Views0likes3Comments404 page
Hello, Hope you can point us in the right direction. We are hoping to remove the Search Bar when visitors go to a non-functioning page in our community. Could you please point us to the source code where it can be removed. Please see example below.SolvedC_Fun6 years agoAdept111Views0likes1CommentHow to show "All community" option in search bar
Hi, Currently only two options are visible in search bar when user is searching 1) This board and 2) This category, but I want "All Community" option as well. I have tried by changing admin setting to "community"(please refer attached screenshot) still I am not getting "All Community" option. for this any other setting is available? Thanks, Bhaktibhakti6 years agoGuide101Views1like1CommentAnyway to customize filter component for ideas exchange listing page
We are trying to add an option to the select dropdown that says top ideas, new ideas etc...We want to add recent activity which would involve somehow altering the query for the messages list. Is there any way of doing so?Solvedbrowneandrae6 years agoExpert247Views1like2CommentsMaintain URL parameters in a page initialization script redirect?
Hi team! I'm not really a developer (as I imagine will be evident in my question below), but trying to cobble this one together. Could use some help! So... I've realized that some of our google UTM tracking has been broken due to a redirect we do in our page initialization script. This redirects community.meraki.com to a top-level category URL under specific conditions. BUT - there are also a number of links out there in the world to community.meraki.com/?utm_source=something&utm_medium=somethingelse Unfortunately, these UTM parameters are lost in the redirect, and they're not being picked up by Google at all because (I believe!?) the page initialization script runs (& does the redirect) before our Google Analytics code runs. So, I could use some help maintaining the UTM parameters (and whatever other URL parameters are present) in my redirect. Currently the code is: ${http.response.setRedirectStatus(301)} ${http.response.setRedirectUrl(merakiCommunityHomeUrl)} I've found this nice document about Lithium's http.response methods:https://freemarker-docs-portal.lithium.com/refer/contextObjects#httpResponse - it doesn't seem like there's a quick & easy way to pass the parameters. I imagine I could extract the parameters from the original URL and append them to my merakiCommunityHomeUrl, but that's a bit beyond my skills. Help! THANK YOU!Solved179Views0likes2CommentsExclude specific boards from Top Kudoed Authors Leaderboard kudo counter
Currently, the leaderboard setings are: Top Kudoed Authors Leaderboard: Roles to Exclude Top Kudoed Posts Leaderboard: Roles to Exclude Top Kudos Givers Leaderboard: Roles to Exclude I would like to add a custom rule if not existing that ignores kudos from a specific board (i.e. Announcement board) in computing the Top Kudoed Authors.Solved147Views0likes2CommentsList element not present in actual device.
Below list element (Anchor tag href ) is present in emulator mode and not in actual mobile device. This is happening once we did user registration and while receiving the feedback. Can anyone help here please.. Screenshot:girishkumar016 years agoContributor52Views0likes0CommentsAPI permission issue
Hi, As we have a requirement to get the unread mail count for each users. We just identified the API /restapi/vc/users/id/[id] /mailbox/notes/inbox So while trying to use the API, it returns the following error message, <response status="error"> <error code="303"> <message> User -1 does not have the following permission(s) at o2uk: [ allow_manage_users ] </message> </error> </response> As a admin user also unable to access it. So could you please suggest me how to resolve the issue.Solvedjaikumar16 years agoMentor236Views0likes3CommentsAdding custom metadata fields while creating a blog in the API.
Hey all. Is there any way we can add a custom metadata field's value as a custom parameter while creating a blog in the API call for blog creation apart from the usual fields likemessage.subject,message.body etc. Suppose this is the API call /restapi/vc/blogs/id/${id}/messages/post?message.subject=' + subject + '&label.labels=' + labels + '&tag.add=' + tags + '&message.teaser=' + teaser If I take the custom metadata's value in a variable is there any way to add it in the call and then use it later for displaying the content somewhere? If anyone knows anything about this then please let me know. Thanks in advance.Solvedpp_016 years agoMentor222Views0likes2CommentsWhat is a billable API call?
Hey guys, I am about to start building a search using an endpoint which consolidates multiple API calls. Nothing external is being accessed and nothing external accesses the endpoint. The only thing that accesses the endpoint is the @overridden Lithium search bar. Is any call made by the search bar to the endpoint classed as a billable call? Or is a billable call only communication to/from an external source. The reason for this question is the fact that we don't want to make too many billable API calls with this and future components that we make. So understanding this can help us keep the amount to a minimum. Cheers, JakeSolvedJake_N6 years agoMentor629Views1like9CommentsHow to obtain the fully qualified URL for Community
Since I was just searching for this a few minutes I thought it was worth sharing: If would like to obtain the fully qualified URL for your community base page, e.g. http😕/testc.stage.lithium.com/ when youcomponent is run on stage, and http😕/testcommunity.lithium.com/ when acessing on production use the webuisupport context objectlike this: ${webuisupport.urls.fullyQualifiedPage.name.CommunityPage.build() Initially I was shooting for ${community.urls.frontPage} but it only returns the relative URL, e.g. usually just "/" 😞137Views1like1CommentDiscussions Reply: How to get parent's timezone using API or context objects
We've created a "posted in reply to" function for our forum replies so that users can easily click on it to see the original post. However, I'm having timezone(?) or original post time issues. The time is shown in the CURRENT user's timezone, not the timezone of the original post. Any ideas? Live example:https😕/community.jmp.com/t5/Discussions/Random-Uniform-keeps-giving-me-the-same-number/m-p/189066#M40772 Screenshot: Code: <#-- check to see if we have a message --> <#if env.context.message?? && env.context.message.uniqueId gt 0> <#assign root = restadmin("/messages/id/${env.context.message.uniqueId?string.computer}/root?restapi.response_style=view").message> <#-- get that message from rest --> <#assign parent = restadmin("/messages/id/${env.context.message.uniqueId?string.computer}/parent?restapi.response_style=view").message> <#-- get the parent message from rest --> <#if parent.@null[0]?? && parent.@null=="true"> <#-- check to make sure a parent exists --> <#-- if no parent you can put some text here or nothing --> <#else> <#--<div class="reply-to-stamp">--> <span class="reply-author"> | Posted in reply to <a href="${parent.@view_href}" title="Message from ${parent.post_time.@view_date}">message from ${parent.author.login} ${parent.post_time.@view_friendly_date?replace('-','/')} ${parent.post_time.@view_time}</a></span> <#--</div>--> </#if> <#-- end parent check --> </#if> <#-- end message context check -->SolvedInactive User6 years ago162Views0likes1Comment