bbPress

Simple, Fast, Elegant

bbPress plugin browser »

PollDaddy for bbPress (1.0.3)

Download

Version: 1.0.3

Other Versions

Last Updated: 2008-9-22

Requires bbPress Version: 0.9 or higher

Compatible up to: 1.0-alpha-2

Author Homepage »

Plugin Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(0)

Your Rating

Author: Sam Bauers

This plugin allows forum users to insert polls from Polldaddy.com into their posts using a simple "shortcode" tag.

The administrator can also set what user types can add polls and whether or not to allow polls on more than the first post in a thread.

The shortcode to use for polls is:

[polldaddy poll=1234567]

... where 1234567 is replaced with the unique poll code generated by PollDaddy.


  1. i get this error in the admin area...

    Call to undefined function bb_uri() in /bbpress/my-plugins/polldaddy-for-bbpress.php on line 134

    Posted: 2 months ago #
  2. @gimperdaniel

    Will fix it ASAP

    Posted: 2 months ago #
  3. @gimperdaniel

    Should be fixed in version 1.0.3

    Posted: 2 months ago #
  4. thanks for fixing it!

    Posted: 2 months ago #
  5. so i dont get that previous error anymore but I get this one now..

    Class 'WP_User' not found in...polldaddy-for-bbpress.php

    I have a custom theme, I don't know if that has anything to do with the error and I also have bbpress and wordpres working together.

    Posted: 2 months ago #
  6. I managed to get it to work under 0.8.3.1 by changing this function as follows:

    function bb_polldaddy_preg($post_text, $post_id)
    {
    	global $bb_polldaddy_options;
        global $bb_current_user;
    
    	$callback = 'bb_polldaddy_get_poll_script_callback';
    
    	if ($bb_polldaddy_options['first_only'] && !bb_is_first($post_id)) {
    		$callback = 'bb_polldaddy_first_only_error_handler';
    	}
    
    	if (!$user_id = get_post_author_id($post_id)) {
    		$callback = 'bb_polldaddy_permission_error_handler';
    	}
    
    	if ($bb_polldaddy_options['permission'] && !$bb_current_user->has_cap($bb_polldaddy_options['permission'])) {
    		$callback = 'bb_polldaddy_permission_error_handler';
    	}
    
    	$post_text = preg_replace_callback('@\[polldaddy poll=(?:"|\')?([0-9]+)(?:"|\')?\]@', $callback, $post_text);
    	return $post_text;
    }

    I also added this function to the plugin, since my bbPress version doesn't have it:

    if ( !function_exists( 'checked' ) ) :
      function checked( $checked, $current) {
          if ( $checked == $current)
              echo ' checked="checked"';
      }
      endif;

    Works well after I made those changes. (I can't upgrade to 0.9 yet because of the wordpress/mediawiki integration)

    Posted: 1 month ago #
  7. musnake

    Member

    This works great in WP2.6.2 + bbPress 1.0a2.

    I hadn't even heard of polldaddy!
    Thanks.

    Posted: 1 month ago #

RSS feed for this topic

Add a Comment

You must log in to post.

Code is Poetry.