Ioannis D Posted April 4, 2017 Share Posted April 4, 2017 Hello, Is it possible with some way to disable "Unlike this" when a user likes a post? or if not, can anyone create a plugin? I think it is useful for any who uses hidden content and unhide that, when someone hits "Like this" button. Link to comment Share on other sites More sharing options...
David.. Posted April 5, 2017 Share Posted April 5, 2017 Hey, So far, it's only doable via a template edit. However, if a user visits the specific unlike URL, then it will unlike the content. Link to comment Share on other sites More sharing options...
Ioannis D Posted April 5, 2017 Author Share Posted April 5, 2017 Exactly, this is the bad scenario, if a user like a post and got the unhidden content then it's easy to unlike that and get hide it again (the reputation goes nowhere). I know it's not fair but it is possible to happen. Link to comment Share on other sites More sharing options...
opentype Posted April 5, 2017 Share Posted April 5, 2017 Open your theme’s HTML: core → front → global → reputation Remove this whole part that contains the “unlike” {{if $content->canGiveReputation( -1 )}} <a href='{$content->url( 'rep' )->setQueryString( 'rep', -1 )->csrf()}' data-action="giveReputation" class='ipsButton ipsButton_like ipsButton_veryLight'><i class='fa fa-times'></i> <span class='ipsHide' data-role='repCount'>{$content->reputation()}</span> {lang="unlike"}</a> {{endif}} Also: core → front → global → reputation_mini {{if $canRepDown}} <a href='{$giveRepUrl->setQueryString( array( 'rep' => -1, 'mini' => 1 ) )->csrf()}' data-action="giveReputation">{lang="unlike"}</a> {{endif}} Link to comment Share on other sites More sharing options...
Ioannis D Posted April 5, 2017 Author Share Posted April 5, 2017 Thank you @opentype, it works! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.