Lab / Idea / Unconference Meetup?
I have a couple things on my community backlog that probably require some level of customization - I tend to be looking for stuff in Atlas that already has some traction or headway AND I see lots of "under consideration" ideas AND I see lots of "Did anybody make an XYZ widget in their community..." questions BUT what I haven't yet found (beyond this forum itself) is an available time and place for Devs to get together on their own and either attack a specific common problem OR talk together through a top of mind issue. It could be anything from a KhorosLed affair or even just an Unconference we put on ourselves. Would be REALLY great if there was a vanilla lab stood up to do actual live-action work that participants could then try to leverage in their own environments later. Am I just not finding this yet? Do we need to bootstrap something? BlakeH - has this come up before?3.1KViews
Sign in to react to this post26Comments
Remove highlight class from messages.search_snippet
Hello all, We have a custom homepage component built that is showing a few latest threads from our Announcement board. Simple stuff. The problem is that the 'search_snippet' is highlighting the text if it's the same as the search query. In our case, the Announcement board is called 'news' and if it finds a word 'news' inside the 'search_snippet', it will be highlighted with the 'lia-search-match-lithium' class. For now, I'm considering removing it manually with the $('.lia-search-match-lithium').removeClass(); As far as I saw, the 'search_snippet' will always return highlighted text. Is there any way around this? Thank you!Solved2.6KViews
Sign in to react to this post2Comments
- MattV5 years agoKhoros Staff
The "search_snippet" is doing exactly what it is intended to do. So usually don't recommend using that field for that reason (unless to display search results).
Otherwise... options include:
- Use messages.body instead; then trim HTML with utils.owasp freemarker context object, then trim to X number of characters.
- Taking the HTML of messages.search_snippet and doing a ?replace("lia-search-match-lithium","") on the string
Sign in to react to this post
Set the visitor UI language automatically
Background: Our instance supports 8 different languages for the user interface. Our CDN/Reverse Proxy detects a user's location and can set a user's language based on that. It will, at a minimum, set a cookie. In the past, in the page.init, we would detect if the cookie language was different than the session language and and return a redirect while adding the "?profile.language=xx" parameter. Unfortunately, this caused significant delays for users in China because of the extra round trip. Currently our CDN/reverse proxy rewrites all URLs as they pass through, adding the profile.language parameter to *every* page load. This causes some odd side-effects, especially in the admin panel. It's also very challenging to debug when something is off. Does anyone know the recommended approach to making sure that a user (including anonymous users) gets the Khoros page UI in their translated language? Our CDN/reverse proxy does place a cookie that we can read or it could deliver a special header. I imagine we could read this in page.init, but I don't see anywhere in the docs where we can tell the session to switch languages. This all gives hints: This seems to give some suggestion: https://developer.khoros.com/khoroscommunitydevdocs/reference/requestlang Which leans to info about page.init. Which I think leads me to the http.session: https://developer.khoros.com/khoroscommunitydevdocs/reference/httpsession-1 But, what's the attribute that needs setting? Is it "lang"? If anyone has a list of session attributes, that could be helpful. Other related threads I have read: https://community.khoros.com/t5/Khoros-Community-Product/How-can-users-be-directed-to-a-localized-community-based-on/m-p/564967 https://community.khoros.com/t5/Khoros-Community-Product/Launching-a-new-language-language-functionality/m-p/610975 Thanks! Mark1.8KViews
Sign in to react to this post12Comments
Built a service/status tracker status based on tags
Hello, I am creating a component that only shows based on the tags given to the message. The tags are hidden for non admins by the way. Using Freemarker I have no luck yet in getting/reading the tags or taglist from the current thread. Please help, half answers are also very welcome 🙂 Does anyone have a code snippet that shows how to 'get' the tags of the thread?Solved1.6KViews
Sign in to react to this post3Comments
- Hoekstra_VFZ4 years agoAdvisor
Allright: Full component here:
<#import "theme-lib.common-functions.ftl" as commonUtils /> <#assign threadId = page.context.thread.topicMessage.uniqueId /> <#assign query = "SELECT text FROM tags WHERE messages.id = '${threadId}'" /> <#assign tagData = commonUtils.executeLiQLQuery(query) /> <#if tagData?size gt 0> <#assign issueTag = false /> <#assign onderzoekTag = false /> <#assign oorzaakbekendTag = false /> <#assign opgelostTag = false /> <#assign softwareupdateTag = false /> <#assign websiteTag = false /> <#list tagData as list> <#-- <h1>${list.text}</h1> --> <#if list.text == 'issue' || list.text == 'Issue'> <#assign issueTag = true /> </#if> <#if list.text == 'onderzoek' || list.text == 'Onderzoek'> <#assign onderzoekTag = true /> </#if> <#if list.text == 'oorzaak bekend' || list.text == 'Oorzaak Bekend'> <#assign oorzaakbekendTag = true /> </#if> <#if list.text == 'opgelost' || list.text == 'Opgelost'> <#assign opgelostTag = true /> </#if> <#if list.text == 'software update' || list.text == 'Software Update'> <#assign softwareupdateTag = true /> </#if> <#if list.text == 'website' || list.text == 'Website'> <#assign websiteTag = true /> </#if> </#list> <#if issueTag == true > <#assign statusTitle = 'In onderzoek' /> <#assign statusBody = 'Moderators verzamelen jullie voorbeelden een gaan dit bundelen naar de technische dienst.' /> <#assign statusButton = ['Geef jouw voorbeeld hier door','https://community.ziggo.nl'] /> </#if> <#if issueTag == true && onderzoekTag == true > <#assign statusTitle = 'In onderzoek' /> <#assign statusBody = 'De technische dienst is op de hoogte gesteld. Zij zoeken nu naar de oorzaak.' /> <#assign statusButton = ['Lees hoe je kan helpen','https://community.ziggo.nl'] /> </#if> <#if issueTag == true && oorzaakbekendTag == true > <#assign statusTitle = 'Issue bekend' /> <#assign statusBody = 'De technische dienst heeft de oorzaak gevonden. Er wordt aan een oplossing gewerkt.' /> <#assign statusButton = ['',''] /> </#if> <#if issueTag == true && softwareupdateTag == true > <#assign statusBody = statusBody+' Een volgende softwareupdate bevat de fix.' /> <#assign statusButton = ['Update je software','https://community.ziggo.nl'] /> </#if> <#if issueTag == true && websiteTag == true > <#assign statusBody = statusBody+' Volg onze storingschecker voor updates.' /> <#assign statusButton = ['Naar de storingschecker','https://community.ziggo.nl'] /> </#if> <#if statusTitle?? && statusBody??> <div class="">${statusTitle}</div> <div class=""><p>${statusBody}</p></div> <#if statusButton[0] != '' && statusButton[1] != '' > <a class="lia-button lia-button-secondary lia-link-ticket-post-action" href="${statusButton[1]}">${statusButton[0]}</a> </#if> </#if> </#if>Sign in to react to this post
How to get only Messages where some specific custom field have value?
Hi Team, I have a custom field added by Khoros in the messages object, I want to get only Messages where that specific custom field has value. Sample query: select c_abcd from messages where c_abcd!="" I don't want to get all messages and then in the loop filter the messages which don't have any value. Is there any direct API or solution to get the messages where the c_abcd custom field has some value? Any related replies would be appreciated. Regards Aman1.3KViews
Sign in to react to this post11Comments
We like the 'Since you were gone' feature here on Atlas - We recreated it and shared the component
We really like the 'Since you were gone' feature here on Atlas. We want to implement this on our Communities. We asked support if this is a component that is available in Studio, it is not. The 'Since you were gone' feature is a custom made component just for Atlas. We would love Khoros to share the content of this component so we can fast-track our development of such a component. We feel the entire community here might benefit from sharing this with all of us 🙂Solved1.2KViews
Sign in to react to this post8Comments
Hoekstra_VFZ we deployed this functionality in our community, as shown in the screenshot below.
You can find my code for the component and the associated macro library below to give you a starting point.
- Component: custom.homePage.hero.profileNotifications.ftl
- Macro Library: custom.macro.common.notifications.ftl
Feel free to send me a DM if you have any questions.
rsa_homePage_notifications.png
Sign in to react to this post
Where do I store a large amount of data, for reference?
Hi folks, planning a custom component which will basically check the user's id against a pre-existing list. I imagine this list could grow into the thousands. What are my options for storing this data/list? One option I use for smaller datasets is a hidden post and simply store it as a comma separated string. Another option might be to store a string in a custom metadata field, I guess? Any ideas how large that could be? (I don't have access to a separate server.)1.1KViews
Sign in to react to this post5Comments
Trying to use occasion_data.status
I have a simple liql query where I'm pulling in all upcoming and ongoing (in progress) events. According to this doc there should be an object for occasion_data.status in the results. It's working within my query "WHERE occasion_data.status IN ('upcoming','ongoing')" but I get a null value if I try to use it in my FreeMarker template (e.g., <#assign eventStatus = listItems.occasion_data.status/>) Anyone know why? Did they miss adding this? Am I reading the doc wrong? Is my code incorrect somewhere?1.1KViews
Sign in to react to this post13Comments
API call to post message has blank response
Hi folks. Been using this in an endpoint for many years, but now it returns a blank response, so I can't read if it was successful. <#assign result_post = restadmin("/boards/id/${board_id}/messages/post?message.subject=${msg_subject?url}&message.body=${msg_body?url}")/> If, however, I do a simple $.post('/restapi/vc/boards/id/${board_id}/messages/post?message.subject=subject&message.body=body') then I get a perfectly normal response. Did something change with the v1 API?1.1KViews
Sign in to react to this post6Comments