Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

re: Comments are not available for this entry

Matty1965
2012-01-18
2013-06-03
  • Matty1965
    Matty1965
    2012-01-18

    Hi,

    I don't want to use comments on my blog, so I've disable them in the preferences. However, I still want visitors to be able to open up the full blog entry. Underneath the entry, it now shows:

    Comments
    Comments are not available for this job.

    Does anyone know how I can stop this from appearing?

    Thanks

    Marcus

     
  • nabber00
    nabber00
    2012-01-19

    I think you'll need to edit the theme.  This shouldn't be too hard, it sounds like you can safely remove the entire comments section if you aren't using it.

     
  • Matty1965
    Matty1965
    2012-01-19

    Thanks. Could you possibly be more specific about what should be removed? I'm using the Modern theme. I've looked ta the fiels but can't obviously see what should be removed.

    Thanks again

     
  • nabber00
    nabber00
    2012-01-20

    Ah, OK, its actually in comments.php.  If you remove these lines that should do it:

                   // show comments
                    echo "<h2>" . $GLOBALS . "</h2>";
                    echo( read_comments( $_GET, $_GET, $_GET, $logged_in ) );
                    echo( '<p />' );

    In 0.7.0 that is around line 80.

     
  • Matty1965
    Matty1965
    2012-01-20

    Hi,

    Thank for that, but unless I am going mad those lines don't exist anywhere in 0.7.0.  I've searched all the files. I tried removing similar lines but that just stopped the actual blog entry showing.

    Thanks

    Marcus

     
  • nabber00
    nabber00
    2012-01-21

    Sorry again, I was looking at the current codebase.  You are looking for this around line 72:

    echo( read_comments( $_GET, $_GET, $_GET, $logged_in ) );

     
  • Matty1965
    Matty1965
    2012-01-21

    Hi,

    Thanks again. I commented out that line, but it seems to do the opposite of what I want - when I click on "view entry" for the blog item now, instead of the blog entry being shown it now just shows:

    Comments
    Comments are not available for this entry.

    What I'd like it to show is the full blog entry, and not show the bit about comments not being available.

    Thanks again.

    Marcus

     
  • Matty1965
    Matty1965
    2012-01-24

    Ok, I've figured this out. I just need to comment the following line towards the bottom of comments.php:

    echo( theme_staticentry( $entry_array ) );

    Marcus