Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Addon help: CommentProtection

edited January 2007 in Vanilla 1.0 Help
I am playing around with the CommentProtection addon in hopes of building my own addon in the future. However, on my install of Vanilla and CP I seem to be getting a bug. When I press the "block user" or "block comment" everything works fine, however when I refresh the page or return later the comments are no longer blocked yet the buttons indicate that the comments should be blocked. Any incite would be helpful. Thanks, Nick

Comments

  • Options
    Heh, here we go again. This is not your fault Nick.d, this is what I believe is the single most confusing extension thing in Vanilla and *NEEDS* to be changed.

    See here.
  • Options
    Stash, I think Nick.d is talking about something else, this is about the lack of persistance of the block.

    So, am I correct in thinking that you end up getting comments which aren't blocked anymore but still have an 'unblock comment' links? That is weird, I know that the blocks aren't very persistant, but they usually stay a bit longer, and when they expire, the (un)block link reverts along with the block.
  • Options
    Ah, my bad.
  • Options
    Yeah, I was not refering to the confusing "block" terminology. Yes, my problem is what you mention bjrn, except that it is not persistant at all. The first and subsequent refreshes or hitting the Discussion tab and then returning to the thread; all the posts revert back to their original format, regardless of the fact it is tagged as blocked.
  • Options
    Yeah, I'm afraid I can't really help. I know Mark knows about the issue, but you might want to remind him when he gets back.
  • Options
    Well, I almost have it working as I need. However, I am having trouble accessing the commentbody_x by javascript. Any ideas?
  • Options
    NickENickE New
    edited January 2007
    if this is js printed by a php extension you should just print out the comment id for it (eg. echo '<a href="#" onclick="getbody(\''.$Comment->CommentID.'\');">click me</a>';, or however it should be...), if not then you'd probably just want to do a little dom traversal.
  • Options
    edited January 2007
    My problem was where I was calling the JS function. What I need to do now is go through the comments and check whether they should be "blocked". Any tips as to where I can see examples of this, or any tutorial type materials. Thanks for the replies.
This discussion has been closed.