Auto generate SSO User Login guidelines, how can you manage parameters of user id?
Greetings, We currently have a fully integrated SSO which passes our product login credentials to Lithium. We then have an opt in where customers must click on a link "complete registration" to reach the complete registration page in order to create a user ID and accept terms of use. We are looking to auto create user id in to improve our completed registration rates. In our current SSO set up: customers login into Domo product Select Community from our dice graphic icon They are then brought to community and must click on one of 3 options to “Complete Registration” They then arrive a the Complete Registration page where they select a user name, accept terms and click on submit See this link here Question I have is. If we enable “Auto generate SSO UserLogin” I assume the system will auto generate a user name, correct? Is there a way where we auto populate and completely by pass the registration page which is auto completed and terms accepted by default? How can we manage what the auto assign user id will look like? In other words if we pass a customers email can we write a script to state take 1st 3 letters and last 3 letters or email before their domain? Can you send me any relevant documentation on this? Thanks! DaniSolvedDani8 years agoAdvisor619Views0likes16CommentsGlossary of data fields in Lithiums V1 and V2 API
Does anyone have documentation that shows a comparison and mapping of all data fields available to retrieve in LIthium's API V1 as compared with API V2 There seems to be a disconnect I would like to see a comprehensive view of all data fields available in each version and if the nomenclature has changed what would the new term be to pull in as an examples Kudos, ideas... Thanks! DaniDani8 years agoAdvisor76Views0likes1CommentSeparate API call to get Kudos and Votes for particular user
Hello All, We need an API call to fetch kudos count for particular user for each discussion style. E.g. User specific kudos count for forums, User specific votes count for ideas etc. Please let us know if anyone has implemented such use case. Regards, Dhiraj90Views0likes1Commentbase64 encoding using Freemarker in custom component/endpoint
Hi all, I need to encode the value of a query parameter in my http client request in Freemarker. I need base64 encryption for the same. Is there any possible way for this? Any help would be appreciated. Thanks in advance. Regards, MadhuSolvedADS_PSI8 years agoMentor156Views0likes3Comments- sunkandali8 years agoContributor136Views0likes1Comment
Add message type icons to search result items
This is code I'm working on which auto-suggests message search results as the user types. It works well, but the challenge is that it does not show the "message type" icon next to the results, as shown in this screenshot, such as for "solved" posts vs. normal forum posts. Does anyone know how to modify the code below to include the message type icons? Thanks! <#assign result_list_size = 6 /> <#assign results_label = text.format('searchBeforePostField.success-text.title') /> <#-- Search only within current language --> <#assign languageScope = coreNode.settings.name.get("profile.language")> <@liaAddScript> ;(function($) { $(document).ready(function() { //console.log('got here 1'); function runSearch() { var subjectValue = $("#lia-subject").val(); if (subjectValue.length > 0) { //console.log('got here 2'); $.ajax({ type: "GET", url: "/${community.id}/restapi/vc/search/messages", data: ({ //"q":subjectValue, "one_or_more":subjectValue, //less precise search than q //"filter": "labels%2Clocation", "location": "category%3A${languageScope}", "page_size":"${result_list_size}", "restapi.response_style":"view", "xslt":"json.xsl" }), success: function(result) { $(".lia-form-subscriptions-fieldset-toggle").before("<div id='ajax_search_results'></div>") //console.log('got here 3'); //console.log(subjectValue); if (result.response.messages == null || result.response.messages.message.length < 1) { //$("#ajax_search_results").empty(); //console.log('got here 4'); } else { //console.log('got here 5'); var msgMarkup = "<fieldset><legend>${results_label}</legend>"; msgMarkup += "<table class='lia-list-wide'>"; if (typeof result.response.messages.message.length === 'undefined') { msgMarkup += "<tr><td><a href='" + result.response.messages.message.view_href + "'>" + result.response.messages.message.subject.$ + "</a></td></tr>"; } else { $.each(result.response.messages.message, function(index, msg) { msgMarkup += "<tr><td><a href='" + msg.view_href + "'>" + msg.subject.$ + "</a></td></tr>"; }); } msgMarkup += "</table>"; msgMarkup += "</fieldset>"; $("#ajax_search_results").empty().append(msgMarkup); } } //end Ajax }); //end if statement } //end runSearch function } // run on keystroke $("#lia-subject").on('keyup', function () { runSearch(); }); //run on page load runSearch(); }); //end document ready })(LITHIUM.jQuery); </@liaAddScript>iftomkins8 years agoMaven366Views0likes4CommentsLIQL Query to retrive posts from all boards in a parent category
Hi, I have a community structure like this. Parent Category 1 --- Child Board 1 --- Child Board 2 Parent Category 2 -- Child Board 3 -- Child Board 4 I want to retrieve all the posts/message from boards of Parent Category 1 and also get the kudo count with the corresponding message. How can I achieve this ??Solvedvedagarw8 years agoGuide306Views0likes2CommentsUtilising blog layout for a new page
Hi, I'mtrying to piggy back off the blog page functionalityfor a new page on our community. I've created a new blog and gone ahead and created a new page style (BlogPage.new) to override the default style on that particular page. However, I'm only presented with the option to override all the entire Blog Page style rather than just be able to assign this new page style to a specific blog. Just to clarify a little, I effectively want 2 blogs existing on the community, with different titles and slightly different 'home' pages.Am I going about this in the right way? Is there a better way to do it? Is there a simple way to just point a particular blog to the page style I'd like to use? Any help would be appreciated.SolvedKev_B9 years agoAdvisor123Views0likes2CommentsInherited components in responsive skin wrapper
We use two different skins in our community, and when viewing one of the skin's wrappers I see that the Page Header/Footer and Page Hitbox Content are being inherited from the other skin. However, the Page Head Bottom Content is not being inherited from the main skin. I'm told that this is where a lot of the work is done when the dev team is working on the wrapper, so it would be great to not have to just have to update one skin. Is there any way to do that -- to inherit the Page Head Bottom Content from another skin? Is there any documentation on how this is done? Thanks!Solvedlilim9 years agoBoss278Views0likes6CommentsCustom badges assigned via REST API
Hi All. I'm looking for the best way to assign a badge to a user in community via activity performed in an external system, using the REST API. I have found some discussions that point to creating a custom role, assigning the badge to the role and assigning the role to the user via the REST API. The problem with this method is we will end up with heaps of roles, which we would like to avoid. Any other suggestions the best way to achievethis? Thanks Nicknickkouts9 years agoContributor140Views1like2CommentsDiscussion Board linked with TKB
Hi, We created a Discussion Board and linked TKB with the same Discussion board id and it is working as expected with out any issues. We hide the Discussion Board from the UI and only make TKB as visible, the problem is we are only see category name and unable to see TKB created until we unhide the Discussion Board.54Views0likes0CommentsAny documentation of this new settings: mobile_session_timeout_minutes
I've observed that the session key that my code generated with /restapi/vc/authentication/sessions/login using explicit username and password became expired after 30 mins. The community is having browser's session inactivity timeout set at 90min. Then I scanned the community level settings and found thismobile_session_timeout_minutes setting with a value of 30. This seems to match my observation. I was looking for any documentation for this settings, and trying to find the page within community admin to set that value. All I could find is thispost, inwhichseemingly misinformation is provided. Is there any documentation available for this? and explanation on the impact. We have heavy customization that utilize self-generated session key to operate. If the session key expires unexpectedly, bad things are expected to happen.110Views0likes1CommentAccess Control Issue
I have an API URL that works when pasted into a browser, but when scripted, does not. Loading the page, the browser simply doesn't render anything. Chrome's "Inspect" returns: "XMLHttpRequest cannot load ..."followed by the API URL (which we know is valid) The error message goes on after the URL with No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://web.labs.hpecorp.net:8088' is therefore not allowed access. The URL http://webs.lab ... is the calling page. Why would the call work in a browser but not when scripted?Solved180Views0likes2CommentsCross Origin Request to API
I am doing R & D, in which I need help regarding call api from another domain using JAVASCRIPT. For Example, I am calling given api for credentials, https://community-name//restapi/vc/authentication/sessions/login?user.login=APIUserName&restapi.response_format=json But in order to call this, request should be raised from same domain, means from community domain only. But I want to access it from another domainfor displaying community blog to our website. Error :XMLHttpRequest cannot load https://community-name//restapi/vc/authentication/sessions/login?user.login=APIUserName&restapi.response_format=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'abc_domain' is therefore not allowed access. Is it feasible to use api from another domains?164Views0likes1CommentHelpfulness feature for forum
Hi Everybody, I found this solved artical for the topic: http://community.lithium.com/t5/Developers-Discussion/Configuring-ratings-helpfulness/m-p/249115#M10618. As described there I inserted the following code to the forum page: <component id="ratings.widget.rating-enum-display" ratingSystemRef="conv:helpfulness"/> And configured the Lithium Admin with the following rating styles: "helpfulness": But the rating doesn´t show up at the forum pages. Has anybody an idea why? Thanks Markohousikrausi9 years agoExpert100Views0likes1Commenthow can we make use of the images from inside "AVATAR", "RANK ICONS", "BADGES", "VALUE ANALYTICS".
how can we make use of the images from inside"AVATAR", "RANK ICONS", "BADGES", "VALUE ANALYTICS". What do we get the url of those images in case we need to use it in our custom css?64Views0likes0CommentsHow can use existing Bootstrap framework into our development
I get bootstrap responsive skin option when creating a new skin, But I found that we can upload bootstrap framework into other assets and use the normal bootstrap classes to our html elements inside of components. My question is what is the purpose of Responsive peak skin? When should we go with it? We are unable to use existing bootstrap framework, which is imported from " Responsive Peak Skin" and we are imported new package through"Assets Library "->"other Assets". Please guide us the such a way to avoid adding bootstrap package.103Views2likes0CommentsHow to enable mobile and tablet skin
I came to know from blogs that the custom skins can get mobile and laptop versions, But I am unable to get this option when I created a new skin. Could you please guide me how to achieve this? From my developments , I could not able to create separate skins for each desktop, mobile and tablet and how we can add those into our development. Please suggest us the way to go further.48Views0likes0CommentsNew Notifications Rest API
The Lithium CMS alerts the user of new notifications in the header beside the bell icon. What determines notifications to be flagged as new? Is there a way to implement this using the API? In the Notification API, the response gives us back a list of objects however there is no property to indicate 'read' or 'unread'.Solvedgleung9 years agoMentor313Views0likes3CommentsHow to duplicate an existing Category or Board
More and more we are asked to duplicate a community category and/or board from the community structure, but to do this, we need to create it from start and manually duplicate all settings. So, we are looking for a way to duplicate a community structure node programmatically and create a custom endpoint to handle this. My question is, there is any way to copy or create a community category or board using the API?nicolasbajko9 years agoHelper90Views0likes1CommentConfiguring ratings / helpfulness
I'm trying to add a helpfulness rating to our forums and I have turned on the ratings in Admin and configured it to "helpfulness". I also added theelementin Studio (to page type Forum Topic Page) and edited the XML to <component id="ratings.widget.rating-enum-display" ratingSystemRef="conv:message_ratings"/>. Now still I can't see the rating in studio, can you help me? Is there an error in my syntax, is the conv:message_ratings the right one for helpfulness? Have I missed a step? Can I add the element to Forum Topic Page?SolvedNoora9 years agoAdvisor550Views0likes8CommentsUsing an API call to retrieve all users who have posted on a single thread
Hi everyone, we were looking for an optionto retrieve all users who have posted on a single thread:https://forum.vodafone.de/t5/Giga-Versprechen-Teste-gewinne/Giga-Versprechen-Teste-amp-gewinne/td-p/1302973/page/2 UnfortunatelyLithium Social Intelligence just provides a limited list of 50 users. Lithium-Support recommended to use a API call of, it is just one option. 1) Studio > API Browser > LiQL Not be accessible by non-Lithium staff:https://forum-stage.vfd2-testnet.de/t5/bizapps/page/tab/community%3Astudio%3Aapi-browser 2) API Call:Select author.id FROM messages WHERE topic.id = 1302973 3) Results { "status" : "success", "message" : "", "http_code" : 200, "data" : { "type" : "messages", "list_item_type" : "message", "size" : 0, "items" : [ ] }, "metadata" : { } } Due a commerical competition the list is very important for us. Thanks! SebastianVF_Sebastian9 years agoContributor88Views4likes0CommentsAPI to filter messages by language?
Hello, Is it possible to filter messages by language? I see a "language" field for every message returned by the Community search API, but couldn't figure out a way to filter by language in LiQL. Thanks!Solvedyangbo_zhu9 years agoContributor176Views0likes2CommentsNew OOTB component?
Hello guys, Since this is my first post I would like to introduce myself. My name is Marcus. I’m 27 years old and I work as a community manager for Vodafone (https://forum.vodafone.de/) in Leipzig/Halle (Germany). A few weeks ago I sent a support request to Lithium to get assistance for an idea. This idea is not offered by Lithium at the moment. That is why I was asked to registere here and look if there is a solution or an alternative way. My concern: We are regularly publishing content with helpful recommendations for technicial problems in our forum. They appear as threads in the suitable boards. Due to the fact that our customers use the same way to communicate it is difficult for others to find our own topics. They simply get lost. Hence we would like to promote our topics on our welcome page (see screenshot). There should be an out-of-the-box component which reads out the most recent or most viewed topics systematically. Is this idea practicable or does anyone have an alternative realisation? Kind regards, MarcusVF_Marcus9 years agoContributor98Views2likes1CommentIncreasing the number query results in a list?
Hi, Please bear with me, a lot of the Studio stuff is very new to me. Currently I'm trying to fix an issue where we're displaying a page with x amount of users who come under certain categories, our 'Good Folk' page (I'm not sure if this is common terminology). When we add more than 25 users to a certain category, the page will only ever display the first 25 in that list. We've tried adding around 30 users and consistently it only shows 25. There don't seem to be any controls attached to the Admin page where those users are added. In our components page, we have a macro call: <@renderUsers usersCSV=settings.name.get("community.good_folk_superusers", "EMPTY")/> Given my limited Freemarker knowledge, the macro itself looks pretty straightforward, it appears to be using an API call to grab the results and is then placing them into a list (I've only included what I believe to be relevant parts of the code): <#assign res = rest("2.0", "/search?q=${query?url}") /> <#if hasQueryResults(res)> <#list res.data.items as user> So, am I missing something? I can't find anything in the documentation which says this can be changed, and I'm not familiar with a way to override the calls to specify a certain number of items. I'm learning by doing at the moment, so any help gladly appreciated!SolvedKev_B9 years agoAdvisor192Views0likes3CommentsDownloading data from Lithium (DWH) / picking increments and other troubles
We are not able to download the last changed USERS, there is simply now API for downloading “last changed users between day and day-1*”. There is not field for it and API does not support it. Also we would like to download last changed users even if it was triggered by internal job, by another user or system. Simply last change even if change was not made by user. (it is not possible filter user according last_login_time for now, but this maybe not be sufficient)* - day is just example, it could be for the last minute(s), hour(s).. Is it possible to increase limit for fetching records from 25 to something awesome whopping? The biggest problem I see for now and for the future is relation between collections M:N, for an example - a user can has more roles and a role can be assigned to more users. In the database it is usually done via mapping table storing the relations between roles and users (or other M:N entities). There is no way how we can download these mapping tables. We can “guess/recreate it” by download users collection, than role collection and then for every(!) user get his roles. This is only one way how can it be done now and this will be incredible slowly. I am almost afraid that we will not be able to download it. (about 12 queries for very user with possible download only 25 rows during call) I have strong feeling that we use OLTP API for DWH and that is reason why there are many problems – does Lithium have any other interface suitable to download ALL THE DATA? Thank you in advice Vaclavralemret9 years agoContributor56Views0likes0CommentsHave default blog entry point as a label
I would like for a specific blog to apply a label as default when accessed, onceaccessed the user can change or remove the label as they wish via our options. It would be useful to have this as an option within the "Community Structure" when you edit the specific blog it could ask to apply labels as a default entry. Hope to have some help with this.e727479 years agoAdept96Views0likes1CommentAnybody have success integrating with Okta for SSO across multiple subsystems?
Hi folks, We're looking to integrate Lithium with a few other systems using single sign-on. We'd like users to registerwith Lithium, and thenautomatically have access to the related systems via the SSO provider. All systems support SAML 2.0 for authentication. We're considering Okta and a few other cloud-based identity services, plus self-hosted solutions via Windows or Gluu. Has anybody successfully implemented something similar, especially with Okta? More generally, how do you handle the registration flow so that users create their account once and be able to access everything? How do usersmanage their info in that SSO directory (email, password change/reset, name changes, etc.)? Thanks and take care, MiroslavSolvedmiroslav9 years agoHelper330Views0likes4CommentsRandom number generator
Hi, FreeMarker doesn't have a random number generator for some reason so has anyone created one before? I want to display random posts depending on topic so I can create a more dynamic page. For instance, I want to pull all posts labelled 'Test' and display 3 of these at random. Idon't think I can do this via JS because I have to call the total number of posts with that label and then generate 3 random numbers within that range, then display those specific posts. As far as my admittedly limited experience with JS goes, because all of this happens server side the JS can't run at the correct point in this sequence. I found this random number generator:http://freestyle-developments.co.uk/blog/?p=327 which does work but only to a point, in that it's not entirely random, if you use a range of 1 to 10 and run it 10 times, almost half return 1 so I don't think it's accurate at all. Even if you put in a range of 1 to 25000 you still get 1 almost every other time. All I want is something similar to JS Math.random(min, max) but can't find a simple way of doing this at all. Can anyone help? ThanksSolved241Views0likes5CommentsHelp with Endpoint - escaping errors in description field
I've got an endpoint that is being consumed by our parent domain to power portlets on AEM. Recently, errors started popping up surrounding the description field. The errors are cryptic so I've been modifying usernames and posts which seemed to fix that error only for one more to popup. I do not have any developer support from my agency nor do I have funds to engage Lithium professional services. Has anyone run into issues with content causing errors in your endpoints? If so how did you solve the issue? Any help would be appreciated. Below is the custom endpoint created to power a portlet with blog and forum content. Thank you Jason http://community.brocade.com/dtscp75322/plugins/custom/brocade/dtscp75322/forums_blogs_desc_for_search <#include "test_macro.ftl" /> <?xml version="1.0" encoding="utf-8"?> <channel> <#assign posttime= http.request.parameters.name.get("posttime","1388563200000")?js_string/> <#assign limit= http.request.parameters.name.get("limit","5000")?js_string/> <#assign x = rest("2.0","/search?q=" + "SELECT * FROM messages WHERE depth = 0 AND conversation.style in ('forum', 'blog') and post_time > ${posttime} LIMIT ${limit} OFFSET 0"?url) /> <#list x.data.items as message> <item> <title>${message.subject?xml}</title> <link>${baseUrl}${message.view_href}</link> <pubDate>${message.post_time?date}</pubDate> <last_reply_time>${message.conversation.last_post_time?date}</last_reply_time> <last_edit_time>${message.current_revision.last_edit_time?date}</last_edit_time> <type>${message.conversation.style}</type> <author>${message.author.login}</author> <labels> <#assign pre_lbl = restadmin("/messages/id/${message.id}/labels/").labels> <#list pre_lbl.label as lbl> "${lbl.text?xml}" </#list> </labels> <tags> <#assign pre_tags = restadmin("/messages/id/${message.id}/tagging/tags/all").tags> <#list pre_tags.tag as tags> "${tags.text?xml}" </#list> </tags> <views> <#assign viewcount = restadmin("/messages/id/${message.id}/views/count").value> "${viewcount}" </views> <kudos> <#assign kudoscount = restadmin("/messages/id/${message.id}/kudos/count").value> "${kudoscount}" </kudos> <#assign blurb = utils.html.stripper.from.gdata.strip(message.teaser)> <description><#if blurb?has_content> ${blurb?xml} <#else> <#assign body = utils.html.stripper.from.gdata.strip(message.body)> <#if body?length gt 250> ${body?substring(0, 250)?xml}... <#else>${body?xml}</#if> </#if> </description> </item> </#list> </channel>jasondmcclellan9 years agoAdvisor87Views0likes0CommentsCode redemption aka user self-help role adding
Thought I shared this before, but I couldn't find an older post, so here goes. Got tired of staff emailing, asking to be given access, forgetting or giving the wrong username. So I put this together. The user gets a code from us, visits this custom community page, enters their code and is given a specific role. The code they used is then rendered inactive. I generated two sets of random codes and stuck them in two separate forum posts in a hidden area. (You could also ask Lithium to create a custom database field and read that.) One forum post per type of code you want to check. With this script we can give a user one of two kinds of codes give moderator and staff access give just staff access And let me tell you, this has saved us soooo much time and frustration. Just stick this on a custom page and you're basically good to go. <#assign staffPostId = 12345/> <#-- Unique ID of the post that contains all the generated codes for Staff access--> <#assign ModPostId = 67891/> <#-- Unique ID of the post that contains all the generated codes for Moderator access--> <#assign codeFoundStaff = false/> <#assign codeFoundMod = false/> <#if !user.anonymous> <#assign code = http.request.parameters.name.get("code", "")?string /> <#if code == ""> <div class="lia-inline-ajax-feedback"> <div class="AjaxFeedback" id="feedback"></div> </div> <div class="lia-form-fieldset-wrapper" id="fieldset"> <fieldset class=""> <legend>Community Code Redemption</legend> <div class="lia-quilt-row lia-quilt-row-standard lia-input-edit-form-row"> <div class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-input-edit-form-column"> <div class="lia-quilt-column-alley lia-quilt-column-alley-single"> <div class="lia-form-row lia-form-in-code-entry"> <div class="lia-quilt-row lia-quilt-row-standard"> <div class="lia-quilt-column lia-quilt-column-06 lia-quilt-column-left"> <div class="lia-quilt-column-alley lia-quilt-column-alley-left"> <div class="lia-form-label-wrapper"><label for="lia-inCode" class="lia-form-label">Code</label></div> </div> </div> <div class="lia-quilt-column lia-quilt-column-18 lia-quilt-column-right"> <div class="lia-quilt-column-alley lia-quilt-column-alley-right"> <div class="lia-quilt-row lia-quilt-row-standard"> <div class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-single"> <div class="lia-quilt-column-alley lia-quilt-column-alley-single"> <div class="lia-form-input-wrapper"> <input class="lia-form-type-text" id="lia-inCode" name="inCode" placeholder="Enter your secret code and await redemption"> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="lia-quilt-row lia-quilt-row-standard lia-form-buttons-empty-left-column"> <div class="lia-quilt-column lia-quilt-column-06 lia-quilt-column-left"> <div class="lia-quilt-column-alley lia-quilt-column-alley-left"> </div> </div> <div class="lia-quilt-column lia-quilt-column-18 lia-quilt-column-right"> <div class="lia-quilt-column-alley lia-quilt-column-alley-right"> <div class="lia-form-submit lia-button-group active"> <span class="lia-button-wrapper lia-button-wrapper-primary lia-button-wrapper-Submit-action"><input title="" class="lia-button lia-button-primary lia-button-Submit-action" value="Submit" id="submitCode" name="submitContext" type="submit"></span> </div> </div> </div> </div> <div class="lia-quilt-row lia-quilt-row-standard lia-input-edit-form-row lia-quilt-row-embed hidden"> <div class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-input-edit-form-column"> <div class="lia-quilt-column-alley lia-quilt-column-alley-single"> <div class="lia-form-row lia-form-embed"> <div class="lia-quilt-row lia-quilt-row-standard"> <div class="lia-quilt-column lia-quilt-column-06 lia-quilt-column-left"> <div class="lia-quilt-column-alley lia-quilt-column-alley-left"> <div class="lia-form-label-wrapper"><label for="lia-embed" class="lia-form-label" id="lbl-entityTitle"></label></div> </div> </div> <div class="lia-quilt-column lia-quilt-column-18 lia-quilt-column-right"> <div class="lia-quilt-column-alley lia-quilt-column-alley-right"> <div class="lia-quilt-row lia-quilt-row-standard"> <div class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-single"> <div class="lia-quilt-column-alley lia-quilt-column-alley-single"> <div class="lia-form-input-wrapper" id="embed"> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </fieldset> </div> <style type="text/css"> .lia-quilt-row-available { margin-top:20px; padding-top:20px; border-top:2px solid #efefef; } textarea#lia-missingCountries, textarea#lia-availableCountries{ resize:none; height:100px; } </style> <@liaAddScript> $("#submitCode").on("click", function() { var userCode = $("#lia-inCode").val(); var userCode = userCode.replace(" ",""); if( userCode != "") { window.open('//' + location.host + location.pathname + '?code=' + userCode,'_self'); } }); </@liaAddScript> <#else> <#assign codesStaff = restadmin("/messages/id/${staffPostId}/body").value?replace("<p>","","i")?replace("</p>","","i")/> <#list codesStaff?split(",") as c> <#if c?string == code?string> <#assign codeFoundStaff = true/> <#assign roles = restadmin("/roles").roles.role /> <#list roles as role> <#if role.name == "Staff"> <#assign hrefRoleStaff = role.@href /> </#if> </#list> <#assign result = restadmin("${hrefRoleStaff}/users/add?role.user=id/${user.id}") /> <#if result.error?has_content> 'Twas not meant to be. Please contact <a href="mailto:community@abccompany.com">community@abccompany.com</a>. <#-- Put any message you want the user to see if their code fails --> <#else> <#assign codesStaffNew = codesStaff?replace("${c},","")?replace(",${c}","")?replace("${c}","")/> <#assign result = restadmin("/messages/id/${staffPostId}/edit?message.body=${codesStaffNew}")/> You were deemed worthy and shall forever be identified as Staff! </#if> <#break> </#if> </#list> <#if codeFoundStaff == false> <#assign codesMod = restadmin("/messages/id/${ModPostId}/body").value?replace("<p>","","i")?replace("</p>","","i")/> <#list codesMod?split(",") as c> <#if c?string == code?string> <#assign codeFoundMod = true/> <#assign roles = restadmin("/roles").roles.role /> <#list roles as role> <#if role.name == "Moderator"> <#assign hrefRoleMod = role.@href /> </#if> <#if role.name == "Staff"> <#assign hrefRoleStaff = role.@href /> </#if> </#list> <#assign result = restadmin("${hrefRoleMod}/users/add?role.user=id/${user.id}") /> <#assign result2 = restadmin("${hrefRoleStaff}/users/add?role.user=id/${user.id}") /> <#if result.error?has_content || result2.error?has_content> Alas, only the penitent will pass; we could not oblige your request. Please contact <a href="mailto:community@abccompany.com">community@abccompany.com</a>. <#-- Put any message you want the user to see if their code fails --> <#else> <#assign codesModNew = codesMod?replace("${c},","")?replace(",${c}","")?replace("${c}","")/> <#assign result = restadmin("/messages/id/${ModPostId}/edit?message.body=${codesModNew}")/> You were deemed worthy and shall forever be identified as Staff and Master of Moderation. </#if> <#break> </#if> </#list> </#if> <#if codeFoundStaff == false && codeFoundMod == false> Unfortunately that code didn't work. Please <span class="back">retrace your steps</span> and try again, or contact <a href="mailto:community@abccompany.com">community@abccompany.com</a>. <#-- Put any message you want the user to see if their code fails --> <@liaAddScript> $(document).ready( function() { $(".back").click( function() { window.open('//' + location.host + location.pathname,'_self'); }); }); </@liaAddScript> </#if> </#if> <#else> We don't know who you are, stranger. Please <a href="${webUi.getUserLoginPageUrl("")}">stay a while</a> and listen, or <a href="${webUi.getUserRegistrationPageUrl("")}">submit your name in the registry</a>. </#if>150Views3likes2CommentsUploading Image using REST: apiuser permissions issue
Hello! I'm trying to upload a photo to the default album of a user via REST v1 by using an API user. The API user has every permission that I have access to in the Admin console. We are using session key authentication to make the calls. The REST endpoint that we are calling is: users/login/{{username}}/media/albums/default/public/images/upload This call is successful when passing in the API user's login to the call. However, when I pass in any other login, I get the following response error: { "response": { "status": "error", "value": null, "error": { "code": "303", "message": "User 59 does not have the following permission(s) at [OUR COMMUNITY]: [ ]" }, "image": null, "ratings_histogram": null } } What permissions am I missing? Thanks for your help!156Views0likes2CommentsDynamically loading profile picture, name and title into custom component
Hi, I have a people carousel containing the profile photo (user avatar), first/last name and Title of staff members where I want to dynamically load the staff members’ details (avatar, name, title) from their profile. How is it possible to reference these dynamically in my html? <!-- people Item --> <div class=" people-item"> <a href="/t5/user/viewprofilepage/user-id/53"> <div class="people-icon"> <img src="dynamically-load-user-avatar-here"/> </div> <div class=" people-title"> dynamically-load-user-name-here </div> <div class=" people-descr"> dynamically-load-user-role-title-here </div> </a> </div> <!-- End people Item -->109Views0likes1CommentEditing image dimensions within a component
Firstly, I apologise if this is a very basic question, I'm quite new to Studio! I'm trying to fix an image resolution issue that has sprouted up on our community's blog. For some reason, the image files that are being pulled into the blog list are being resized to 200 x 200 (despite being uploaded at 500 x 300), the container for the image is wider,therefore these images are then enlarged and become pixelated. Example of the URL is community.com/image/image-id/dimensions/200x200. Looking at the layout ofthe components, we're using a Custom Component for the blog list, which in turn is using Freemarker to include 2 .ftl files, common_utils.ftl and blog_list_utils.ftl - my question is, where can I find the files that the component is referencing? I believe they will point where I can reconfigure the image dimensions being applied when the image is pulled from the server. I'm 99.9% certain this is a CMS function rather than something in the CSS, due to the URL. Secondary question, if the 2 utils files don't contain a way to resize, then is it possible that a core component is setting these dimensions? If so, how can I go about editing, or even creating a new component to specifically overwrite the image dimension settings. Any help appreciated:smileyhappy: I'm quite au fait with HTML / CSS but Studio and CMS systems in general are quite new, so go easy on me!SolvedKev_B9 years agoAdvisor142Views0likes2CommentsForgot Password / Change Username: Display success message
Hello all! Hope you are well Your help would be greatly appreciated! I am trying to display a success message on to different pages: - Forgot password/username: Error messages are displayed under the fieldbut if the email is valid, the user is redirected to the homepage. Is it possible to display a success message instead? - My profile / change username Same thing is happening here, error messages are displayed but I couldn't display the success message. I checked the text properties and it seems to be correct (page.user_profile.change_login.success = Your username has been changed.) Thank you very much!Mattpx9 years agoGuide112Views0likes1CommentUpdating user profile language through REST API v1 now broken
Hi, we have been using this bit of code to change the language setting for a user: <#assign update_lang_setting = rest("/users/self/profiles/name/language/set?value=${language}") /> This has worked well up until version 16.5 but now it seems to be broken or at least not working reliably enough (it's used in the page initialization script so it's hard to see what goes wrong). So has something changed in 16.6 or in 16.7 which could cause this? Cheers, .Mmiikka9 years agoMaven304Views0likes9CommentsAccessing messages.message.labels.label
I'm trying to access the label text for recent topics, and I can't for the life of me figure this out. <#macro tabbed title tab call sort_by="" count=10 checked=false> <#if sort_by??> <#assign messages = rest("${call}?page_size=${count}&sort_by=${sort_by}").messages /> <#else> <#assign messages = rest("${call}?page_size=${count}").messages /> </#if> <#list messages.message as message> <#assign views = message.views.count /> <#assign kudos = message.kudos.count /> <#assign replies = 0 /> <li> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tbody> <tr> <td width="80%" rowspan="2"><div>${message.subject}</div></td> <td width="10%">Views</td> <td width="10%" class="cc-tab-item-count">${views}</td> </tr> <tr> <td width="80%" rowspan="2"><div>${message.labels.label}</div></td> <td width="10%">Kudos</td> <td width="10%" class="cc-tab-item-count">${kudos}</td> </tr> <tr> <td width="10%">Replies</td> <td width="10%" class="cc-tab-item-count">${replies}</td> </tr> </tbody> </table> </li> </#list> </#macro> Everything is working but the labels. I have tried the following, thinking it was in a list, but I'm still not getting anything. <#assign messages = rest("/topics/recent?page_size=1").messages /> <#list messages.message as message> <#list message.labels as label> ${label.text} </#list> </#list> Is there something that I'm missing? I can access message.views.count and message.kudos.count, but that's it...Solvedbnlucas9 years agoAdept128Views0likes2CommentsLink to reply in (email notification
Hi there, both in an email-notification and in notifications which one can see in the community in the user's profil there is a link whichleads me to the thread which has been answered. But as far as I can see it links not to the specific reply which is mentioned in the notification, just to the general thread. My question is, is it possible to set up the notification in that way, that it links directly to the reply? Thx for any help ChristophSolvedCKummer9 years agoAdvisor205Views0likes4Comments