Forum Discussion

bhupen's avatar
bhupen
Advisor
11 years ago

Show Icon on thread resonse or created by specific role

Hi Guys.


I have a requirement:
When a thread has a response, or is started by someone with the role of
- "DigitalPlatforms Support" or - "Administrator" Please display an icon next to the thread display when viewing a board:

Can anyone help me to implement this functionality?

Regards

18 Replies

  • bhupen  - Got you, just one change and it will work. No changes in JS are required.

     

    The CSS change you made, remove the display block, 

     

    .messageAuthorColumn .UserName.lia-user-name img.lia-user-rank-icon-left {    

     display: block;  

      margin-left: -81px !important;

    }

     

    Please mark the post Accept as a solution if it answers your question. Kudos for the helpful post are appreciated.

  • bhupen's avatar
    bhupen
    Advisor
    11 years ago

    VarunGrazitti  Its hard luck for me. Not workin in jquery do you have any idea how can I do it using FTL.

    Following are the jquery code How can I do the same way in FTL:

    <script>
     $(".thread-list .lia-list-row .messageAuthorColumn").each(function(){
     
    var getRole = $(this).find('.lia-user-rank-icon-left').attr('title');

    if(getRole != "DigitalPlatforms" || getRole !="Administrator"){
         $(this).find('.lia-user-rank-left-icon').hide();
    }
    });
     </script>

     

    Regards

  • Where are you using the JS? I guess the issue is not in the code, either You don't have the Role "DigitalPlatforms" on stage or there are no posts made by these 2 roles on the page where you are checking for the posts. Try changing the name of the getRole variable to the ones which are present on 10031 board. LMK, it should work. I checked your production community, and I see a role "Cannon Fodder", "First Son" etc there, try using these instead of DigitalPlatforms to see if it works.
  • bhupen's avatar
    bhupen
    Advisor
    11 years ago

    @graziti Iam puting the js on "Page Head Content"  and also changed the value of getRole as well. its not working for me.

     

  • Hi @bhupen, such posts are helpful for other developers, please mark the appropriate reply as the solution so other people can get to know which post was the solution. Might help someone in someways.