This mod was designed to let those with permission remove all likes on posts. This is useful for posts undeserving of likes such as flaming, spam, etc.
Features:
Template Edits:
Screenshots:
Usage Rights:
Features:
- Removes likes on posts.
- Subtracts removed likes from users like count.
- Likes easily restorable.
- Stops post from receiving likes.
- Upload everything in /upload to Xf's root directory.
- Import the XML add-on.
- Do Template Edits (See Below)
- Assign permissions to groups.
- Start punishing.
Note to big boards with large post counts. This add-on adds a column to the xf_post table. If you have a large amount of posts run this query over ssh or ask your host to before installing.
Code:
ALTER TABLE `xf_post` ADD `is_punished` TINYINT( 1 ) NOT NULL DEFAULT '0'
Template Edits:
In the "post" template Find:
Code:
<xen:if is="{$post.canLike}">
<a href="{xen:link posts/like, $post}" class="LikeLink item control {xen:if $post.like_date, unlike, like}" data-container="#likes-post-{$post.post_id}"><span></span><span class="LikeLabel">{xen:if $post.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
</xen:if>
Replace With
Code:
<xen:if is="{$post.canLike}">
<xen:if is="!{$post.is_punished}">
<a href="{xen:link posts/like, $post}" class="LikeLink item control {xen:if $post.like_date, unlike, like}" data-container="#likes-post-{$post.post_id}"><span></span><span class="LikeLabel">{xen:if $post.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
<xen:else />
<span class="item control">{xen:phrase punish_punished}</span>
</xen:if>
<xen:if is="{$visitor.permissions.sumo_punish.sumo_punish_can_punish}">
<a href="{xen:link punish/post, $post}" class="item control" data-container="#punish-post-{$post.post_id}"><span class="PunishLabel"><xen:if is="!{$post.is_punished}">{xen:phrase punish_punish}<xen:else />{xen:phrase punish_unpunish}</xen:if></span></a>
</xen:if>
</xen:if>
Screenshots:
Unpunished Post:
Punished Post:
Permissions:
Usage Rights:
You may:
- Modify the add-on to suite your needs as long as you do not distribute it.
You may NOT:
- Redistribute this add-on to anyone or any site including XenForo and fan sites without my permission
- Sell this add-on.
- Convert the add-on to any other software without my permission.
- Jan 19/2012 - Initial Release
- Jan 23/2012 - Fixed a bug that would return an error message when trying to punish a post with no likes.
Any donations are greatly appreciated and help further development of add-ons.



