0
Welcome Guest! Login
0 items Join Now

RokComments button not shown

  • RokComments button not shown

    Posted 11 years 9 months ago
  • Re: RokComments button not shown

    Posted 11 years 8 months ago
    • I have implemented an commentl link in the template file default_item.php as workaround.
      Is there the possibility to show the number of the comments in front of the link?
      This code doesn't work:
      <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>">(<fb:comments-count href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"></fb:comments-count> Kommentare)</a>
  • Re: RokComments button not shown

    Posted 11 years 8 months ago
    • If nobody helps you, help yourself...
      <div class="bt-facebook-comment">
          <?php global $post;
           $url = 'http://www.tus07.de' . JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
           $filecontent = file_get_contents('https://graph.facebook.com/?ids=' . $url);
           $json = json_decode($filecontent);
           $count = $json->$url->comments;
           if ($count == 0 || !isset($count)) {
                $count = 'Kein Kommentar';
           } elseif ( $count == 1 ) {
                $count = '1 Kommentar';
           } else {
                $count .= ' Kommentare';
           }
           echo '<a href="' . $url . '"># ' . $count . ' #</a>'; ?> 
      </div>

Time to create page: 0.100 seconds