Solving the problem of the Simple Karma module for Drupal 5.x

    Many who use the Simple Karma module (for Drupal 5.x) encountered the following problem: when casting a vote for any material / comment, the module’s functionality worked out (that is, the vote counted), but the value on the page was not updated dynamically (but only updated after reloading the page).

    It seems that I managed to find a solution to this problem. Although its nature is still not clear to me (if someone knows what’s the matter, tell me).

    in the file simple_karma.js we find the line number 171:
    $ ("#" + did + "span.karma_score"). Text (args.karma_aggregate);
    in it the new meaning of “karma” is written into the element.
    As I already said, the functional completely fulfills correctly, but the new value is not written to the output stream.
    replace it with a line of the form:
    $ ("#" + did + "span.karma_score"). text ("" + args.karma_aggregate);

    And everything works as it should.

    Also popular now: