ContributionsMost RecentMost LikesSolutionsCreate URL for Private Message to Multiple Recipients Hi I can use this URLhttps://community.khoros.com/t5/notes/composepage/note-to-user-id/106204 to open a private message page with one recipient already selected. Is there a way out of the box to do this for multiple recipients using a list of user ids (or any identifier username is fine as well)? Also, would it be possible to have the broadcast message checkbox already checked as well? Lastly, is there a list somewhere of URL parameters that can be used with this URL? Thanks! Re: permissions for the user biography based on user roles I don't think this is possible out of the box but would be a fairly simple customization. Do you want to hide the biography showing on the profile page or just hide the field in settings? Or both? On the profile page You can create an "Override Component" that wraps the biography component with some logic to check for a role and not display the component for normal users.Override core components (khoros.com) The biography component shown on the profile page is namedusers.widget.about-me so in stage you would go to studio>components and create a new component namedusers.widget.about-me@override Let's say your normal users have a Role named "Normal". The following code would prevent the component from displaying for those normal users. (this is untested) <#assign normalUser = false> <#--Get logged in user's roles and check for "Normal" role--> <#assign userRoles = (restBuilder().admin(true).liql("SELECT name FROM roles WHERE users.id = '${user.id?c}' LIMIT 100").data.items)![]/> <#list userRoles as role> <#if (role.name == "Normal")> <#assign normalUser = true /> </#if> </#list> <#if (!normalUser)> <@delegate/> </#if> Hide the field in settings This is a little different. The Biography field under my settings is one part of a larger component so I think I would just hide it with CSS using the same role check above. So first create new custom component in studio named whatever you want with the code below. <#assign normalUser = false> <#--Get logged in user's roles and check for "Normal" role--> <#assign userRoles = (restBuilder().admin(true).liql("SELECT name FROM roles WHERE users.id = '${user.id?c}' LIMIT 100").data.items)![]/> <#list userRoles as role> <#if (role.name == "Normal")> <#assign normalUser = true /> </#if> </#list> <#if (normalUser)> <style> .lia-form-row.lia-form-profile-biography-entry { display: none; } </style> </#if> Then go to the Page tab in studio and select theMy Profile Page (not to be confused with the View Profile Page). Add your new component anywhere on that page. Hope that makes sense. Re: Add anonymous functionality to creating posts or comments Hiromanychweb I recently attempted something like this. Different use case but I wanted to add some fields to the post page and "redirect" the post page contents asluksuggested. This does require creating a post with the API and comes with all kinds of problems with things like attachments and videos for example. I would go as far as saying this is not possible without Khoros professional services. Re: Any way to store an incoming JSON in the liql database? I'm not sure how you intend to use this, but here's one idea. Support will add custom fields to different collections for you. So, you could ask them to add a custom field to the "messages" collection and store your JSON there more cleanly than in a message body. You could use thisCreate message (khoros.com)to post a message to the board you want with the JSON stored in a separate field on the message. Your body would look like this { "data": { "type": "message", "board": { "id": "myhiddenboard" }, "subject": "JSON Post 6/5/2024", "body": "Todays JSON post!", "c_my_custom_json_field": "json_goes_here" } } Re: Requesting feedback on our Dev Lab! allensmith81That's a fantastic list!BlakeHyou should definitely follow that. As someone who has put in a lot of hours customizing community classic but does not have any developer experience beyond that, I would love to see a walkthrough beginning to end of setting up the SDK with GitHub, creating and publishing a simple component (widget now I think?). This could be something extremely simple (like... <p>Hello World</p>) just to demonstrate the workflow. Re: Trouble with http.client.response And here is one possible use for the endpoint above (after adding the option to pass it a language selection)😃 Re: Trouble with http.client.response Thanks! I finally got it working. I surrounded the whole thing with <#noautoesc> </#noautoesc> I added .json() to myhttp.client.request I was still getting an error because it said it was expecting a string, but it was a sequence instead. I think it didn't like that Microsoft's entire response was an array wrapped in [square brackets] instead of {curly braces}. So, I had to do this <#assign output = utils.json.toJson({"output":response.content})/> Finally, it worked! The escaping is gone, and the weird double quotes are gone. I'm finally getting usable Json. My final code. <#noautoesc> <#assign body = http.request.body /> <#-- <#assign body = "[{'Text':'<p class=\"testing\">Hello, what is your name?</p>'}]" /> --> <#assign response = http.client.request("https", "api.cognitive.microsofttranslator.com", "/translate?api-version=3.0&to=es&textType=html") .header("Ocp-Apim-Subscription-Key", "My Key Here") .header("Ocp-Apim-Subscription-Region", "eastus") .header("Content-Type", "application/json") .body(body, "application/json") .json() .post() /> <#if response.hasError> ${response.error.message} <#else> <#assign output = utils.json.toJson({"output":response.content})/> ${output} </#if> </#noautoesc> Re: Trouble with http.client.response I found this postDecoding a value using freemarker in a component o... - Atlas (khoros.com)with a similar issue and updated my code with this to replace the quotes. ${response.content?replace('"','"')} I'm not crazy about that fix and I'm also questioning if it's even necessary. I found a bigger problem in the process. It was something different causing the error in the console. An extra quote seen below is breaking the Json and causing the error. Here it is from postman and after adding the "replace" code above which just makes it easier to see. So, I'm very confused about what is happening here. Anyone know what I'm missing? Thanks! Trouble with http.client.response I'm making the following http.client.request call in an endpoint. <#assign response = http.client.request("https", "api.cognitive.microsofttranslator.com", "/translate?api-version=3.0&to=es&textType=html") .header("Ocp-Apim-Subscription-Key", "MyKeyGoesHere") .header("Ocp-Apim-Subscription-Region", "eastus") .header("Content-Type", "application/json") .body("[{'Text':'<p class=\"some-class-ak\">Hello, what is your name?</p>'}]", "application/json") .post() /> <#if response.hasError> ${response.error.message} <#else> ${response.content} </#if> Testing in postman I got this response. [ { "detectedLanguage": { "language": "en", "score": 1.0 }, "translations": [ { "text": "<p class=\"some-class-ak\">Hola, ¿cómo te llamas?</p>", "to": "es" } ] } ] However, from the endpoint I see this with the quotes encoded and an error in the console. I'll copy both below the image. [{"detectedLanguage":{"language":"en","score":1.0},"translations":[{"text":"<p class="\"some-class-ak\">Hola, ¿cómo te llamas?</p>","to":"es"}]}] json_document.js:1 SyntaxError: Expected property name or '}' in JSON at position 7 (line 2 column 7) at JSON.parse (<anonymous>) I've done similar things before and received recognizable JSON, so I'm not sure what I'm doing wrong. I have the endpoint set to apllication/json Any help would be appreciated. Thanks! SolvedRe: Developer Documentation Missing Oh yeah missing for me as well. Thanks for the link I lean pretty heavily on that. Although I have a lot of it bookmarked.