Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthoralpheratz
    • CommentTimeSep 27th 2008
     permalink
    I have had a look at the Wiki, done a search, etc. but can't find an answer to this.

    I want to be able to create entries but I will NEVER have a use for comments, so can I remove/disasble this functionality globally?

    At the least, I'd like to not have an "add a comment" link associated with each entry and to have the "Comments Locked" option checked by default.

    Ideally, this functionality would be disabled.

    Suggestions/comments gratefully accepted.

    Cheers,

    Alph
    •  
      CommentAuthorlaborix
    • CommentTimeSep 27th 2008
     permalink
    First of all, I'm not sure what you mean, but try this:

    Remove in the theme you use in file "entry-default.tpl" these lines like in static.tpl:


    <li class="link-comments">
    <a href="{$id|link:comments_link}#comments">{$comments|tag:comments_number}
    {if isset($views)}(<strong>{$views}</strong> views){/if}</a>
    </li>

    So there is no comment link under each entry. How to disable the comments globaly, I also don't know.
    •  
      CommentAuthoralpheratz
    • CommentTimeSep 28th 2008
     permalink
    Ahh..I see it, thanks.

    This prevents DISPLAY of comments, but I worry that someone familiar with FlatPress could still hit the comments page directly and ENTER them...then I would have a lot of useless, unreadable comments lying around.

    Thanks.

    Alph
    •  
      CommentAuthorNoWhereMan
    • CommentTimeSep 28th 2008 edited
     permalink
    I didn't try this code, but I think it should work:
    save this as fp-plugins/locker/plugin.locker.php then enable Locker from the plugin panel
    Note: this does not actually flag a post as locked. Should you disable this plugin, every entry would become again unlocked.

    <?php
    /*
    Plugin Name: Locker
    Plugin URI: http://www.flatpress.org/
    Description: Locks comments globally
    Author: NoWhereMan (E.Vacchi)
    Version: 1.0
    Author URI: http://www.nowhereland.it
    */

    function plugin_locker_entry() {
    global $smarty;
    $smarty->assign('entry_commslock', true);
    }

    add_action('entry_block', 'plugin_locker_entry');




    as a bonus, this should lock comments after a defined amount of days (useful to fight spam)
    save this as fp-plugins/expire/plugin.expire.php then enable Expire in the plugin panel

    <?php
    /*
    Plugin Name: Expiring Entries
    Plugin URI: http://www.flatpress.org/
    Description: Locks comments globally after a defined amount of days
    Author: NoWhereMan (E.Vacchi)
    Version: 1.0
    Author URI: http://www.nowhereland.it
    */

    function plugin_expire_entry() {
    $MAX_DAYS = 10;
    global $post, $smarty;
    $now = time();
    $date = $post['date'];
    $smarty->assign('entry_commslock', $now-$date > $MAX_DAYS*3600*24);
    }

    add_action('entry_block', 'plugin_expire_entry');

  1.  permalink
    I've added the link to the wiki! :)
    •  
      CommentAuthoralpheratz
    • CommentTimeSep 29th 2008
     permalink
    I'll try it.

    MANY, many thanks for the quick reply.

    Cheers,

    Alph
    •  
      CommentAuthorNoWhereMan
    • CommentTimeSep 29th 2008
     permalink
    Posted By: marcoverga86I've added the link to the wiki! :)


    but are they working? :D
  2.  permalink
    I don't know! I've written (Not tested)...
    •  
      CommentAuthorNoWhereMan
    • CommentTimeOct 23rd 2008
     permalink
    fixed expire: days have 24 hours :p btw working and ass-kicking :D
    •  
      CommentAuthorhobie
    • CommentTimeSep 13th 2010
     permalink
    Great plugin, I was having some trouble with an old entry attracting spam comments. Could the expire plugin be made to change or exclude the "Leave a comment" text, or, when someone clicks on it, show "commenting has been disabled for this post" or something similar?