Forum Discussion

fuenteso's avatar
fuenteso
Leader
9 years ago

Is there a way to use forums.widget.message-list-panel with API v2.0?

Hi!

 

I want to build a component to display topics from a user posted to some specific boards (each on different categories) and I would like to use "forums.widget.message-list-panel" to display the results. So...

 

1) Is there a way to build such an API v1.0 search query to get that information? Something like:

[...]/restapi/vc/search/messages?q=(board.id:board1 OR board.id:board5) AND user.id:JoeDoe

 

2) I know I can build that query using API v2.0, but is it compatible with "forums.widget.message-list-panel"? 

 

3) Does anyone knows if there's any documentation on these Lithium OOB components? Things like how many of them exist and how to use them, for example.

 

I can always create my own 'presentation' component, but I want to know if there's a way to use Lithium's components for consistency purposes.

 

Thanks!

  • fuenteso - There is no way to access the code of the OOB lithium components. One way is to override them but that wouldn't provide you with the code access either. So the only option is to build a custom component. An easier way would be to put these boards in one category and make a call at that category level :)

     

    I hope it helps.

  • DougS's avatar
    DougS
    9 years ago

    I wish I'd see this post sooner (a year too late it appears). You can use V2 calls that return a list of messages to the forums.widget.message-list-panel component -- just use the prefix rest_2.0: (instead of rest_v1:). For example:

     

    <#assign results_list_size = 5 />
    <#assign rest_query = "SELECT * FROM messages WHERE replies.count(*) = 0 AND depth = 0" />
    <@component id="forums.widget.message-list-panel" messages="rest_2.0:/search?q="+rest_query?url style="wide" numMessages="conv:"+results_list_size />

    -Doug

  • fuenteso - There is no way to access the code of the OOB lithium components. One way is to override them but that wouldn't provide you with the code access either. So the only option is to build a custom component. An easier way would be to put these boards in one category and make a call at that category level :)

     

    I hope it helps.

    • fuenteso's avatar
      fuenteso
      Leader

      Too bad! It would be awesome to be able to be able to fully leverage all those lithium components. I'll have to build my own component, then.

       

      Thanks, VarunGrazitti

      • DougS's avatar
        DougS
        Khoros Oracle

        I wish I'd see this post sooner (a year too late it appears). You can use V2 calls that return a list of messages to the forums.widget.message-list-panel component -- just use the prefix rest_2.0: (instead of rest_v1:). For example:

         

        <#assign results_list_size = 5 />
        <#assign rest_query = "SELECT * FROM messages WHERE replies.count(*) = 0 AND depth = 0" />
        <@component id="forums.widget.message-list-panel" messages="rest_2.0:/search?q="+rest_query?url style="wide" numMessages="conv:"+results_list_size />

        -Doug