Disable comments in general option?

I can not find a setting with which I can disable "Allow Comments". Each new album and photo is always created with "Allow Comments" (checked). There does not seem to be an option. Therefore, I ask where the database is written during the detection for it, so I can set it from current "1" to "0". That would be nice.

Comments

  • acrylian Administrator, Developer

    The comment_form plugin has those general options. If you don't want comments disable the plugin.

  • wibbi Member

    The comment_form plugin is always disable. It was disabled before i run the first detection scan. But, all have a "1" in the database.

  • acrylian Administrator, Developer

    If it is disabled you don't have to care about comments. The value in the database does not matter then naturally. Again the plugin has the general option which of course can be overridden by individual settings that then must be changed individiually.

  • wibbi Member

    So I have to activate the plugin comments and disable the comments, so that a "0" is entered in the database? Well, not very logical.

    Yes, if the plugin is disabled anyway, then no comments can be written anyway, but why then the "1" in the database? OK, maybe because "comments on" is standard.

    Back to my question: I do not want to enable the plugin comments, so I disable the comments, so get a "0" in the database. Okay, you can say that I'm crazy, but I do not care. I would like to know at which point in the code the "1" is written in the database, so that I can make it a "0" to the standard.

  • wibbi Member

    Aha! That's a database table row Standard setting. Set by the setup.php database table create.

    Can you put an option in the setup for "comments" in general on/off? that was nice.

    Question: For what is the column "closecomments"?

  • acrylian Administrator, Developer

    Why, no plugin, no comments… That's for, well, closed comments…

  • wibbi Member
    edited March 2018

    If no further comments are allowed?

    I found that and wonder why the column is created twice?
    /zp-core/setup/index.php

                         if (isset($create[$_zp_conf_vars['mysql_prefix'] . 'albums'])) {
                                $db_schema[] = "CREATE TABLE IF NOT EXISTS $tbl_albums (
    ...
            `commentson` int(1) UNSIGNED NOT NULL default '1',
    
    ...
    ...
                            $sql_statements[] = "ALTER TABLE $tbl_albums ADD COLUMN `commentson` int(1) UNSIGNED NOT NULL default '1';";

    Same for columns "pages" and "news".

  • acrylian Administrator, Developer
    edited March 2018

    If no further comments are allowed?

    Keep existing but don't allow more.

    Setup also includes lots of db code for updates from older versions.Can't answer such questions without digging into code which I lack a bit the time right now.

  • vincent3569 Member, Translator

    hi
    to manage comments you can:

    • disable comment_form plugin: you never have comments everywhere (neither enabled nor shown).
    • enable comment_form plugin and enable/disable comments for each kind of items (albums, images, news, pages) in admin>options>plugins>comment_form
      if a kind of items is disabled: you never have comments on that kind of item (neither enabled nor shown).

    • enable comments on each items (an album, an image, a news or a page)
      of course if the relevant kind of item is disabled, enable comments for an item has no effect.
      on official themes, if you disable comments on an item and there is no comments, comment form is shown as closed (on my themes, comment form is not shown, but it is my own design choice).
      if you disable comments on a item after a while and there is some comments, comment form is shown as closed, but comments are shown and nobody can add new comments.

Sign In or Register to comment.