×
K5.1.1 is released (10 Jun 2018)

The Kunena team is pleased to announce Kunena 5.1.1 [K 5.1.1].
Please read the blog post for information:

× Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Solved How to add icon for subscribe in default_row.php

More
2 years 11 months ago - 2 years 11 months ago #1 by Armor
Hi ;)
I have a question, how I can add an icon subscribed topic in the list of topics ?


in file blue_eagle/html/category/default_row.php
<?php if ($this->topic->getUserTopic()->favorite) {
    echo $this->getIcon ( 'kfavoritestar', JText::_('COM_KUNENA_FAVORITE') );
}
if ($this->me->exists() && $this->topic->getUserTopic()->posts) {
    echo $this->getIcon ( 'ktopicmy', JText::_('COM_KUNENA_MYPOSTS') );
}
if ($this->topic->unread) {
I tried to add something like this
$this->topic->getUserTopic()->subscribe
but does not work. ;)

If you have any suggestions, It will be nice :silly: best regards.
Attachments:
Last edit: 2 years 11 months ago by Armor.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #2 by Armor
Is no one tried to do it?

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago - 2 years 11 months ago #3 by 810
$userTopic = $this->topic->getUserTopic();
if ($userTopic->subscribed) {
 echo $this->getIcon ( 'ktopicmy', JText::_('COM_KUNENA_MYPOSTS') );
}
Last edit: 2 years 11 months ago by 810.
The following user(s) said Thank You: Armor

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.216 seconds