I seem to be really missing something regarding this module. This module is exactly what I've been looking for and I am excited to use it. Also, must appreciation for taking the time to create this and contribute it to the community.

I don't understand how to actually implement this module. I have followed the directions, by installing the module. I configured a threshold of 0 to test the module. I added the code to my comment.tpl.php file as well as my node.tpl.php

One thing I do not know what to do with is the "Apply the "best karmic vote" system to...:" setting. Is this setting crucial in order for the module to work? Because I do not have any categories on my site, therefore none selected. I created a category and tried to enable it, but this didn't do anything. Although, there is a good chance I didn't make a category that actually meant anything...

Any guidance would be much appreciated, thanks in advance!

[Attached: comment.tpl.php & node.tpl.php]

Comments

vm’s picture

did you install voting mechanism? if so which one ?

CWitt-1’s picture

Yes, I installed Extra Voting Forms provided by Merc. I am able to actually vote on the individual comments, however I would like to promote and bury them.

Thank you for the quick reply!

mercmobily’s picture

Hi,

I actually wrote a reply to this, but I must have previewed it rather than posting it... sorry!

This module was actually written to be used in forums. However, I realise now that it could be more generic.

Are you trying to use the burying abilities of this module, more than anything else? Or do you want to do the promotion AND the burying?

Let me know, because I will change it... pretty much for you.

Bye,

Merc.

CWitt-1’s picture

Written to be used in the forums... I see. Well what I am trying to do is use your module to bury the horrible comments, not so worried about generally bad ones. But that isn't really my concern. What I am looking to do is promote the best comment.

Ideally a user submits an article. Mods publish articles. User that submits (author) has voting bonus of a substantial amount, therefore if they vote for a particular comment it is deemed best comment. However, if author does not vote then users will determine best answer.

I was able to get the burying abilities to work, its just setting a threshold or timeframe for best comment. And also displaying the best comment.

I'm unsure if my ramblings are coherent, but please let me know if they are not so I can clarify.

Thanks in advance!

chadchandler’s picture

Essentially you are looking for what what happens on "Digg", to where a negative vote is "collapsed" and of course the cool Slide In/Out/Opacity effects? This would be very cool!

CWitt-1’s picture

Something like Digg, but not so much with content, rather with the comments. Merc actually has made a Digg replicate for Drupal called Drig.

http://www.drigg.org/

I'm not really looking for that, although I could possibly use it.

chadchandler’s picture

Thats what I was referring too, the Digg comments burying.

mercmobily’s picture

Hi,

The burying of comments in Drigg is rather complicated. They use Javascript to actually fetch buried comments if the users wish to see the buried ones. Sorry, that's not happening anytime soon -- sorry...

Consider that this module is on its way to be unsupported... I don't think anybody really uses it, and a very advanced management of comments is really up to Drupal, more than a module like mine...

What I can do, is make it possible for the module to work on ANY comment regardless of the category of the parent node... would that help?

Merc.

vm’s picture

merc,

I think the addition of that feature would be a good one. Not everyone uses forums but would still like to promote or bury comments and if the module limits itself to the forums, then they are forced to use the forum.module.

chadchandler’s picture

I've actually been doing something innovative.
1. making node comments.
2. using views bookmarks
3. when user "bookmarks" a node(comment) as "bury",they will never see the comment again because in views you can select to see or NOT to see bookmarked nodes.

To get the slide in/out /opacity change , need to have a limited knowledge of Jquery. Hope it made sense, just goes to show how some modules we already have can be used for neat things.

CWitt-1’s picture

I really appreciate the help. However, I have the bury the comments feature working. It works great. I'm not too concerned with collapsing the comment and re-opening it as Prodigy requested.

I on the other hand am trying to understand how promoting works. On another issue Merc stated

"the module is used to find the best voted comment. It won't sort them by votes, and won't promote the "parent". It will just, simply, promote the node with the most votes.

