Subscribe to
Posts
Comments
NSLog(); Header Image

Democracy Needs an Update for WordPress 2.5

The Democracy (voting) plugin needs an update from 2.0.1 for WordPress 2.5. The un-edited 2.0.1 leaves a lot of "n" characters (presumably from the "\n" characters in the source files) in posts. Per the later comments on the page, removal of all "\n" from the two files class.php and democracy.php is a temporary work-around.

Here's to hoping the authors of such plugins aren't abandoning them. My plugins still work and I still use both on several sites.

4 Responses to "Democracy Needs an Update for WordPress 2.5"

  1. My fix for the problem was to open democracy.php, find the line

    return preg_replace('/{democracy[\w\W\s^}]*?}/', '\n\', $content);

    and replace it with

    return preg_replace('/{democracy[\w\W\s^}]*?}/', '\', $content);

    The comment says the divs are added to maintain valid HTML, but I passed (http://the.jhu.edu/ccs/?page_id=27) through http://validator.w3.org/ and it still validates so I suppose my fix doesn't break anything.

  2. Hmm, it looks like part of the code was snipped away. Well, if you look for this line in democracy.php

    function jal_add_dem_div($content)

    you will see the offending \n. Just remove it. There's only one \n in that function.

  3. Awesome. Thanks for the fix.

  4. the fix in function jal_add_dem_div($content) worked a treat ! Cheers.


Comments RSS

Leave a Reply


Warning: Undefined variable $user_ID in /var/www/vhosts/nslog.com/httpsdocs/wp-content/themes/nslog/comments.php on line 96

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.