Possible to create a custom component that filters by board?
I'm a FreeMarker and Rest API newbie, but starting to do a few things. My question is this: is it possible to create a custom component that I could add to a custom page that contains all topics (such as a view like thishttps://communities.sas.com/t5/forums/recentpostspage/post-type/thread) but allow for filtering, via a dropdown menu or other selection device, by boardID? Additionally we have users who would like to see a list of "all topic" updates or posts that they subscribe to. I would really like to be able to build this page or component for them. Thanks for pointing me in the right direction. Lainie cc:cjdingerSolvedLainieH9 years agoExpert160Views0likes1CommentComponent with endpoint and 3rd party REST API
Hey, I am trying to build a component that does a callout to a 3rd party rest api. I can get a JSON response using POSTMAN with that url. I have build out the endpoint like this: <#assign baseUrl = "http://success.mindtouch.com/@api/deki/site/search?q=sso&limit=2&dream.out.format=json"/> <#assign req = http.client.request(baseUrl) /> <#assign response = req.call("GET") /> In my component I am calling the endpointlike this: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script> var handleSuccess = function(data){ console.log("success", data); } var request = $.ajax({ url:"/yboys66435/plugins/custom/zuora/zuora/mindtouch_search", type: "GET", dataType: "json", data: {} }); request.done(handleSuccess); request.fail(function(jqXHR, textStatus) { console.log('Error.', textStatus); }); </script> Hello When I go to the page that has the component I am seeing aparsererror in the JS console and am not quite sure how to debug this. When I go to the endpoint in the browser it returns this: lithium.coreapi.webui.template.models.HttpClientResponseTemplateModel@125d6b34 This makes me think that it is running the request and getting the response. But how do I get/use this in the component? Is there a way to print out the contents of the HttpClientResponseTemplateModel?Solved331Views0likes2CommentsFreemarker needed to display floated threads for a board
I'm using the following rest api call to retrieve the floated threads. However, I am unable to process the returned posts. <#assign floated_messages = rest("/boards/id/${coreNode.id}/subscriptions/global/float/thread?page_size=10") > <#if floated_messages?size gt 0> <div class="floated_posts_list_body"> <ul class="posts"> <#list floated_messages as message> <li class="post"> <div class="post_main"> ${message.subject} </div> </li> </#list> </ul> </div> <#else> <div>There are no floated posts</div> </#if> I believe I am missing an object at the end of therest call.For example... <#assign floated_messages = rest("/boards/id/${coreNode.id}/subscriptions/global/float/thread?page_size=10").threads > But that isn't working either. Does anyone know what the answer is and where that documentation might be found?Solveddustin9 years agoExpert181Views0likes2CommentsIn the spirit of "gamification"
Thinking back to my history in gaming, I came up with a script that lets you track how many consecutive days a user has logged in. Basically this means that you can reward users (with a badge, rank?) for logging in every day. Maybe someone finds it useful. I use three variables, date,a,b. String example: 2014-07-10,1,5. Where date is last date the user logged in. a Is the running total of consecutive logins. If a user skips a day of logging, this resets to zero. b Is the max number of consecutive days the user has managed to reach so far. Here's what the script does: Read string from a custom profile field, field1. Check last login date (set today if this is the first login (since adding the script, or ever). If user logged in yesterday as well, increase a by 1. Check if a is greater than b. If so, increase b by 1. <!-- Consecutive logins --> <#if user.registered> <#assign UserDateLast = restadmin("/users/id/${user.id}/profiles/name/field1").value /> <script type="text/javascript"> var vToday = new Date();var dd = vToday.getDate();var mm = vToday.getMonth()+1;var yyyy = vToday.getFullYear(); if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} vToday = yyyy+'-'+mm+'-'+dd; var vLastLoginDate = '${UserDateLast}'; var arLastLoginDate = new Array(); if (vLastLoginDate == '') { arLastLoginDate[0] = vToday; arLastLoginDate[1] = 0; arLastLoginDate[2] = 1; } else { arLastLoginDate = vLastLoginDate.split(","); } var firstDate = new Date(arLastLoginDate[0]); var secondDate = new Date(vToday); var diffDays = (secondDate - firstDate) / (24 * 60 * 60 * 1000); if (diffDays > 1) { arLastLoginDate[1] = 0; } if (diffDays == 1) { arLastLoginDate[1] = Number(arLastLoginDate[1]) + 1; } if (Number(arLastLoginDate[1]) > Number(arLastLoginDate[2])) { arLastLoginDate[2] = Number(arLastLoginDate[2]) + 1; } arLastLoginDate[0] = vToday; $.post('/restapi/vc/users/id/${user.id}/profiles/name/field1/set', {value: '' + arLastLoginDate}); </script> </#if>432Views14likes3CommentsSearch category experts users in the community
Hello! I’ve set up the category experts feature and assigned different users to different rank names. For example: UserABC is an Enterprise Products Expertand UserCDE is a Professional Products Expert. When I typedEnterprise Products Expertor Professional Products Expert in thesearch field there’s no results. Is there a way that I can set it up which allows users can search for other users who are Enterprise Products or Professional Products experts rank in the community? Thank you!Solvedskylinegtr9 years agoMentor103Views0likes1CommentStripping HTML when posting message through API
When posting a message through the REST API, it can happen a user inserts unvalid HTML into the message body. When the server replies with an error status 100, it says it changed the HTML, but thats not true. That only applies when using the default tinyMCE editor Lithium suplies. So question is: is there a function that strips out the HTML to become 'valid', trough Javascript OR Freemarker Util? For example, the smileys used from within tinyMCE, contain img attributes that are not allowed once 're-used' (like the class=""). So has to be stripped out. I found this: http://community.lithium.com/t5/Developers-Knowledge-Base/utils-FreeMarker-context-object/ta-p/9345 utils.html.stripper.from.owasp But not sure if its any good. How is it done on the backend of Lithium? ThanksKPNOnline9 years agoMentor203Views0likes2CommentsWhat is the REST API to freeze message kudos
I would like to have a API to freeze kudos for an idea post, so people can no longerkudo them. And I know there is an action link on the Idea Page Options dropdown. Our requirement is to do bulk operation for freeze kudos for a set of idea posts. Again, I knowthere is a bulk action link on the idea board page. I just need to know whether there is an REST API.peterlu9 years agoChampion67Views0likes0CommentsLooking for info on how to creating a mouse over bubble
Hi, We are new to Lithium and noticed in Dev Nation that when you mouse over a topic you get a nice preview in a bubble. How does one go about configuring something like this? Does anyone have code they can share on setting this up?hcohen9 years agoGuide679Views2likes8CommentsHow do I access URL query parameters with Freemarker?
After researching online, I found two suggestions, but neither of themseem to work. I am trying to read the parameter passed in the url... for example: http://communityfoo.com?param=false The twosuggestions I've found online that didn't work are... ${RequestParameters.param} -- or -- ${request.getParameter("param")} Any ideas?Solveddustin9 years agoExpert256Views1like2CommentsFreeMarker Novice - Making two rest calls in custom component
I'm new to developing and using FreeMarker. I'm learning and reading the various samples and figured out how to reference items in an API call. I'm getting stuck trying to reference a rest call to a different API from the initial rest set. I'm trying to make something similar to "Latest Solution" panel which lists the subject and board as a custom comonent. Below is my attempt, but would appreciate an expertwho could guide me on how to reference the second rest information to pull the 'board name'. Thanks, Tim Here is my white boarding of what I want to accomplish. Make API call to get solutions https://community.foo.com/restapi/vc/boards/id/foobar/solutions/recent?restapi.response_style=view&page_size=30&format_detail=full_list_element Loop thru each thread in solution list For each thread read the following feilds (title, URL, board the solution is posted, URL for the board) Print those values End Loop <ul> <#list rest("/boards/id/foo/solutions/recent?page_size=10&response_style=view").threads.thread as thread> <#assign rest("/boards/nested").boards.board.title as title> <li> <a href="${thread.solutions.solution.@view_href}">${thread.messages.topic.subject}</a><br> <a href="${thread.board.@view_href}">${title}</a><br><br> </li> </#list> </ul>Solvedtmarshall9 years agoAdvisor179Views0likes2CommentsBulk remove roles
Hi all. I threw together a component that will let you, theoretically, remove a role from multiple users at the same time. Caveats: It's not pretty It doesn't catch all (user) errors It's not localized It'll show a green confirmation, even if a user doesn't have the role (Sorry, no idea how to catch that without looping through all roles of every user; and I don't think all those extra api calls are necessary for this excercise.) In the first bit of javascript I'm unbinding "native" form submissions, because, for some reason, Lithium has a baked-in form submission protocol that hinders the custom form code from submitting. Instructions: Enter a role enter users, separated by commas. E.g. user1,user2,user3 I recommend not adding too many at the same time. It makes an api call for every user obviously Submit Good luck. <#assign userIsAdmin = false/> <#if !user.anonymous> <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#if role.name?? && role.name == "Administrator"> <#assign userIsAdmin = true/> <#break> </#if> </#list> </#if> <#if userIsAdmin == false> Sorry, you're not an admin. <#else> <#assign removeUsers = http.request.parameters.name.get("users", "") /> <#assign removeRole = http.request.parameters.name.get("roleremove", "") /> <#if removeUsers?? && removeUsers != ""> <#assign sucUsers = []/> <#assign errUsers = []/> <#assign roles = restadmin("/roles").roles.role /> <#list roles as role> <#if role.name == removeRole?trim> <#assign hrefRole = role.@href /> <#break> </#if> </#list> <#if !hrefRole??> Role wasn't found <#else> <#list removeUsers?split(",") as u> <#assign result = restadmin("${hrefRole}/users/remove?role.user=/users/login/${u?trim}") /> <#assign showResult = true/> <#if result?? && !result.error?has_content> <#assign sucUsers = sucUsers + ["${u}"]/> <#else> <#assign errUsers = errUsers + ["${u}"]/> </#if> </#list> </#if> </#if> <div id="BulkRemoveComponent" class="lia-panel lia-panel-standard lia-component-bulk-remove"> <div class="lia-decoration-border"> <div class="lia-decoration-border-top"><div></div></div> <div class="lia-decoration-border-content"> <div> <div class="lia-panel-heading-bar-wrapper"><div class="lia-panel-heading-bar"><span class="lia-panel-heading-bar-title">Remove roles from users</span></div></div> <div class="lia-panel-content-wrapper"> <div class="lia-panel-content"> <div class="input-roles"> <form id="test-form" action="/t5/custom/page/page-id/BulkRemoveUsers" method="post"> <input id="role" type="text" name="roleremove" name="roleremove" placeholder="Role to remove"/> <textarea id="frm-name" type="text" name="users"></textarea> <input id="btSubmit" type="submit" value="Submit"/> </form> </div> </div> <#if showResult?? && showResult == true> <div id="FormResult" class="lia-quilt-column-alley lia-quilt-column-alley-single"> <div class="InfoMessage lia-panel-feedback-banner-note lia-component-common-widget-page-feedback"> <div id="FormResultSuc"><#list sucUsers as s>${s},</#list></div> <div id="FormResultErr"><#list errUsers as e>${e},</#list></div> </div> </div> </#if> </div> </div> </div> </div> </div> <script> $(document).ready(function () { $("#test-form").unbind("submit"); }); $("#test-form").submit(function(e) { e.preventDefault(); //STOP default action var postData = escape( $('#role').val().trim() + "," + $('#frm-name').val().trim() ); var formURL = $(this).attr("action"); $.ajax( { url : formURL, type: "POST", data : postData, success:function(data, textStatus, jqXHR) { }, error: function(jqXHR, textStatus, errorThrown) { $("#confirm").text("Error!"); } }); }); </script> </#if>220Views6likes0CommentsShow core avatars larger on messages
The default core avatars for messages is a little small inmy opinion at 64x36 px. I've set the Max. Avatar (Message (px)) size to 128x72 pxon the skinproperties in the studio and custom avatars are showing at that size, however since the core avatars for messages are64x36 px, they only show at that size. However, the core profileavatar is128x72 px. How would I go about having that larger image show as the avatar on message posts in topics?SolvedGarywoo9 years agoGuide361Views0likes9CommentsNeed help with the search-encapsulation component
Hey, I am trying to use the search-encapsulation component ona custom page so that I can adda section underneath it that will display search results from a 3rd party. I am having issues getting the component on the page, I looked at the search page in studio and it has: <quilt layout="one-column" nestable="false"> <add to="common-footer"> <component id="quilt:Footer"/> </add> <add to="main-content"> <component id="search-encapsulation"/> </add> <add to="common-header"> <component id="quilt:Header"/> </add> <remove from="site-navigation" for="Header"> <component id="common.widget.search-form"/> <component id="common.widget.search-form-message"/> </remove> </quilt>\ In the main content I can see the seach-encapsulation component. However, when I try to add this to my own custom page, I get a pretty cryptic error, see below, I didn't make any changes to the studio-title component. The error goes away when I remove the search-encapsulation from the page. Any help is appreciated.Solved173Views0likes1Commentv2API not returning chat or survey nodes
In v2 API throughthe 'board' collection, it doesn't return generic node like chat or survey. How should chat node be referenced and queried? In v1 API, we'd reference the chat node with path like this: <communityBaseUrl>/restapi/vc/nodes/type/key/chat/id/chat-272Views0likes1CommentEndpoint Question: Description Breaking into Multiple lines
I'm having an issue with an endpoint that I am publishing which is being picked up by an AEM service. The description is broken up into multiple lines. The developer on the AEM side is asking me to publish on one line. Has anyone run across this problem? Using appplication/rss+xml as the format. This is what it looks like published. Thank you Jasonjasondmcclellan9 years agoAdvisor63Views0likes0Commentscustom code only on 2 pages
Dear community, Does anyone have an example of how we could use thepage FreeMarker context object (http://community.lithium.com/t5/Developers-Knowledge-Base/page-FreeMarker-context-object/ta-p/9331) tospecify a code to run only on two pages (based on URL). Context: we have a remarketing code snippet that we want to fire when a user goes to two specific pages. Lithium said that we can only do this via the skin part, but that will enable this snippet on all pages. We only want it on the main page (e.g. /#) and a board (e.g./t5/community/b/AwesomeBoard) Thus, was wondering if someone could assist in showing an example e.g. (sorry for the terrible syntax) : <#ifpage.isLink(url || url)> <code snippet here> </#if> Thanks a lot, YSolvedyurikleban9 years agoMentor200Views0likes4CommentsSearch messages within "n" categories.
Hi, There are "n" categories and boards in acommunity. Prevoiusly to search messages from whole communnity, I was using the below rest call : /search/messages?q=<SearchString>&collapse_discussion=false Suppose I want to search messages from community excluding one category/borad. Howto do this using REST V1 call. If not V1 then V2 will be acceptable. Thanks, Vishwajeet127Views0likes3CommentsGet Lit of Articles in the community using REST API
Hi, 1. The following API returns the Artilce count in the community. How can we get Article list in the community using REST API? http://community.lithium.com/community-name/restapi/vc/posts/style/tkb/count 2. Is there any way we can exculde hidden board articles from the above count or list? (Something like by passing board id as a parameter) Your help could be highly appreciated. Thanks & Regards, Phanphani9 years agoAdvisor137Views0likes4Commentshttp.client FreeMarker Context Object is returning the error "html found in response"
Hi, We are trying to get HTML/XML data from thirdparty API by usinghttp.client FreeMarker Context Object. E.X.:<#assign response = http.client.request(API).header("Authorization", token).body("{ 'mode':'test'}", "application/xml").get()/> Thehttp.client.responseFreeMarker Context Object (${response.error.message}) is returning the errror"html found in response". We even tried changing the Content-Type to "text/html" but same error we are reciving. Your help could be highly appreciated. Thanks & Regards, PhaniSolvedphani9 years agoAdvisor588Views0likes8CommentsChanging the node scope of kudos leaderboard
Is it possible to change the scope of the kudos leaderboardcomponent? We have it included in the category page and it listsleaders within that category. Is it possible to override thatand make the component community level leaders even ifit is included ina category page? Thanks, SureshSolved140Views0likes1Commenthow to get views count for a thread?
Hi, usecase : return "n" recent solutions from a category/board ordered by the view count where :view count = number of views of the original topic + number of views of all replies Currently I am using below REST call to fetch recetn solutions - rest("${node_type}/id/${node_id}/solutions/recent?restapi.response_style=view&page_size=n").threads/> Issue :- REST call returns "n" no. of threads but it returns only "n" message in<linear> tag irrespective of actual no. of replies. Thus unable to calculate correct value for "views" count. e.g. REST call - http://comity.stage.lithium.com/restapi/vc/categories/id/vishwajeet_hol/solutions/recent?page_size=1 Response - <response status="success"> <threads> <thread type="thread" href="/threads/id/233"> <title type="string" null="true"/> <messages> <topic type="message" href="/messages/id/233">...</topic> <read>...</read> <linear> <message type="message" href="/messages/id/234">...</message> </linear> <count type="int">3</count> </messages> <board type="board" href="/boards/id/VH_Forum"/> <solutions>...</solutions> <id type="int">233</id> <interaction_style type="string">board</interaction_style> </thread> </threads> </response> If I change page_size to "2" then it returns 2 <messages> inside <linear> tag. Thus it limits the no. of replies in responseto the page_size parameter. It should only limit no.of threads to be returned. How to fetch all the replies with "n" recent solutions response? Is there any parameter to REST call to fetch all the replies of a topic/thread? Thanks, Vaishnavivaishnavi9 years agoExpert125Views0likes0CommentsNode level users kudos count
Hi, We have an API for leaderboard [kudos/authors/leaderboard] from this API we receiveauthor name and kudos count. This kudoscount is node level count. Query: Is there any API present for retrievingkudos count of user onnode level? Please help me on this. Thanks & Regards, Mahesh Revanwar87Views0likes2CommentsCommunity Links: How to make links open in separate window or tab?
I have two questions about links: 1. Many users post links in our community to third party sites, such as, http://support.sas.com. Is it possible for me to configure the community to make all posted links open with <a href="#" target="_blank">link</a> 2. Is it possible when pasting a community URL into a post to have it display smart text (such as a page description)? thank you, LainieLainieH9 years agoExpert101Views0likes1CommentComponent for Unsolved Topics?
We just had a customer ask for a feed/component for "Unsolved Topics." This is different from Unanswered Topics for our users, because that only shows 'no replies.' We have a technical community where our users are challenged to "solve" problems. I'm sure this is something I could pull via API (once I learn more as to how). Has anyone ever done this? Best regards, Lainie cc tocjdingerSolvedLainieH10 years agoExpert240Views1like2CommentsCustom Welcome New Member Widget and SSO
Would you happen to know if it is possible to remove abandoned users from our "welcome new members" and "registered users" widgets? As you can see in this image, we are collecting users whoare not "really registered" in this custom widget. The user below circled does is someone who got to the registration screen and abandoned it. See code for this custom content widget to see if there is anything I can tweak. What I am wanting is to not display them in this widget AND not count them in our "member statistics" that we have in our top have (similar to what Lithium does). We have SSO so we understand these folks are people who abandoned regist. But we do not want them to show as "new members.". (these people are not showing in our "who is online" custom component). Code for this widget: <#assign users = restadmin("/users/registered?page_size=14").users /> <#if users.user?has_content> <div class="users-online-wrapper"> <div class="inner"> <h2>Please Welcome our Newest Community Members</h2> <#assign totalUsers = restadmin("/users/count").value /> <#assign totalUsersOnlineWithAnon = restadmin("/users/online/count").value?number /> <#assign totalUsersWithoutAnon = restadmin("/users/online") /> <#assign guestUsers = totalUsersOnlineWithAnon - (totalUsersWithoutAnon.users.user?size) /> <#assign totalMembersOnline = rest("/users/online/registered/count").value /> <#assign totalGuestsOnline = rest("/users/online/anonymous/count").value /> <ul class="user-online-list"> <#assign thisRow = 1> <#list users.user as onlineUser> <#assign avatar = rest(onlineUser.@href+"/profiles/avatar/size/message").image /> <li class="user-${thisRow}"> <a href="${onlineUser.@view_href}"><img src="${avatar.url}" title="${onlineUser.login}"><br /><span class="userlogin">${onlineUser.login}</span></a> </li> <#if thisRow == 7> <div class="clearboth"></div> </#if> <#assign thisRow = thisRow + 1> </#list> <div class="clearboth"></div> </ul> <a href="/t5/forums/usersonlinepage" class="more-link capsLock">View All Members Online</a> </div> </div> </#if> This widget is also mistakeningly counting "members" who are abandoned: and here is that code: <div class="lia-component-community-statistics"> <div class="short-container"> <div class="short"> <div class="inner"> <p>MEMBERS</p> <#assign members_count = restadmin("/users/count").value?number /> <h2>${members_count?string(",##0")}</h2> </div> </div> <div class="short"> <div class="inner"> <p>ONLINE</p> <#assign online_count = restadmin("/users/online/registered/count").value?number /> <h2>${online_count?string(",##0")}</h2> </div> </div> <div class="short last"> <div class="inner"> <p>POSTS</p> <#assign posts_count = restadmin("/posts/count").value?number /> <h2>${posts_count?string(",##0")}</h2> </div> </div> </div> <div class="clearboth"></div> </div> Thank you very much for any assistance. I very much want to learn this formally and plan to take some advanced studio training. Lainie cc: cjdingerSolvedLainieH10 years agoExpert312Views0likes5CommentsInternal server error in API call.
Hallo, i'm trying to make an API call in that way: https://api.stage.lithium.com/community/2.0/threesixty/search?q=SELECT+%2A+FROM+messages&api.pretty_print=true&client_id=CLIENTID%3D The response is: {"status":"Internal Server Error","message":"Internal Server Error","statusCode":500} Any ideas what is wrong? Account settings? Query parameters? I've read all the forums but can't find any answer. Thank you!gessulat10 years agoAdept191Views0likes4CommentsGetting threads a user participated in via REST API?
I'm trying to bild a custom topic/thread list of threads/topics a user has participated in, similar to the one found on the view profile page of ausers own profile (which is the component forums.widget.recent-messages). As I guess from the component name, it just displays the users participated topicson the profile page only and on a "normal" page it actually displays all recent topics, is that correct? That's the content I'd like to get, but there seems to be no way of getting the same via REST API? The only thing close to it is the call to /restapi/vc/users/id/<userid>/participated/threads/id/<threadid> which only returns a boolean, an experimental call to /restapi/vc/users/id/<userid>/participated/threads returns an error... so my question would be: Is there any API call to get what I'm looking for?Solvedluk10 years agoBoss183Views0likes2CommentsCapturing user type in Omniture analytics
Hi there, I would be so grateful if someone is able to help with this question... we want to be able to analyse our user type data using Omniture. Does anyone know what is the JavaScript variable name/object that is storing the email id and the user type id on the page? Many thanks,TessW10 years agoContributor300Views1like3CommentsAdding logo using API
Hello! I would like to add a logo next to the title of any section that is internal only (via API?) Is this possible? We are currently using API calls for ourdropdown menu The dropdown menu code looks like this: <#assign categories = rest("/categories").categories /> <#list categories.category as category> <li><a href="${category.@view_href}">${category.title}</a> <ul class="menu menu-flash-array"> <#list rest(category.@href+"/boards").boards.board as board > <li><a href="${board.@view_href}">${board.title}</a></li> </#list> </ul> </li> </#list> Thank you!Solvedskylinegtr10 years agoMentor231Views0likes7CommentsCustom pagination refuses to cooperate
Hi there. I'm basically using the same code as here: http://community.lithium.com/t5/Developers-Discussion/Implement-custom-pagination/m-p/106695/ My code: <#assign page_size = 4/> <#assign page_number = webuisupport.path.parameters.name.get("page",1) /> <#assign total_articles = restadmin("/blogs/id/${coreNode.id}/messages/count/").value?number/> <#assign pageable_item = webuisupport.paging.pageableItem.setCurrentPageNumber(page_number).setItemsPerPage(page_size).setTotalItems(total_articles?number).setPagingMode("trivial").build /> <@component id="common.widget.pager" pageableItem=pageable_item /> Problem is, no matter what I try, I can't get past page 1. I click on "next" (hover shows URL/page/2), but I just end up on URL again. Have a feeling the webuisupport path code isn't "finding" page 2 and just jumping to page 1, but how to fix it?Solved708Views1like15CommentsPreviewing response of REST call
Lets say I am doing something like: <#assign recent = rest("/boards/id/somethingcool/topics/recent")/> Simply doing: ${recent} throws me an error in the template. Is there a way I can print out what is assighned to the recent variable in the preview / what is the best way to debug what is going on in the template and data that is being gathered?Solved110Views0likes1CommentLIQL on custom message status
Hi all, is there a way to make a query on the message table filtering ideas which have a custom status assigned, the minimal proof of concept i came up with reading the documentation follows: SELECT id, status, conversation FROM messages WHERE depth=0 AND conversation.style = 'idea' AND status.key = 'accepted' ORDER BY conversation.last_post_time DESC LIMIT 5 Of course the accepted key is configured in the admin and has that value: If i remove the status.key line the query works as expected. SELECT id, status, conversation FROM messages WHERE depth=0 AND conversation.style = 'idea' ORDER BY conversation.last_post_time DESC LIMIT 5 I've already tried to use the other fields of the 'status' but none seem to do the trick thanks in advace cheers86Views0likes1CommentHow to change Component Header (Title) for a Specific page
Question How to change Component Header (Title) for a Specific page? Answer Add @page:CommunityPage to the text key in Studio -> Text Editor Example: Change the "Recent Posts" Component title to "Recent Blog Articles" only in the CommunityPage where as other page should continue to have the title as"Recent Posts". Add the below line in Text Editor. module.recent-messages.title.all@page:CommunityPage = Recent Blog Articlespremkumar10 years agoAdvisor204Views3likes1CommentGet list of ideas filtered by multiple statuses
Hello All, Is there a way to get list of ideas filtered by multiple statuses. Currently we do have a REST API call to get all the messages for a single status as follow:http://community.lithium.com/restapi/vc/boards/id/Lithium_Ideas/threads/for/message_statuses/id/2/recent Is there any API call which will return all the idea messages for those statuses. E.g. I need ideas who has status V1, V2 and V3. Can we get it in single call? Regards, Dhiraj107Views0likes2CommentsFeatured thread meta tag (Freemarker)
Description This component can be used to add a meta tag to the <head> element if the thread being viewed is a featured thread. Requirements Lithium version 9.18 or higher, Lithium Studio How to add this to a Lithium community There are two parts to adding a meta tag to the head element for featured threads: Create a component Place the component in the head element To create the component: Go to Studio > Components. Click New Component. Enter a name for the component (for example, featured-thread-meta-tag) and click Create. Add the following markup to the component: <#if page.context.thread??> <#assign resp = rest("2.0", "/messages/" + page.context.thread.topicMessage.uniqueId + "?fields=conversation(featured)") /> <#if resp.data.conversation.featured> <meta name="featuredtopic" content="yes" /> </#if> </#if> 4. Click Save. To place the element in the <head> tag: Go to Community Style >Wrapper. Copy the following markup into the "Page Head Content" text area: <#include "featured-thread-meta-tag.ftl" /> 3. Click Save. Example There is no example page for for this component. NOTE: This message used to contain the following (REST v1) code snippit, but has been replaced with the REST v2 code above because that is more efficient and concise: <#if page.context.thread??> <#list rest("/boards/id/${coreNode.id}/threads/featured?page_size=999").threads.thread as thread> <#if thread.messages.topic.id?number == page.context.thread.topicMessage.uniqueId> <meta name="featuredtopic" content="yes" /> <#break /> </#if> </#list> </#if>DougS10 years agoKhoros Oracle446Views3likes4CommentsNeed to avoid extra space between "Post" button and "Current version" draft.
Hi All, Please find the screenshot "Extra_Space.png". The extra space is getting generated within "post" button and "Current version" draft, This is because of large number of pre-defined labels used. Is it possible to change the marked "Green" quilt (Current version) in screenshot to be placed right after the "Post" button. So that the extra space will not occur when there are large number of pre-defined labels used. Please let us know if you need more information. Thank you. Regards, Vishwajit Shinde69Views0likes1CommentCustom emoticons/emoji?
Greetings! The default emoticon experience feels a bit outdated, so I'm looking for options to replace it. Any plans on Lithium's part to update this? I came across the phantom open emoji set, which looks pretty solid! It parallels the well known apple emoji set, and is free to use:Emoji unicode tables,Github page A couple questions: I read on the forums a while ago that Lithium customer support can do this on your behalf. Is this still the procedure to follow? If we chose to use the Phantom emoji set, can we provide the SVG files to Lithium, or would we have to convert them to PNGs or another format? Thanks!412Views0likes8Comments"Realtime" metric & for a certain period via REST API
We are currently trying to plug in Lithium metrics into another monitoring solution and would like to get daily/hourly/minutely metrics on views/posts per board. Question 1: I can't find a way to limit e.g. the message count to a certain time period. I tried without success (e.g. no difference to the count without the "date_start" parameter): http://skypec.lithium.com/skypec/restapi/vc/boards/id/Windows/messages/count?date_start=2012-01-01&date_end=2012-01-20 Question 2: I tried to use the "Metrics" API object to pull the hourly data but couldn't get it working, e.g. with this url http://skypec.lithium.com/skypec/restapi/vc/boards/id/Windows/metrics/name/views/history/daily I keep receiving UserRef does not have access to RequiredPermissions[(allow_access_metrics)] Although the user has full REST APi read and general metrics access. On stage there's an even weirder error message: The maximum number of hourly metrics allowed is 8760, but 372591 hours were requested. Interestingly neither of the numbers mentions keeps changing when refresing the page or trying at other times of the day. What's wrong there? Bonus question: How realtimeare the REST API data? Will I see a new message being posted reflect in the message count of a board the next minute?Solved693Views0likes2CommentsHas anyone added Modernizer.js to their page?
We just launched our site in Lithium (after converting from Jive). We are having some issues with compatibililty mode in IE and a developer here said we should add Modernizer.js. Has anyone done this before and if I do add should I point to an external reference or upload it as an assett. thank you LainieSolvedLainieH10 years agoExpert130Views2likes2CommentsRest API to get and set the status of Idea
Hello All, Is there any API to get and set status of any idea message. We need to buid a cusotm component in which we need to display status of a particular idea and if user changes the status that needs to be reflected on Idea. In short we need to build status functionality of Idea. Please let me know if there are any REST API calls available. Regards, Dhiraj88Views0likes2Comments