Skip to content

Commit

Permalink
skeleton of like button
Browse files Browse the repository at this point in the history
  • Loading branch information
jessewoo committed Aug 15, 2024
1 parent f66344c commit b3bfd7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/components/com_forum/site/assets/css/like.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Should put this in the comments.less file */
ol.comments .comment-options a.like {
float: right;
}
1 change: 1 addition & 0 deletions core/components/com_forum/site/assets/js/like.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("like on site forum");
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

defined('_HZEXEC_') or die();

$this->css('like.css')
->js('like.js');

$this->comment->set('section', $this->filters['section']);
$this->comment->set('category', $this->category->get('alias'));

Expand Down Expand Up @@ -122,6 +125,10 @@
)
) { ?>
<p class="comment-options">
<!-- Like Comments -->
<a class="icon-like like" data-id="c<?php echo $this->comment->get('id'); ?>" href="<?php echo Route::url($this->comment->link('like')); ?>">
LIKE
</a>
<?php if ((!$this->comment->get('parent') && $this->config->get('access-delete-thread')) || ($this->comment->get('parent') && $this->config->get('access-delete-post'))) { ?>
<a class="icon-delete delete" data-txt-confirm="<?php echo Lang::txt('COM_FORUM_CONFIRM_DELETE'); ?>" data-id="c<?php echo $this->comment->get('id'); ?>" href="<?php echo Route::url($this->comment->link('delete')); ?>"><!--
--><?php echo Lang::txt('JACTION_DELETE'); ?><!--
Expand Down

0 comments on commit b3bfd7a

Please sign in to comment.