Need to change Moderate link functionality on click instead of hover

Hi Telligent team,

I was trying to change moderate functionality options or behaviour which is appearing on hover of that particular link. As shown in screenshot below, on hover on Actions link a pop will show that has two category one is Flag/Spam which we got by moderate API and second is delete link which is added by us in moderate API as a additional links.

And We need this functionality same as we have in telligent site on click of that particular link So I removed all css and JS files but didn't impact anything on my page.

Screenshot is below:-

Whenever we click on More button link this pop up shows with multiple links.

I checked in telligent site and got override script from below url:-

https://community.telligent.com/community/10/w/api-documentation/61978/moderate-ui-component

but that is overriding Actions link with Flag/Spam link. If we go with this override approach then we have to add another multiple links for delete, Move, Join, Edit user and many more under blogs, Forums, wiki, leaderboard and badge pages.

Right now, I tried for a link i.e.Delete which have delete functionality for the post or thread  but that also didn't work and code is below:

<li class="navigation-list-item">
       <a href="#" data-more class="" data-position>
         #if ($accessingUserIsRegistered)
            #set ($moderateOptions = "%{}")
            #if($core_v2_activityStory.CanDelete($story.StoryId))
                #set ($DQ = '"')
                $moderateOptions.Add('AdditionalLinks',"[{${DQ}href${DQ}:${DQ}#${DQ},${DQ}text${DQ}:${DQ}${core_v2_language.GetResource('delete')}${DQ},${DQ}className${DQ}:${DQ}delete${DQ}}]")
            #end
                  $core_v2_ui.Moderate($story.ContentId, $story.ContentTypeId, $moderateOptions)
         #end
       </a>
</li>

Please help into this.

Thanks,
Rahul

Parents
  • In your code example, you never calling the delete, you just checking if the user can delete an activity story, which is not the same as a post or thread and calling $core_v2_ui.Moderate() which does not delete

  • Hi Brian,

    Thanks for your reply, My problem still remains

    Let me try to re-explain my problem here:
    I am trying to achieve the moderate button functionality on click, but in my case, the behavior is a bit different for More button which I am unable to figure out why.

    Steps to reproduce on Telligent community:
    1. Click Site URL: https://community.telligent.com/community/10/f/ask-the-community/1146803/need-to-change-moderate-link-functionality-on-click-instead-of-hover
    2. Click on More button.
    3. Inspect More button.

    Expected Behavior: You will notice a Div is created with class name "links-popup-panel"
    4. Again Click on More button on second reply/post.
    5. Again inspect the More button which you clicked now.
    Expected behavior: You will notice the same Div's content is updated. And the More button links are working on click.

    The same functionality I want to achieve in my Dynamics Community Site, But I am seeing below 3 challenges:

    1. My more link is not working on click. but it is working on hover by default.
    2. When I hover on More button on any reply/post and inspect it(step #4 & #5) I am seeing different Divs created every time. where each Div has a separate container with the same class.
    3. Also in my case, class name created is "content-moderation" instead of "links-popup-panel".

    Can you let me know what JS is causing these changed behavior in my case?

    Thanks much!

Reply
  • Hi Brian,

    Thanks for your reply, My problem still remains

    Let me try to re-explain my problem here:
    I am trying to achieve the moderate button functionality on click, but in my case, the behavior is a bit different for More button which I am unable to figure out why.

    Steps to reproduce on Telligent community:
    1. Click Site URL: https://community.telligent.com/community/10/f/ask-the-community/1146803/need-to-change-moderate-link-functionality-on-click-instead-of-hover
    2. Click on More button.
    3. Inspect More button.

    Expected Behavior: You will notice a Div is created with class name "links-popup-panel"
    4. Again Click on More button on second reply/post.
    5. Again inspect the More button which you clicked now.
    Expected behavior: You will notice the same Div's content is updated. And the More button links are working on click.

    The same functionality I want to achieve in my Dynamics Community Site, But I am seeing below 3 challenges:

    1. My more link is not working on click. but it is working on hover by default.
    2. When I hover on More button on any reply/post and inspect it(step #4 & #5) I am seeing different Divs created every time. where each Div has a separate container with the same class.
    3. Also in my case, class name created is "content-moderation" instead of "links-popup-panel".

    Can you let me know what JS is causing these changed behavior in my case?

    Thanks much!

Children