Пример #1
0
 /**
  * Remove like for the submitted topic 
  * 
  * @param string $topic_id the topic to unlike
  */
 function dislike_action($topic_id)
 {
     ForumPerm::check('like_entry', $this->getId(), $topic_id);
     ForumLike::dislike($topic_id);
     if (Request::isXhr()) {
         $this->topic_id = $topic_id;
         $this->render_template('index/_like');
     } else {
         $this->redirect(PluginEngine::getLink('coreforum/index/index/' . $topic_id . '#' . $topic_id));
     }
 }
Пример #2
0
                <?php 
echo ForumHelpers::translate_perm($GLOBALS['perm']->get_studip_perm($constraint['seminar_id'], $post['user_id']));
?>
            </dd>
            <? if ($post['user_id']) : ?>
            <dd>
                Beiträge:
                <?php 
echo ForumEntry::countUserEntries($post['user_id']);
?>
<br>
                <?php 
echo _('Erhaltene "Gefällt mir!":');
?>
                <?php 
echo ForumLike::receivedForUser($post['user_id']);
?>
            </dd>
            <? endif ?>
            <? endif; ?>
            <dd>
                <? if (!$post['user_id']) : ?>
                    <?php 
echo _('von Stud.IP erstellt');
?>
<br>
                <? endif ?>
            </dd>
            
            <dd class="posting_icons">
                <!-- Favorit -->