Forums

None of the php plug-ins work with democracy poll (11 posts)

  1. drvs
    Member
    Posted 6 years ago #

    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.)

  2. Max Evans
    Member
    Posted 6 years ago #

    It works if you put it on the sidebar. I've never tried putting it in posts. But the sidebar works perfectly.

  3. Silkjaer
    Member
    Posted 6 years ago #

    you cant call a template tag from a post

  4. drvs
    Member
    Posted 6 years ago #

    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...

  5. Max Evans
    Member
    Posted 6 years ago #

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

  6. drvs
    Member
    Posted 6 years ago #

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

    <phpcode>
    <?php jal_democracy(); ?>
    </phpcode>

    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?

  7. Max Evans
    Member
    Posted 6 years ago #

    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 jalenack@gmail.com for support.

  8. drvs
    Member
    Posted 6 years ago #

    Thanks, XoLoX, but I'd already tried that -- nothing shows up that way.

    I'll e-mail jalenack.

  9. tanster
    Member
    Posted 6 years ago #

    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:

    <phpcode>
    <?php jal_democracy(1); ?>
    </phpcode>

    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

  10. davidchait
    Member
    Posted 6 years ago #

    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.

    -d

  11. drvs
    Member
    Posted 6 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags