Help with scraping OOTB component
Trying to scrape recommendations component using : <#assign markup> <@delegate /> </#assign> ${markup} <#-- LOGIC --> <#assign ids = [] /> <#assign idmatches = markup?matches("-p\\/(\\d+)") /> <#list idmatches as id> <#-- only add an id once --> <#-- the ?groups build-in contains a sequence with [0] = the whole match and [0+groupn] items with their match, in this case the <topicid> --> <#if !ids?seq_contains(id?groups[1])> <#assign ids = ids + [id?groups[1]]/> </#if> </#list> <#-- DISPLAY --> <#if markup?contains("Recommendations")> <span>RC</span> <#list ids as id> <#assign convo = rest("2.0", "/search?q=" + "select subject,board,replies.count(*) from messages where id='${id}'"?url).data.items[0]/> ${convo.subject} ${convo.board.id} ${convo.replies.count} </#list> </#if> Which works but I want to omit the need for "${markup}" without which I'm unable to get the HTML on DOM in order to get the data (the topic ids basically)shrugupt6 years agoAdept173Views0likes4CommentsChange how Khoros loads CSS
Hello. We recently made a DNS change and it is affecting the way our community is loading our css. We changed our community homepage to be located at "custom.website.com/community" as such the css is not loading because it's looking for it at "custom.website.com/skins" when it does not reside there, it resides at "khoros.community.com/skins" I was wondering two things. 1. Is it possible to tell our community to load the css explicitly from another domain? Even though users come into "custom.website.com/community" we can send the request to "khoros.community.com" that way the css is loaded from "khoros.community.com/skins" instead 2. Is it possible to modify the route for the css request? This way we can send the request to "custom.website.com/community/skins" instead of "khoros.community.com/skins". This also requires us to put all the css into "/skins/community". Is that possible as well?Solvedcsolis2146 years agoGuide153Views2likes1CommentPost Page to have dropdown to filter category
We want to create a Post a topic button which will be present on all the pages across the community. When a user navigates to Post page from any page other than board page, we now show a dropdown which lets user select which board the topic should be posted into using following custom URL /t5/forums/postpage/choose-node/ Can we also let user first select category and then identify board under the selected category? basically showing 2 dropdowns, one for category & one for the board. Any pointers are appreciated.sunny_mody6 years agoAdvisor93Views0likes1CommentMasonry Message List - Number of columns
Hello, I'm trying to use the standard Masonry Message Listcomponent, which by default comes with 4 columns. I dida search and didn't found information on how to change to 3 columns. As you can see in the example below: src:https://community.giffgaff.com/t5/Photography/bd-p/photo I appreciate your help Thank you, LeandroSolved556Views1like8Commentsattempting to pull all message content in threads
I need to conduct a sentimental analysis on our developer community forum.I need an endpoint that will return the body of all the messages from a single post. After thoroughly reading the lithium API documentation and experimenting with various endpoints, I haven’t found anything that does this. The best I can get is an endpoint that prints all messages in a scattered format. API endpoint: https://community.developer.[insert_domain].net/api/2.0/search?q=SELECT+subject, body, post_time+FROM+messages+ORDER+BY+post_time+desc To avoid storing thousands of messages locally and ordering them myself, I was wondering if there is anything I missed that prints all the messages in order of thread.Solvedallina112246 years agoContributor150Views0likes2CommentsProblems with Freemarker - utils.digest.hmac Hmac SHA256 and base 64 encoding?
Hi@GavinD@ChhamaJ@YuriKDougS We are trying to use http.client to access a 3rd party system. The API requires us to hash (using HMAC SHA 256) a challenge string with our secret key to gain an access token. 1. <#assign signature = utils.digest.hmac("HmacSHA256", "12345678901234567890", "the quick brown fox jumps over the lazy dog") /> Result = XIDINszyYHIP5vszuWRnyP/4/p/y0COFZHV8tzcxPh4= Unfortunately we get “Unauthorised” from the remote server. So we tried a simple quick test in PHP 2. echo base64_encode(hash_hmac('sha256', "the quick brown fox jumps over the lazy dog", "12345678901234567890" , true)); Result = XIDINszyYHIP5vszuWRnyP/4/p/y0COFZHV8tzcxPh4= Ok PHP and Freemarker hash routines agree with the same arguments. Great so what gives? We did some digging and discovered via some sample client code that they base 64 decoded the key. So sticking with PHP we tried 4. echo base64_encode(hash_hmac('sha256', "the quick brown fox jumps over the lazy dog", base64_decode("12345678901234567890") , true)); Result = TWxBl/zreSUOx/NFx+aHNLTU9tPkQ7TLQDPngthWf20= And this worked !! We now got an access token from the remote service.. So we thought awesome lets do the same in Freemarker 5. <#assign signature = utils.digest.hmac("HmacSHA256", utils.base64.decode("12345678901234567890”), "the quick brown fox jumps over the lazy dog") /> Result = Y+4vRRdPkXF5uRWjtIkEJosBpCHVEb0AqXRPfaNl5Tc= But we get a different hash? and still no token :( We suspect something weird is going on with string casting arguments in the Freemarker - because if we try this utils.base64.encode( utils.base64.decode("12345678901234567890”)) We get this 77+9be+/ve+/ve+/ve+/vU12345677+977+9dA== With php echo base64_encode( base64_decode("12345678901234567890") ) as expected 12345678901234567890 Any ideas?336Views4likes9CommentsLithium Community SDK and macOS 10.15 Catalina
Hi All, With the next version of macOS Catalina, apple has changed the default shell in Terminal from bash to zsh. This change will only affect new user accounts created on macOS 10.15 and later, user accounts on Macs created on earlier versions of macOS will for now continue to use bash as the default shell unless the user changes this setting. Using the SDK with the bash shell in macOS 10.15 Catalina If you wish to continue using the supported shell environment for the SDK in macOS where the default shell has been changed to zsh, follow the steps below to change it back to bash. To change the default terminal shell in macOS: Go to System Preferences in the Apple Menu and select Users & Groups Click the padlock to unlock and enter an admin users login details. Control-Click on your username in the list of users and select Advanced Options From the Login Shell drop down menu ensure this is set to /bin/bash For more information see the following Apple Support article: https://support.apple.com/en-gb/HT208050 Using the SDK with the zsh shell in macOS 10.15 Catalina If you wish to set up the SDK on a macOS user account that has zsh set as it's default shell, and you wish to continue using zsh as your default shell in macOS, I recommend using the following steps: Create a zshrc file in your user directory to store your user preferences by opening Terminal and then typing the following: touch ~/.zshrc Once you've done this, run the following command to install Node Version Manager (NVM) curl -o- <a href="https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh" target="_blank">https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh</a> | bash We now need to check and ensure the following content is in the .zshrc file that was created above, to do this type: pico ~/.zshrc Check that the file displays the following lines, if not, add the following lines to the file then press CTRL+X and then Y to save the changes. export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion Quit and re-open Terminal to allow the changes to take effect, once you've done this enter the following command to install NodeJS v 8.3.0 which is supported by the Community SDK at the time of writing this post. nvm install 8.3.0 Once you've got confirmation that NodeJS 8.3.0 is installed, quit and re-open Terminal again to refresh configuration. At this point you can follow the Developer Documentation for the SDK from the Installing the SDK and dependencies section.104Views2likes0CommentsKudos via AJAX
Hi, I wanted to see your opinion what is better option, We have custom kudogiving icon on messages, and there are currently two options to give kudo to message. Either through javascript ajax straight to "restapi/vc/messages/id/{messagID}/kudos/give" however this requires to set permissions for regular users be able to modify via rest calls. Other option wouldbe custom endpoint where it is done in freemarker context and call this endpoint through ajax. What do you think is better? Is it safe to enable Make REST API calls with modify access?Solved188Views0likes2Commentsrecommendations widget API problem
Hi Lithium, Lithium has built-in component <@component id="recommendations.widget.recommended-content-taplet" /> https://community.lithium.com/t5/Recommendations/About-Recommendations/ta-p/62660 The problem is that client does not like the look and feel of this component, which means we need to supply our own HTML and CSS to style it up and make it look fancy. This means we need to know what API (v1 / v2) this component is using? Any ideas? I have been asked for this by multiple customers. PeterSolvedpeterlu6 years agoChampion413Views0likes9CommentsOverriding a Component
If we override a component with @override ,and include component in our page, iwill it use overridden component by default or should we include ovverriden component explicitly? Example: I m overriding abc component , abc@override. In page should I include abc or abc@override? <@component id="abc"/> , will it work?Solved436Views0likes7CommentsHow to get latest Topics by the member
Hi, I'm just looking into display widget of Latest topics in the user profile page and which posted by the Signed-in member. As i have seen the "forums.widget.recent-messages" component and it is display the recent post by member. So i believe the "forums.widget.recent-threads" component also display the Latest topics post by member. But it returns all other members topics as well. So could you please suggest how we can achieve.jaikumar16 years agoMentor76Views0likes1CommentList of all blog articles across the Community, but excepting one or more categories
I'd like to create a custom page that lists all blog articles across the site, but excepts one or more categories. Display parameters (e.g., ORDER BY) are less important than excepting the archives. Has anyone done this? It would be a boost for SEO, as well as a list per se.Solved576Views0likes22Commentsunique id of original post (depth = 0) or reply (depth > 0)
How to get the unique id of a topic (depth = 0) or reply (depth > 0)? when there is topic and multiple replies , how to distinguish user has clicked on topic or reply? How to get the unique id of the topic or reply? Based on that i will do some operations.saideepak6 years agoContributor128Views0likes3Commentshow to implement custom views/kudo
can someone help in implementing the custom kudo and custom view for a message/topic? basically i am trying to implement conversation card with original post (depth = 0) and replies to the orginal post (depth > 0). How to implement custom kudos to the original post or a reply to original post/how many user has viewed the original post?saideepak6 years agoContributor64Views0likes0CommentsUser cache/Cookie
i am looking to use User cache (set some value) in page init script and access that value in component by using user cache. Is it possible to do that? <page init script> usercache.put("ksd", "1"); in custom component usercache.get("ksd") is this allowed? if not, what is the way to achieve this? My requirement is "open the modal dialogue in first instance when user visits my website and then never show that window again?saideepak6 years agoContributor128Views0likes2CommentsEndpoint for implementing Related conversations component
I have to implement related conversations for a given conversation that the user is viewing (on the right panel). This should be similar to already existing lithium OOTB (Recommendations) but I want to implement a new component for the same. Are there endpoints or APIs which I can use to achieve the same?shrugupt6 years agoAdept60Views1like0Commentsmove message complete- Email template
Hi, The move message completeemail template is not triggering if user moves a post from one board to another. User is able to move the message but no email is triggered. PFA for template decription.Thanks in advance. Thanks, DenizDenizbaby6 years agoGuide221Views0likes3CommentsCan a crawl command take a parameter?
I'm using "crawl_boards" to generate a localized index page for my blogs. Crawl_boards outputs a max of 1,000 lines, then generates a "page 2" link. Is there any way to add a parameter to "https://[domain]/[community ID]/crawl_boards?board.id=[board ID]" ? I assume it would be something like "?board.id=[board ID]&max.lines=2000" ... "max.lines" being pseudocode of course. Is this possible?53Views0likes0CommentsPoll
Hi , Can we create a new poll component using custom code. The requirement is to create a custom poll component which will have features like the below 1. Voting using a custom button using ajax calls to save the data(Not using the forums.widget.polls component). 2. Change the look and feel of polls choices 3. Button to create new Poll (With options to add choices) Basically I am looking for any API's to save the data like poll choices/create new polls. For retrieving the poll choices/active polls, we have API's. Thanks in Advance, DenizDenizbaby6 years agoGuide116Views0likes2CommentsPage Initialization CNAME Redirect for SEO
Hi there, We currently have our main community CNAME set to https://domain.com but the CNAME for https://www.domain.com is also enabled, though not actively promoted. So as to just have the one domain collecting stats in Google Analytics etc I'd like to have a proper wildcard redirect on the domain so that url requests to https://www.domain.com redirect to the non-www equivalent but also retain the url and parameters. But without a htaccess file I can't quite work out how to do this. I've managed in my Page Initialization script to do a general redirect with: <#if http.request.serverName == "<a href="http://www.domain.com" target="_blank">www.domain.com</a>"> ${http.response.setRedirectUrl("<a href="https://domain.com" target="_blank">https://domain.com</a>")} </#if> But this of courses strips out the url/parameters and just sends all urls back to the community page. I tried the following in the Page Initialization script hoping I could just substitute it but it didn't work: <#assign hostName = http.request.serverName /> <#if hostName == "<a href="http://www.domain.com" target="_blank">www.domain.com</a>"> <#assign hostName = "domain.com" /> </#if> Does anybody have any suggestions as to how I might be able to achieve this in the Page Initialization script? Thanks Nathansnaffle6 years agoExpert90Views0likes2CommentsCustom Search Component, do I need one?
We want to move the search bar from the main panel to the side rail in one section of our Community. When we move the component around in Studio, the drop-down causes the Search widget to take up extra space, and is not a desired look. It seems that if we want to modify the search bar, I would need a custom component to do this. Does this sound right? Here is what I am looking to do: - I want the search bar & button to take up just 1 line and not drop to multiple lines (like the Lithium component does) - In order to accomplish this I (think I) need to hide the search drop down just in this one area (it is on a specific page type, so it would be universal across the page type, but not affect the rest of the Community). Any recommendations or suggestions are welcome.SolvedSamantha_O6 years agoChampion269Views0likes5Commentssettings.name.get confusion
This is more an FYI post than an issue. Many posts talk about using settings.name.get to fetch a value, and I was using it to get the same value in two components. One component on my home/category page worked great, but the same component failed on forum topic pages (null or missing value error). My thought was a scoping issue, but what threw me off is the second component that used the same call worked at both forum and forum topic pages no problem. Put another way, on my forum topic pages I had two components, both using settings.name.get to fetch the same value, but one worked and one failed. Huh? Many posts say it gets a 'user' setting (such as profile.language), but if so then I would have expected failure in all my cases. My setting has community/category/board scopes, but only the community level setting has data. I eventually fixed my problem by using "community.settings.name.get". I still do not know why one component worked and one failed but using settings.name.get alone is questionable to me, and the docs use different terms and are not totally clear. What is clear from all the posts I read is that other people have also experienced confusion with this. This article says that it's a community setting, but if so then why did one fail? So I would offer a suggestion for anybody using this (particulary across different scopes/pages) that you may want to consider a more explicit reference such as: community.settings.name.get coreNode.settings.name.get (not sure if there are others?) Of course, you can avoid this and use a REST API call with the specific path to the setting instead.rwm6 years agoAdvisor206Views4likes0CommentsCustom Component to Implement Multiple Crawls
Per https://community.khoros.com/t5/Developer-Knowledge-Base/Implementing-federated-search-using-a-crawl-list/ta-p/7275, I can implement a crawl of a blog, output is a list of the component article URLs. Format for crawl URL = https://[community URL]/[community ID]/crawl_boards?board.id=[board ID] .... this works. However, I want to crawl about 20 blogs, in order to create a sort of site map specific to blogs, specifically for SEO purposes. I have created a component that has the crawl URLs in a list, and it only crawls the first one, then stops. I also created a component for each of the crawl URLs, and a component (loosely named after the blog) to call them (just for testing), like: <@component id="alliancesblog" /> <@component id="storage-block" /> <@component id="labs" /> ... but again, only the first one executes. Is there a way to make more than one crawl execute?209Views0likes6CommentsHow to check if tablet device is used?
Hi, how can we detect if a user is viewing our community on a tablet (iPad,...)? I could only find clientDevice.mobile andclientDevice.desktop. Is there also something linkeclientDevice.tablet? Any other possibilities how we can check tablet usage in freemarker? Thanks, clemenswclemensw6 years agoGuide97Views0likes2CommentsNeed help with LIQL query
In my scenario I have a user email ID, I need to get the Id and email id from users when I write the query as "select id, email from users where id='value'" its returning me details but if I write the query as "select id, email from users where email ='email_id'", it says query syntax error. could some one please help me. I only have email id so I cannot query with idSolvedsonaliyeluri6 years agoHelper261Views0likes6CommentsCustomize Post and Topics to add message translation button
We want to add support for message translation in different languages e.g. French, japanese etc. For that we require 2 things : 1. How to customize Post& Topics Page? 2. Is there any in-built feature for translation? Thanks89Views0likes1CommentDifferent page layout for mobile and desktop view
Dear Community, we'd like to define a page layout where some rows are only displayed on desktop, some other only on mobile? Can we add "hide on mobile" or "hide on desktop" classes in the xml layout? Is this possible? How? Thank you, best regards clemenswclemensw6 years agoGuide200Views0likes5Comments"View more" link is not working
Hi, Could you please help me with the below mentioned. The "View more" link that is at the bottom of the stories module that appears on the category pages is not working as intended. This "View more" link should be taking to the featured stories area for the category that particular link. How can I do this and please provide code to show the featured stories thread? Thanks, Sateesh.sateesh9996 years agoContributor47Views0likes0CommentsNavigating through moderator posts in a thread
I want to navigate through a thread and read only moderator commented posts in it. I want a list of all the moderator posts and move to the next post in that list using a button. Is there any OOTB which facilitates this?Sahana6 years agoAdept48Views0likes0CommentsSetting skin from page initialization script
I'm trying to set skin from the page initialization script for a particular page but it doesn't seem to work. Below is the code I'm trying to use: <#if page.name == "CommunityPage"> ${skin.set("skin_name")}SolvedSahana6 years agoAdept214Views0likes2CommentsHow to enable the labels option in Q&A activecast component
Hi All, we had created a Q&A active cast component in our community. we are unable to post using Q&A active cast component, because the community has mandatory labels for all boards. we are unable to see the labels component in Q&A active cast component. Is there any way to enable the labels option inQ&A activecast component. Thanks, Ravindra.108Views0likes1CommentReply By email - Config Value Change
Hi , Please let me know how to change the settingconfig.enable_reply_by_emailtotrue. This is required to enable the functionality of Reply to the threads subscribed using email. Able to change theprofile.enable_reply_by_email to true through Admin> user>profile defaults>Reply to posts by email .Thanks for the support. Thanks, DenizSolvedDenizbaby6 years agoGuide177Views0likes4CommentsCustom Tags API doesn't return value for List types
Hi, I'm running into a slight problem with the API's available to get Custom Tags data. My circumstance is that I am trying to pull any custom tags associated with a specific message. The best way I have found is tomake a query like the following: SELECT * FROM custom_tags WHERE messages.id='12977' Which will return something like this: { "type" : "custom_tag", "id" : "1033", "href" : "/custom_tags/1033", "text" : "ListTagName", "messages" : { "query" : "SELECT * FROM messages WHERE custom_tag.id = '1033'" } This works fine for 'Flag' type custom tags, as thename of the custom tag (value of "text") is all I need. However for 'List' type custom tags, it does not return the value of that flag. It just alerts me that "ListTagName" has been set on the message, but not what it has been set to. It would be of great help if the value was also returned in this call. As far as I can tell the href("/custom_tags/[id]") is about the custom tag globally, not about it's attachment to this specific message.drubalcaba_cks6 years agoContributor272Views0likes5Comments