Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager in combination with comments
#1
Hello,

I have started using Get Simple today and I love the lite CMS so far, I have installed the news manager plugin by Rogier Koppejan to create some sort of blog idea, but I am not looking to upgrade this with a comments plugin, I have found one by Fabio Mariottini, but I am left with a question.

How do you build up a blog page?
Cause my comments appear before every blog post, and even on the main blog page where all the blog excerpts are.

I have build mine up like this:
I created a blog template called blog.php, and inserted the tag by Rogier.
Then I inserted the comments thing on the same blog.php. But now the comment form appears on the mainpage of blog.php aswell.

Help would be appreciated Smile
Reply
#2
You could look at using the external (hosted) comments plugin supporting either disqus or intense debate.

http://get-simple.info/forum/post/8871/#p8871

-Rob A>
Reply
#3
Looks slick thanks alot for the suggestion, I just have a question.

I inserted the php code in my blog.php template
Code:
<?php get_external_comments(); ?>

But blog.php is used as the blog mainpage and as the blog detailed pages, which now make the discus form appear on the blog page in general, I really only want them below the post.

And does this plugin show the comments relative to the blog post, cause to me it would seem its just one form that records the comments for all the blog posts on the site?

Hmm seems the tag doesnt work in News Manager on default.
Reply
#4
Mehk Wrote:Looks slick thanks alot for the suggestion, I just have a question.

I inserted the php code in my blog.php template
Code:
<?php get_external_comments(); ?>

But blog.php is used as the blog mainpage and as the blog detailed pages, which now make the discus form appear on the blog page in general, I really only want them below the post.

And does this plugin show the comments relative to the blog post, cause to me it would seem its just one form that records the comments for all the blog posts on the site?

Hmm seems the tag doesnt work in News Manager on default.

It currently uses the page URL /slug as a unique identifier, which is per page.

I'll take a look at the news manager to see how it works.

-Rob A>
Reply
#5
Well
Mehk Wrote:Looks slick thanks alot for the suggestion, I just have a question.

I inserted the php code in my blog.php template
Code:
<?php get_external_comments(); ?>

But blog.php is used as the blog mainpage and as the blog detailed pages, which now make the discus form appear on the blog page in general, I really only want them below the post.

And does this plugin show the comments relative to the blog post, cause to me it would seem its just one form that records the comments for all the blog posts on the site?

Hmm seems the tag doesnt work in News Manager on default.

Well, that was messy.

The reason it won't work is that the news plugin doesn't fire the content filters, so the replacement wan't happening. On top of that, the comment plugin uses the slug as a "unique identifier" which won't work with the news plugin as all the news articles have the same slug.

I've uploaded a new version of the external comment plugin to extend http://get-simple.info/extend/plugin/ext...enting/73/ that works (more or less) with the news plugin.

After installing the plugin, instead of using the tag:
Code:
(% external_comments %)
in a page text or:
Code:
<?php get_external_comments(); ?>
in your template you will have to edit the news plugin.....

Find the section:
Code:
<div class="article">
      <h3 class="article_title">
        <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
      </h3>
      <p class="article_date">Posted on: <?php echo $date; ?></p>
      <div class="article_content"><?php echo $content; ?></div>
      <?php
      if ($excerpt && !empty($data->excerpt))
        echo "<p class=\"article_link\"><a href=\"$url\">Read more</a></p>";
      elseif (!$excerpt)
        echo "<p class=\"article_meta\"><b>Permalink:</b> <a href=\"$url\">$url</a></p>";
      ?>
    </div>

and insert one new line to call get_external_comments and override the defaults:
Code:
<div class="article">
      <h3 class="article_title">
        <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
      </h3>
      <p class="article_date">Posted on: <?php echo $date; ?></p>
      <div class="article_content"><?php echo $content; ?></div>
      <?php
      if ($excerpt && !empty($data->excerpt))
        echo "<p class=\"article_link\"><a href=\"$url\">Read more</a></p>";
      elseif (!$excerpt)
        get_external_comments($id, $url, $title);
        echo "<p class=\"article_meta\"><b>Permalink:</b> <a href=\"$url\">$url</a></p>";
      ?>
    </div>

This will call the external comments plugin and uniquely identify each news article so they can have separate comments.

Note This will NOT work with Disqus right now.... they might have a bug as I am following their API instructions exactly, as far as I can tell . I have reported it to Discus support so we will see what the result is..

-Rob A>
Reply
#6
RobA Wrote:<div class="article">
<h3 class="article_title">
<a href="<?php echo $url; ?>"><?php echo $title; ?></a>
</h3>
<p class="article_date">Posted on: <?php echo $date; ?></p>
<div class="article_content"><?php echo $content; ?></div>
<?php
if ($excerpt && !empty($data->excerpt))
echo "<p class=\"article_link\"><a href=\"$url\">Read more</a></p>";
elseif (!$excerpt)
get_external_comments($id, $url, $title);
echo "<p class=\"article_meta\"><b>Permalink:</b> <a href=\"$url\">$url</a></p>";
?>
</div>

RobA thanks so much for the quick response and fix! Its working perfectly.
And btw I am using Disqus and so far it seems to work fine? I can leave comments on different news sections.

Though this is on my local server, so I haven't given it a test online yet.
Reply
#7
I do Comments in three plugins news
http://neowebtime.ru/1/
http://neowebtime.ru/1/newss/news-06-04-2011?lang=en
http://neowebtime.ru/1/news-1?article=4d9b702b0fdcd
http://neowebtime.ru/1/index.php?id=news...sitem=news
I inserted into each page
Code:
(% external_comments %)
Reply
#8
Mehk Wrote:And btw I am using Disqus and so far it seems to work fine? I can leave comments on different news sections.

Though this is on my local server, so I haven't given it a test online yet.

http://testbed.cartocopia.com/news/?arti...48b965f950
http://testbed.cartocopia.com/news/?arti...48baf8953d

Show the same comments for me...

EDIT: New articles created work for me. It might have been because I commented on these before I hchnged the code and has associated them together now.

So, seems to work correctly for Discus in the news manager with the modification to the news plugin (additional line) and the latest (0.5) external comments plugin

-Rob A>
Reply
#9
Got same problem with comments with news. Same comments on every news.

In extended_news_manager.php at line 919
Code:
return_external_comments($plugin_settings->news_page.'-', $url, $title)
title of news goes to last parametr.
in
external_comments.php
Code:
in function:
return_external_comments($PostID='', $PageURL='', $PageTitle='')

$PageTitle isn't putted nowhere in

case 'ID':
      $new_content .= '<script>';
      $new_content .= "var idcomments_acct = '" . $external_comments_conf['shortname'] . "';";
      $new_content .= "var idcomments_post_id = '" . $PostID . "';";
      $new_content .= "var idcomments_post_url = '" . $PageURL . "';";
      $new_content .= "</script>";
      $new_content .= '<span id="IDCommentsPostTitle" style="display:none"></span>';
      $new_content .= "<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>";
      break;

so I change line:
Code:
$new_content .= "var idcomments_post_id = '" . $PostID . "';";

to:

$new_content .= "var idcomments_post_id = '" . $PostID ."-" . $PageTitle . "';";

that makes combination return_page_slug() and return_page_title().

This modyfication will be a problem only when You change page title. Then comments will dissapire.

For me it does the job.
Maby it will be good to make changes in extended_news_manager for that purpose.

BTW. when I put
<?php get_external_comments($id, $url, $title); ?>
in template, and called function:
<?php echo $id.' url:'.$url.' title:'.$title; ?>
it showed me:
news url:news title:news
Reply




Users browsing this thread: 1 Guest(s)