How do you see this promoted node. I have comments with votes, but nothing ever gets promoted. Am I missing a threshold or a duration somewhere?

Thanks in advance!

As a side note - I don't know why more people don't use this module, it's simply great!

mercmobily’s picture

Hi CWitt,

If you add this to line 535 of comment_bury_promote.module:

$in_there=TRUE;

Basically, it needs to be just above that:

if($in_there){

...if you do that, does the module do exactly what you want it to do?

Merc,

CWitt-1’s picture

I went ahead and did this:

    // After this, $in_there is set to TRUE if and only if
    // the article has a term IN the list of the "hot" terms
    // for which the "best comment" will be displayed  
    $in_there=FALSE;
    $yes_list=variable_get('comment_bury_promote_best_comment_vocabulary', '');
    $node_terms = taxonomy_node_get_terms($node->nid);
    foreach($node_terms as $term_value){
      if(in_array($term_value->tid,$yes_list)){
	  if($in_there){
	$in_there=TRUE;
        break;
      }
    }

It still didn't change anything on the site. The site is http://www.brewerslogo.org/spending if you would like to see for yourself.

Thanks for the help, I really appreciate it.

CWitt-1’s picture

StatusFileSize
new3.33 KB

I realized I misread what you stated. So I tried this:

    // After this, $in_there is set to TRUE if and only if
    // the article has a term IN the list of the "hot" terms
    // for which the "best comment" will be displayed  
    $in_there=FALSE;
    $yes_list=variable_get('comment_bury_promote_best_comment_vocabulary', '');
    $node_terms = taxonomy_node_get_terms($node->nid);
    foreach($node_terms as $term_value){
      if(in_array($term_value->tid,$yes_list)){
        $in_there=TRUE;
        break;
      }
    }
	$in_there=TRUE;
    // OK, the best comment DOES need to be displayed!
    if($in_there){
      comment_bury_promote_add_best_vote($node);

However, this also did not work. After reading the comment stated above the function it made me wonder about an option listed on the config page. On the apply "best karmic vote system to" I do not have anything selected, because I do not have any categories [see attached screen shot]. I am new to Drupal and do not understand the power or relevance of categories... Perhaps this is the issue at hand? I will try to work with it to see if I can get anything to work.

Thanks for the patience...

mercmobily’s picture

Hi,

I am sorry, I am really stupid.
Can you please add that extra command to line 422, which is actually the right spot?
This will bypass the fact that you haven't selected anything. If it works for you, I will add a checkbox to the module that will make this hack unnecessary.

Bye,

Merc.

CWitt-1’s picture

I went ahead and put it in line 422, this also did not work. After looking at the loop and deciding I didn't really care if the loop was always true I placed the code above the loop on line 419. This seems to work! Here's the code:

  // OK, the best comment DOES need to be displayed!
  $in_there=TRUE;
  if($in_there){

    // Check if this category actually should get the best vote bit
    $comment=comment_bury_promote_best_comment_for_node($node);
    #drupal_set_message("Best comment: $comment->cid");

    // There is no "best" comment
    // 
    if($comment == NULL){
      return variable_get('comment_bury_promote_best_no_comment', '');
    }

    // There is a best comment!
    return   variable_get('comment_bury_promote_best_comment_html_b', '') . 
             theme('comment_view', $comment).
             variable_get('comment_bury_promote_best_comment_html_a', '');
  }

Thank you for working with me on this issue!

mercmobily’s picture

Hi,

alright... so if I put a checkbox, which basically means "always accept it", you'd be totally happy with it and the module would work for you... right?

Bye!

Merc.

CWitt-1’s picture

Yes, I think that would work great. Also another work around I used in order for best comments not to appear on pages or nodes that I didn't want comments on was being leaving the "No best comment" display blank!

Thanks for all the help Merc!

mercmobily’s picture

Status: Active » Fixed

Hi,

OK, this is done and tested.

Bye,

Merc.

mercmobily’s picture

Status: Fixed » Closed (fixed)