We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46220
    • 66 Posts
    On my Discuss forum I would like to give members and guests the opportunity to rate a thread. I've found and tried LexRating as well as CSS Star Rating and both give the same problem. You can click on the preferred amount of stars though neither will actually register the rating. In CSS Star Rating's case, it jumps to the root of the forum. See http://gamerschain.com/forums/thread/19/the%20sun%20tzu%20wars on the right side for example.

    Problem with CSS Star Rating is it hardly has any documentation and also on the forum there is little to be found on this subject.

    My call for CSS Star Rating:
    [[!starRating? &starId=`[[+discuss.pagetitle]]`]]


    And for LexRating:
    [[LexRating? 
    &name=`<h4>Rate this thread</h4>`
    &group=`[[+discuss.pagetitle]]` 
    &loadjQuery=`1`
    &initialAjax=`0`
    ]]


    Anyone that can help me with a solution?
      • 46220
      • 66 Posts
      Just thought I'd bump this one as the issue is still there.
        • 46886
        • 1,154 Posts
        I think the tool will not find the id or title or whatever of the current resource while in the sidebar, which doesn't know what thread it is appearing on. I don't think you can find the link with the tool in that place, or its hard, because I don't think code in that place can find the thread ID for the current thread.

        The tool must save them by some order, it might be resource number which wouldn't work for the forum, but its not specified in the call as you have it now.

        [[LexRating?
        &name=`<h4>Rate this thread</h4>`
        &group=`[[+discuss.pagetitle]]` <<no this is resource group, the example has 'articles', not the page id title or url. It must use a default for that, hope its url.

        &userGroups=`Members` <<this is perhaps needed as it defaults to...empty, dunno what that means
        &loadjQuery=`1`
        &initialAjax=`0`
        ]]
          • 46886
          • 1,154 Posts
          Wait I am wrong, the tool Rimo made is in the sidebar and gets other posts from the current board, so you can get that data there. But he is doing a full php snippet for that.

          But still, the issue is what data does the tool use to identify the resource/thread, and then you may need to provide it:

          [[LexRating?
          &name=[[+url]] <<This gets the url in Discuss, but might only work inside the post view
          &group=`web` <<this is resource group, the example has 'articles', not the page id title or url.
          &userGroups=`Members` <<this is perhaps needed as it defaults to...empty, dunno what that means, but our forum members (also can use the number for the group) may not be included in default user group so you probably need this.
          &loadjQuery=`1`
          &initialAjax=`0`
          ]]

          If you can't get url in sidebar then you could put in post view (which would be rating each post independently) or use a bit of php like this:

          IF 'new thread' then
          '[[LexRatingCall]]'
          else (nothing)