Support » Plugins » None of the php plug-ins work with democracy poll

  • I’ve been pulling my hair out trying to get the democracy poll to show up in my posts. I’ve tried RunPHP, PHPExec, and WP-Exec, and none of them will make that php execute inside the post. No matter which one I try, the php just sits there in the post, inert:

    <?php jal_democracy(2); ?>

    (The democracy plugin itself seems okay; I’ve been able to create a poll, etc.)

Viewing 10 replies - 1 through 10 (of 10 total)
  • It works if you put it on the sidebar. I’ve never tried putting it in posts. But the sidebar works perfectly.

    you cant call a template tag from a post

    Yes, that’s why I’ve been trying RunPHP, PHPExec, and WP-Exec — those plug-ins are designed to allow php to be run from inside a post.

    In the documentation for Democracy, the developer suggests using one of those plug-ins to enable a Democracy poll to be placed in a post. But nothing works…

    It should work with the plugins. I ran the Poll Archives tag inside a page with the PHPExec plugin.

    XoLoX, this is what I’m entering in my post (with PHP Exec and Democracy both activated):

    <?php jal_democracy(); ?>

    With that, all that happens is that the page, when published, gets screwed up and the text content of the poll prints out along with all the tags and stuff, like raw code. Any ideas?

    Okay, I gotcha… you’re using the PHPExec plugin.

    Only put

    <?php jal_democracy(); ?>

    That code.. – the other tags. it should work fine. It works for me anyway. I had to make sure first before I said.

    If it doesn’t work, email for support.

    Thanks, XoLoX, but I’d already tried that — nothing shows up that way.

    I’ll e-mail jalenack.

    drvs, I got Democracy to work with PHPExec (and WordPress 2).

    In your WordPress dashboard, choose Options > Writing, and then make sure that the “Users should use the visual rich editor by default” checkbox is unchecked.

    Then add your Democracy code in a post:

    <?php jal_democracy(1); ?>

    Keep in mind, though, that switching back to the visual rich editor will mess up your PHP code. So if you regularly use Democracy in your posts, you may need to give up the visual rich editor.

    (If I’m wrong about this, someone please correct me!)

    🙂 Jennie

    If the function call is that simple, note that CG-QuickPHP was designed for just this sort of use.

    <quickphp jal_democracy(1); />

    Quick-PHP is fast given it only executes a single inlined function call — but that’s its limitation as well. 😉

    I had tested it with 2.0 way back when, don’t know what the rich editor does to tags it doesn’t know about.

    You can grab CG-QuickPHP (and other plugins) from my site.


    Thanks, Jennie, but I’m using WordPress 1.5.2. Do you know what the similar option is in this version?

    Thanks, David, I’ll check it out!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘None of the php plug-ins work with democracy poll’ is closed to new replies.