Skip to content

Commit

Permalink
Removce abbility for bots and ananons to like
Browse files Browse the repository at this point in the history
Go go
  • Loading branch information
satanasov committed Jun 18, 2014
1 parent 9fc26b7 commit 671ed36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "Adds ability to favourite/like/thank a post.",
"homepage": "https://github.com/lucifer4o/postlove",
"version": "1.0.0",
"version": "1.0.0b",
"time": "2014-06-18",
"license": "GPL-2.0",
"authors": [
Expand Down
4 changes: 4 additions & 0 deletions event/main_listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public function modify_post_row($event)
}
$this->template->assign_var('IMGDIR', $this->image_dir);
$this->template->assign_var('IS_POSTROW', '1');
if ($this->user->data['is_bot'] && $this->user->data['user_id'])
{
$this->template->assign_var('DISABLE', '1');
}
}

}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div style="float: right;">
<span title="{postrow.POST_LIKERS}" style="font-size: 1.3em; vertical-align: top;" id="like_{postrow.POST_ID}">{postrow.POST_LIKERS_COUNT}</span><span style="font-size: 1.3em; vertical-align: top;">x </span><a href="./app.php/postlove/togle/{postrow.POST_ID}" data-ajax="togle_love"><img src="{postrow.POST_LIKE_IMAGE}" width="16px" height="16px" id="likeimg_{postrow.POST_ID}"></a>
<span title="{postrow.POST_LIKERS}" style="font-size: 1.3em; vertical-align: top;" id="like_{postrow.POST_ID}">{postrow.POST_LIKERS_COUNT}</span><span style="font-size: 1.3em; vertical-align: top;">x </span><!-- IF DISABLE != 1 --><a href="./app.php/postlove/togle/{postrow.POST_ID}" data-ajax="togle_love"><!-- ENDIF --><img src="{postrow.POST_LIKE_IMAGE}" width="16px" height="16px" id="likeimg_{postrow.POST_ID}"><!-- IF DISABLE != 1 --></a><!-- ENDIF -->
</div>

0 comments on commit 671ed36

Please sign in to comment.