• Hi,
    I’d like to open comments on items.
    The problem is that comments are closed by default into catablog source code, CataBlogItem.class.php, line 477:

    else {
    			$params['post_status']    = 'publish';
    			$params['comment_status'] = 'closed';
    			$params['post_type']      = $this->_custom_post_name;

    I found a solution with phpmyadmin to “open” comment into the database (by changing the comment_status into the wp_post table) but i don’t want to manually do this for each item.
    Of course i could hack the php code of this class but this will disappear if i ugrade catablog in the future.

    I also tried to use a single-catablog-items.php and added this :

    $withcomments = true;
    	comments_template();

    But it does not work.

    Any idea ?
    Thanks a lot.

    https://wordpress.org/plugins/catablog/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi, can you give me an example of what you are trying to do? Maybe provide a screen capture with your request.

    Thank you

    Hi, I found a link in the plugins website forum that will help you with your question.

    Reference to working with the single catablog files can be found here.

    Let me know how you go.

    Regards

    Thread Starter Marceau

    (@marceau)

    Hi,

    thanks for the link, i saw it already but it does not work.
    I read :

    The single page per image feature allow you to create a “page” with its own permalink and its own comment thread.
    […]
    As far as getting comments to work on that single page, it should work if you have support for comments in your theme’s single.php file

    So i tried to copy my single.php to single-catablog-items.php. My theme does support comments BUT when catablog creates an item, this item is created with comments OFF.

    My question is : How can i turn this ON (without hacking CataBlogItem.class.php wich is a really ugly solution) ?

    Because :
    – Catablog creates some kind of hidden wp-posts.
    – Comments are activated by default in all my ‘regular’ posts in wordpress backoffice but not with the ones created by catablog.

    Unfortunately this is something that I have been trying to workout myself. In the link I share above there is a solution although you really have to play around with the PHP code to get it to work correctly. Another site you might like to ask this question is Stack Overflow. They are always available to assist anyone with a WordPress PHP issue.

    If you find a solution you might like to share it here just in case someone else has the same problem.

    Kind regards

    Thread Starter Marceau

    (@marceau)

    Ok,
    does the owner of this plugin is reading this support forum ? I’ve tried to post a comment on his blog but he doesn’t answers 🙁
    In case this can we usefull to someone, here’s the SQL query to re-open comments on existing catablog posts only :

    UPDATE “PUTYOURDATABASENAME”.”wp_posts” SET “comment_status” = “open” WHERE “wp_posts”.”post_type” = “catablog-items”

    Of course you will need to replacethe ‘wp_’ part if needeed.
    Also replace the double ” with simple ones.

    I am not sure if the plugin Author is reading this forum. I do know that he is very busy. I help out as much as I can.

    Thank you for sharing your solution. Is this currently working for you?

    Thread Starter Marceau

    (@marceau)

    Too bad the author does not come here because this plugin is really great.

    Yes it works but it’s not handy since i have to run this request after each new added item.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem with comments on Items’ is closed to new replies.