Forum Discussion

rajeevsamuel's avatar
rajeevsamuel
Contributor
14 years ago

Active Cast Questions

As we discussed here are the technical questions I have for Lithium.

 

1)      Pulling top ten latest post by Category ID – currently we can only pull by Board ID however we need to pull the top 10 latest posts by Cateogry

 

2)       Customizable Date Format – Is it possible to customize the format of the Post Time?

 

3)      Ajax Call – We will be putting the top 10 of  four categories on a single page  – Is there a JavaScript command we can call where we can specifiy a target DIV or element to populate?

 

Rajeev Samuel

Totem Brand Communications

6 Replies

  • MoniqueL's avatar
    MoniqueL
    Lithium Alumni (Retired)
    14 years ago

    Hi Rajeev, and welcome to the lithosphere. To answer your questions:

     

    1) Yes you can get the the latest topics for a category. Try /restapi/vc/categories/id/support/topics/recent

    2) Yes you can customize the date format to an extent. The Date Format is a text property which by default displays MM-DD-YYYY. You can change it to display something like DD-MM-YYYY ex:  http://supportcommunity.swisscom.ch/t5/Welcome-to-the-english-help/bd-p/welcome_en or utilize the friendly dates option in the community admin.


    3) Unfortunetly Lithium doesn't have javascript support for that at this time. However, you could write a custom component and add your own javascript code to acheieve the effect you are looking for.

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)
    14 years ago

    Replace "support" in that rest call with the actual id of your categort:

    /restapi/vc/categories/id/[your id here]/topics/recent

  • rajeevsamuel's avatar
    rajeevsamuel
    Contributor
    14 years ago

    Hmm,

    My apologies - I did not give you sufficient background.  These are Active Cast specific questions.

    Using Active Cast the following JAVASCRIPT code is generated to enable embedding of a widget.  Right now the only option for obtaining a CATEGORY feed is from the featured posts section.  I'm looking for a feed of the top 10 from all of the boards in a category.

    <script type='text/javascript' id='ACTIVECAST-FT' src='http://hdgc.stage.lithium.com/hdgc/activecast/activecast-featured-threads.js.jsp'></script>
    <script type='text/javascript'>
        LITHIUM.ActiveCast.getFeaturedThreads('Cat_Gardening', {maxNumberOfMessages: 10,lookupThreadBy: 'CATEGORY'});
    </script>


    1) Pulling top ten latest post by Category ID - currently we can only pull by Board ID however we need to pull the top 10 latest posts by Cateogry
    Please provide a sample Javascript code

    2) Customizable Date Format - Is it possible to customize the format of the Post Time?  

    Please provide a sample Javascript code

    3) Ajax Call - We will be putting the top 10 of  four categories on a single page  
     - Is there a JavaScript command we can call where we can specifiy a target DIV or element to populate? Right now whatever generated html that appears the "<script type='text/javascript' id='ACTIVECAST-FT' src='http://hdgc.stage.lithium.com/hdgc/activecast/activecast-featured-threads.js.jsp'></script>" script tag - but I would like to target it.
     
     Please provide a sample Javascript code
     
    Cheers,
    Rajeev Samuel

    Totem Brand Communications

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)
    14 years ago

    Unfortunately, Active Cast can't really be used for what you want to do.  Our Active Cast calls support a small number of simple requests and return simple, static HTML.  The main purpose of this is to easily display dynamic content on existing web sites without the customer needing to have much technical knowledge.  

     

    For a more complex, custom project like you are looking at undertaking, I would suggest using the REST API instead.  It has a much larger number of calls/options and returns plain XML with which you can do whatever you like.

  • dsg0110's avatar
    dsg0110
    Ace
    13 years ago

    I'm trying to use active cast for Q&A and I'm running into a problem. The Q&A worked fine in my initial testing - pointing to our main community page. However, after I created the new category/board structure that I wanted to use, those categories/boards never showed up in the active cast list. Is there a lag time b/w when boards are created and when they're available for active cast?


    Thanks,
    Scott

  • dsg0110's avatar
    dsg0110
    Ace
    13 years ago
    I forgot to mention that these boards are "hidden" from lists and menus. I'm not sure if that makes a difference or not. I wasn't aware of any other way to hide them in the community and only have them displayed where the active cast code will be used.