Display the same studio component multiple times
Hi, Is there anyway to display the same studiocomponent multiple times with all its styles? I need to display<@component id="common.widget.user-navigation-combine"/> twice on the page: in common-headerand in custom sticky header (created via wrapper). Unfortunately, it can bedisplayed correctly only once, because HTML/CSS allows to use component's id styleonly once on the page. Here is how it should be shown: Thanks in advance, Yurii.73Views0likes0CommentsREST V2 query for online users
Is there a way to get only online users from the database using API V2? I would normally use a WHERE online_status = 'online' but this returns offline users too! My query is also not suitable as it takes the first 1000 and loops to find online users. I have a database of 30,000 members and this just wont do. Here is my query for my component. <#assign query = "SELECT login, view_href, avatar, online_status, registration_data, rank FROM users limit 1000" /> Can anyone suggest a way of modifying my query to only get online users?jaread839 years agoChampion155Views0likes4CommentsReconstructing post URLs
I'm looking through the documentation but I can't find a way to retrieve the full url for a post. The responses I have gotten include an href, but it only contains the information necessary to retrieve the post via API. How would I provide a link that can be passed to a user to navigate to the post?Solvedchrismena9 years agoContributor141Views0likes2CommentsGet kudo weight of the user
Hi, Is there any REST API call / freemarker context object to get the signed-in user's kudo weight? I found this in the documentaion but there is no REST API call mentioned in here: http://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv1&leaf-id=KudoWeightedUser.weight#KudoWeightedUser.weight Thanks in advance, Madhukandulmadhu9 years agoAdvisor113Views0likes3CommentsRSS Optimization for Blog Article
I've been asked by a blog author why his RSS reader is not consistent in its choice of the image it displays when it displays a feed. I am a casual RSS user at best, so I don't know, but surmise that a full-featured RSS reader would have some configuration tools to drive this choice. He was wondering if 1) there is a setting in Lithium that determines a priority on the images in an article (e.g., the teaser image vs. the first image in the body vs. a later image, etc., and 2) is there any feasible way to "optimize" images for RSS readers in general, that might make the image choice more consistent?Solved73Views0likes1CommentThe component that renders a users avatar?
A default Lithium profile page has a component that displays the users avatar image - my problem is, that I somehow deleted it from the page in Studio, and now I cant find it in the list of components. Can someone point it out for me? :) The html being output has the class 'viewprofilepagebanner 'SuneR9 years agoGuide257Views0likes5CommentsEnable/Disable Kudos for a post
Hi Dev Gurus, I have a requirement to customize the default post message form. I am able tochange the submit option from its default behaviour. Now I am able to save the message and some custommetadata through separate REST API call bypassing the form submission. But there are 2 other check boxes that appear in the post message page - 1.Don't allow XP for this post 2.Subscribe to replies I didn't find any REST API to enable/disable these 2 values for a post. Is there any way to set this flag either through an API or Freemarker object or some other way? Thanks, Venkat Thanks, Venkatwwceadmin9 years agoHelper70Views0likes0CommentsMonthly Billable API Calls (BAC)
How do I find out how many Billable API Calls (BAC) I've used for the month, and what those calls were attributed to? I understand we're contracted to a certain amount of BAC monthly and will want to keep tabs on this now that we've recently started extending our community and leveraging both the Bulk Data API and Community APIs V1 andV2. Anyone know where I can find this info?AllisonLeahy9 years agoExecutive270Views0likes5Commentsmodify private statistics component
hi friendly people, is there any way to edit the private statistics component to eliminate some line items? there's a lot of things within the component, ie. Q&A Replies Posted, Answers Posted, etc that our community doesn't use. thanks! -daphnedaphtan9 years agoDirector101Views0likes1CommentLithium SDK: Unable to export quilts
Hi, I am trying to export only quilts into SDK using following command, but ended up with the error "quilt is not a valid plugin point", command:li export-studio-plugin --points "quilts" --force Your help could be highly appreciated. Thanks & Regards, PhaniSolvedphani9 years agoAdvisor103Views0likes1CommentAPI returing different results from API V1/V2 and Studio
Hello, I'm new to lithium, I'm running the following queries from V1, V2 -SELECT count(*) FROM messages restadmin('/metrics/name/net_overall_posts?js_string') These are returning the following: - 177 and 162 What is the difference between these two calls? Thanks, Edit: When I create a new thread or reply, they both increment by one. I'll also add that when using the API Browser and calling the method I get 180. Which is different from the first query I'm making with a URL?Solved387Views0likes8CommentsCheck the recent activity on post
Hello, I want to track the Kudos for given a message. I read about "Activity" freemarker context object, and trying to make use of it. "activity.results.name.MessageUpdated", will provide me with the information that some update has happened for the particular message, but is there a way I can retrieve info about the recent activity that has resulted in change of message object, or what attribute in message object has been updated ? Thanks in Advance.ronaksomani9 years agoMentor81Views0likes0CommentsCreate message with a binaray attachment (zip archive) via REST API v2 fails
Creating a message with an attachment (zip archive) works with REST API v1 as explained in this thread by HaidongG: https://community.lithium.com/t5/Developers-Discussion/We-can-not-find-rest-API-for-attachment/m-p/127081 I have to use oauth2 authentication so I'm restricted to REST API 2. However creating a message with an attachment results in the following response {u'error': {u'code': 100, u'message': u''}, u'status': u'error'} Sending the request without an attachment or a text only attachment successfully creates the message. Any ideas?msommer9 years agoContributor235Views0likes4CommentsEndpoint rest call with restapi.session_key not taking user privillages
Hi, I have created a custom endpoint. I want to make REST calls on befalh of a specific user. Below are the key REST calls in endpoint :- 1. Get session key for the user - <#assign session_key = rest("/authentication/sessions/login?user.login=<user_login>&user.password=<user_pwd>").value?string /> 2. Pass the session key in subsequent REST calls - <#assign allowed = rest("/categories/id/${catId}/view/allowed?restapi.session_key=${session_key}").value?string /> I am getting different response when I hit the endpoint URL in browser for anonymous user and logged in user. Its still taking context user and not the privileges from the session_key. I am assuming it should return same response as it should take user session_key previlages. Any pointers would help. Thanks, Vaishnavivaishnavi9 years agoExpert136Views0likes1CommentEmpty result list using date range on consversation.last_post_time
Hi, im trying to filter my messages with the following query: SELECT count(*) FROM messages WHERE depth = 0 AND conversation.style IN ('forum', 'group') AND tags.text MATCHES ('Zugangstechnik') AND conversation.last_post_time > 1454167508396 AND conversation.last_post_time < 1456845908396 The query should return all messages, where the last post time is within the last 30 days and today. The count value is always 0, but the last post within this converstion was made on 2016-02-29. If I remove the lower date range and sendthe query again, I get all messages until today. SELECT count(*) FROM messages WHERE depth = 0 AND conversation.style IN ('forum', 'group') AND tags.text MATCHES ('Zugangstechnik') AND conversation.last_post_time < 1456845908396 For another use case I use a similiar query, but don't filter by a specific tag. This query also returns a correct result list Could somebody help? Thanks and kind regards, Christiancike9 years agoChampion118Views0likes2CommentsFreemarker With Roles
I have a problem with a plug are not getting data from a function with freemarker. My goal is to visualize the role of the user who entered the community and according to this display a banner. However, this is only possible to be visible for users with administrator role. I have new roles called Nivel_Test1, Nivel_Test2and Nivel_Test3only those roles are the ones that should be the banner but only manages to do with administrator and that's not what I want. <#assign userStar = rest("2.0","/search?q=" + "SELECT roles FROM users WHERE login = '${user.login}'"?url) /> <#list userStar.data.items as usuario1> <#assign roles1 = rest("2.0","/search?q=" + "${usuario1.roles.query}"?url) /> <#list roles1.data.items as role> <#switch role.name> <#case 'Nivel_Test1'> <div class="banner_cr"><img src=" ${asset.get("/html/assets/imagen.jpg")}" /></div> <#break> <#case 'Nivel_Test2'> <div class="banner_cr"><img src=" ${asset.get("/html/assets/imagen.jpg")}" /></div> <#break> <#case 'Nivel_Test3'> <div class="banner_cr"><img src=" ${asset.get("/html/assets/imagen.jpg")}" /></div> <#break> <#default> <div></div> </#switch> </#list> </#list> Please Help Me:catembarrassed:Maikinos9 years agoContributor111Views0likes1CommentUser offline status when set to not display online status
I have built a custom online user panel using REST v2 and one of my testers found that their avatar is showing up in the list when they have gone to their settings and set it so they are shown as offline to everyone. Is there a way I can check this users settings in my loop and not display them? I can't see anything in the Liql query results that would indicate their setting to display as offline. This also leads on to something of a similar vein.. what do I do about it when a user has changed their setting to only display their online status for 'friends'? Here is a basic skeleton of my code which has the api call and loop... <#assign query = "SELECT login, view_href, avatar, online_status, registration_data, rank FROM users limit 1000" /> <#assign res = restadmin("2.0", "/search?q=${query?url}").data.items /> <#assign users_id = [] /> <#list res as user> <#if user.online_status = 'online' & user.registration_data.status = 'fully-registered'> <a class="${rankClass}" href="${user.view_href}"><img src="${user.avatar.message}" title="${user.login}" alt="${user.login}" /></a> </#if> </#list> If anyone has any ideas how I can not include a user who has set their preferences to not show up as online and even restrict their online status to their friends I would greatly appreciate it!jaread839 years agoChampion123Views0likes3CommentsTrigger REST export on new event e.g. new Discussion
Hi everybody, I was wondering if there is any way to implement triggers to the the system which get triggered every time lets say a new Disucssion is created. Said trigger should then perform a defined action liek for example perform a REST call to an outside resource exporting the new Discussion title. Is something like that possiblewith this system? Thanks! cheers Andy176Views0likes5CommentsAPI v2 list messages from deleted board
Hi guys, I'm building a custom message stream component. To get the messages I'm using API v2. On of my queries looks like this: SELECT * FROM messages WHERE depth = 0 AND conversation.style IN ('forum', 'group') AND conversation.solved = true " + common_order + " LIMIT ${page_size} OFFSET ${offset} The query response includes a message from a board which was deleted a few months ago. So I get an error while requesting the board information by ID within a nested call: <#assign board = rest("/boards/id/${message.board.id}?restapi.response_style=view").board /> Error: "No board with dispid found" Could you image why messages from the deleted board are returned by my query?cike9 years agoChampion105Views0likes1CommentWidget not showing after user sign in.
Hello, Just having a strange issue with certain widgets displaying. Is there an area where i can specify which widgets are available before / after sign in? Our community home page has the "My Badges" widget which strangely shows when a user has NOT signed in but disappears once a user signs in. This needs to work the complete opposite way. Kind Regards, e72747Solvede727479 years agoAdept188Views0likes6CommentsBulk Data API - Initial Load, verify daily pull
So we are still working on perfecting our bulk data API and have two more questions 1. We are limited to 24 hours pulls. How did others get historical data? Did you pull 24 hours at a time X times with X calls, or was Lithium able to provide a full load for 1 time load? 2. How do people sync up what is pulled via bulk data API versus the daily record count. Was another API used to get the count to be able to verify that the bulk data API was working correctly? How do others verify if all data is imported correctly into target system. Thanks, Timtmarshall9 years agoAdvisor173Views0likes2CommentsInformatica and Bulk Data API
Hi, We are attempting to connect and configure our informatica application to call the Bulk Data API. I'm posting this up to the general developer discussion to understand if there might be another community who might have this setup and what steps they took to get the connection up and working. Lithium Support is not aware of a community who might have this type of configuration, but would love to go into more depth if a community was successful in completing this integration. Cheers, TimSolvedtmarshall9 years agoAdvisor412Views1like8Comments.htaccess file for Lithium upload
Has anyone ever given a .htaccess file to Lithium for installing redirects? We have somewhere in the region of a couple hundred redirects but we've boiled them down to a handful of regex expressions and have an agreement in place for Lithium to upload 'a redirect map' for us. We're assuming this means a .htaccess file including redirects but wanted to see what other people's experiences with this have been, I can't find anything about it on the community. Thanks, Dom110Views0likes3Commentsdatesupport documentation
I noticed a few threads refer to datesupport documentation here: http://community.lithium.com/t5/Developers-Knowledge-Base/datesupport-FreeMarker-context-object/ta-p/9349 but that redirects me here, with access denied error: http://community.lithium.com/t5/TKB-Archive-Knowledge-Base/datesupport-FreeMarker-context-object/ta-p/9349 Where can I review datesupport documention? Does the datesupport object let me convert a LiQL message timestamp into a timestamp of the active user's timezone preference? May I pass a format string to thegetDateAsString() function? Thank you, Davesullysnack9 years agoKhoros Alumni (Retired)112Views1like1CommentTarget a user's role via freemarker
Hey folks, Wanted to see if anyone ever implemented something similar: We learned how to target anonymous users with the following syntax: <#if user.anonymous == true> User is anonymous. Display anonymous message here. <#else> User is authenticated. Display authenticted message here. You <em>can</em> <u>also</u> <strong>use</strong> HTML! </#if> However, I was wondering if someone could share the syntax to target multiple user roles, e.g.: <#if user.role == Admin | Author | LithiumAuthor> User has a role of admin or author or lithiumauthor and thus should see this <#else> if they do not have that role, they should see this </#if> Thanks for any insights, Yyurikleban9 years agoMentor202Views0likes3CommentsCommunity member data export for Newsletter
Hi We send out a community newsletter on a monthly base. Therefore we export manually data of new users (Username, firstname, familyname, mail-address)Community Admin and implement it in our CRM, to match with all other data. I'm wondering now, if there's an interface to do this process automatically in the future? Or are there options through the Rest API?oliverlutz19 years agoMentor106Views0likes1CommentAnother redirect request
Hi, I want to implement a redirect on a generic blog page back to either the community front page or the parent category page. This is because the category page serves the same content so a blog page without a filter in place will have the same content and therefore possibly create an SEO issue with duplicate pages. ChiaraSkindly pointed out yesterday that we couldn't use a webuisupport request in the PI tab (although one Lithium example here uses this method:http://community.lithium.com/t5/Developers-Knowledge-Base/Using-a-FreeMarker-Page-Initialization-Script/ta-p/125767) but I can't see any other way of achieving this so I tried it on the off chance it might work, it didn't. I want to keep the bg-p if there is either a username or label-name in the URL so I tried this: <#if coreNode.id == "en" > <#if page.name == "BlogPage"> <#if webuisupport.path.parameters.name.get("label-name","") == ""> <#if webuisupport.path.parameters.name.get("user-id","") == ""> ${http.response.setRedirectUrl(community.urls.frontPage)} ${http.response.setRedirectStatus(301)} </#if> </#if> </#if> </#if> I could separate the label-name and user-id checks into 2 separate redirect requests but I don't think that will make a difference right? Anyone help? Thanks, Dom104Views0likes1CommentLithium SDK - Showing SDK image for all components and endpoints after submit
Hi, We have started using Lithium-SDK in our development. Thanks for Lithium for providing such a great feature. Could you please help us to solve following using Lithium-SDK 1. After our first submit (started with test component), we observed that SDK image is showing for all components and endpointsapart from test component. As per our understanding the image should showonly to the components or endpoints which are created or updated using SDK? 2. When a component is created/updated in Studio, how can we pull into or update local SDK plugin repository using SDK command? Thanks & Regards, Phaniphani9 years agoAdvisor139Views0likes3CommentsGet Each Author's Role With Rest API
I'm attempted to create a custom component that will display each author's role beneath the stock Author component on the message page.Ideally, I'd add the information to the stock Author component, but stock componentsappear to be untouchable. I feel like I'm close. I've got <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> ${role.name} </#list> But the bold portionis looking at me, myself, and I as the user instead of looking at the message author. It's not as simple as ${author.id?c}. I can't tell if I'm really close to a solution or way off course. Any guidance would be very much appreciated.Solvedsimantel9 years agoGuide334Views0likes6CommentsTesting/Debugging/Tracing Component caching
Hi, We've recently implemented component caching on a number of components on our staging environment andwas wonderingwhat the best way to test that this is working correctly is? Are there any tracing/debugging tools for component caching available? Or is there any other way to determine the performance difference between a cached and uncached component? Thanksnnguyen9 years agoContributor100Views3likes0Commentshttp.client.request to make a POST call to external API from lithium
Hi, I am using http.client.request freemarker object to make a POST call to an external API from Lithium endpoint. I am using basic auth to authenticate the call. Request looks as below : http.client.request("https","api.something.com","url.something").header("Authorization", "Basic encodedcreds").body("{'param1':'value1','param2':'value2'}","application/json")post() /> But I am getting connect time out error in response as:"error making http request: connect timed out" I have already added the allowed domain name to http.client in Admin. Additionaly I would like to know how can I pass additional Header attributes in request (more then 1). Can someone help ?Solvedronaksomani9 years agoMentor407Views0likes3CommentsPage Initialization Script
Hi does anyone know if the PI script takes a while to take effect? I had a generic quilt replacement script in place: <#if clientDevice.mobile> ${http.response.replaceQuilt("MobileCategoryPage","CustomQuilt") } ${http.response.replaceQuilt("MobileBlogPage","CustomQuilt") } ${http.response.replaceQuilt("MobileBlogArticlePage","CustomQuilt") } </#if> And this worked fine. However, I wanted to apply this to specific categories and not every category in my community, I implemented a check and changed the whole script, including removing the MobileBlogArticlePage replacement entirely. I thought it had worked correctly but all the categories were still changing quilts, including the article pages. I removed the whole PI script and checked everything was working as before, then when it was I put in the following script: <#if clientDevice.mobile> <#if webuisupport.path.parameters.name.get("ct-p","") = "example" > ${http.response.replaceQuilt("MobileCategoryPage","CustomQuilt") } </#if> <#if webuisupport.path.parameters.name.get("bg-p","") = "example"> ${http.response.replaceQuilt("MobileBlogPage","CustomQuilt") } </#if> </#if> But nothing is happening, does anyone know why the script didn't seem to stop working even when it had been removed and/or whether the script above should work? Thanks, DomSolved428Views0likes5CommentsFreemarker context object or a REST API call for getting preferred language set by current user
Hi, Signed-in user can changehis preferred language fromMy Settings -> Preferences -> Language. Is there any Freemarker context object or a REST API call for getting this preferred language set by current user? Thanks, Madhukandulmadhu9 years agoAdvisor114Views0likes2CommentsCustom ActiveCast widget
Hello I tried to use the ActiveCast widget to display differentcommunity threads within a Landingpage or FAQ. My Problems are: The ac-subject is included into a H2-Tag. For SEO purposes, is that a quiet bad solution. The whole structure (tags that are used) of the output code is not adjustable Questions: I need to know, how to modify the structure of the output. The current setup is not really usable for mypurposes. Just an example what I would like to do: One idea of me is, to put the subjects into a list, like this. But for that, I need to know how tomodify thestructure of the output. Respectivelywhere in lithium is the possibility to change that. Thanks for your help! Maxmbaasner9 years agoContributor62Views0likes0CommentsGet messages from certain date range
Hi there. I'm getting start and end dates dynamically from the current url (so admins can choose their own dates): ?startDate=2016-01-01&endDate=2016-02-15 <#assign dateStart = http.request.parameters.name.get("startDate", "")?string /> <#assign dateEnd = http.request.parameters.name.get("endDate", "")?string /> Now I'm trying to use these dates to get messages within that range, but I can't seem to get it to work. SELECT count(*) FROM messages WHERE author.id = '${user.id}' AND post_time > '${dateStart}' AND post_time < '${dateEnd}' I've been reading about different (iso) formats, converting with certain ?string variables, but I just seem to be stuck. Freemarker and dates are my biggest weakness. Help?101Views0likes3CommentsShow Rank icon
Hi All, I made a custom call for latest post but now I need to show rank icon infront of author name. Following is the snippet I have used for post: <#assign messages = rest("2.0","/search?q=" + "SELECT * FROM messages WHERE author.id='${user.id}' ORDER BY post_time DESC LIMIT 5"?url) /> <#assign ranking= restadmin("/users/id/${author.id}/ranking")> /* rest call for rank*/ <#list messages.data.items as recent > <#if recent?has_content> <p><a href="${recent.view_href}">${recent.subject}</a></p> <p>${ranking.left_image}</p> </#if> </#list> Following is the example for rank icon: Above code is working fine for post, only rank icon need to display.Solvedbhupen9 years agoAdvisor618Views0likes16CommentsHow do we enable/build preview text on hover?
In this very board, when you hover over a post, it shows a preview of the text of that post. How do we enable thisfeature for our own community, or if it's a customization, could you please share the code here? Many thanks!iftomkins9 years agoMaven174Views0likes4CommentsEmail Template - Getting User First Name From the Input
Hi Lithium Community, A quick enquiry, we are currently trying to update the default user registration email template with a custom HTML template. We are stuck at trying to find a way to pull-in user submitted First name field. $user.first_name and $first_name doesn't seem to work. Any suggestion would be highly appreciated. Thank you.212Views0likes5CommentsRESTAPI Authentication for posting a reply
Hi All, I am developing a module in Windows 10 App to reply to a post. I am using RESTAPI Session Key for authentication. These are the steps I followed 1. Got Session key using following http://testcompany.lithium.com/test/restapi/vc/authentication/sessions/login?user.login='test'&user.password='test' I use the above url to get Session key which i am able to get successfully. 2. I tried to post to the community using the following url .http://testcompany.lithium.com/test/restapi/vc/messages/id/54/reply?message.body='for testing'&message.subject='testing' This call fails with error message User -1 does not have the following permission(s) at Test: [ allow_restapi_call_modify ] I have verified the user do have the permission mentioned above but still it fails.Infact I used Admin login to do the post and still facing the same error. Any pointers!! Thanks, Vijayvbandi9 years agoContributor193Views0likes5Commentslast_chance_html versus "Page Hitbox Content" in wrapper
While reviewing the Lithium Hover Cards implementation I stumbed over the special last_chance_html custom componentwhich "will run at the very end of every page load." I was wondering how this differs from the "Page Hitbox Content" in the Studio Community Style Wrapper? According to the help text there this content "will be appended near the end of the body tag on every page." Anyone knows the difference and can share recommendations on when to use which of them?216Views0likes3Commentsget responseText with Freemarker
Hello. I have an endpoint that spits out a simple number as html. I can use Ajax to get that number, but how do I get it in FM? This works fine, for JS, but how do I get the variable returned as a FM variable, instead? $.ajax({ url: '/spotify/plugins/custom/spotify/spotify/my_custom_endpoint', error: function() { console.log('error') }, success: function(responseText) { console.log(responseText) }, type: 'GET' }); I tried several http client response variants, but no success.110Views0likes3Comments