EVB - External Vote Button

Discussion in 'Programming' started by bbrian017, Apr 29, 2010.

  1. #1
    Does anyone know why my vote button doesn't get pushed down when the subscribe options show up on this members blog?

    [​IMG]

    http://geekcom.org/marketing-website-development/using-youtube-for-targeted-traffic/

    See the green vote button that is mine from blogengage I am the owner.

    I'm wondering what the other plugin do differently in order to move down when that subscribe option pops up.

    I'm willing to pay for help if anyone thinks they can revamp my plugin to work better please contact me or reply here if you just know the answer and want to help.

    This is the plugin code.

    <?php
    
    /*
    
    Plugin Name: WP-Blogengage
    Version: 1.0.2
    Plugin URI: http://www.blogengage.com/profile_promo.php
    Description: Adds a Blogengage vote button to your posts.
    
    
    Author: Blog Engage
    Author URI: http://www.blogengage.com
    */
    
    $message = "";
    
    if (!function_exists('blogeng_request_handler')) {
        function blogeng_request_handler() {
            global $message;
    
            if ($_POST['blogeng_action'] == "update options") {
                $blogeng_align_v = $_POST['blogeng_align_sl'];
    
        		if(get_option("blogeng_box_align")) {
        			update_option("blogeng_box_align", $blogeng_align_v);
        		} else {
        			add_option("blogeng_box_align", $blogeng_align_v);
        		}
    
                $message = '<br clear="all" /> <div id="message" class="updated fade"><p><strong>Option saved. </strong></p></div>';
            }
        }
    }
    
    if(!function_exists('blogeng_add_menu')) {
        function blogeng_add_menu () {
            add_options_page("Blogengage Options", "Blogengage Options", 8, basename(__FILE__), "blogeng_displayOptions");
        }
    }
    
    if (!function_exists('blogeng_displayOptions')) {
        function blogeng_displayOptions() {
    
            global $message;
            echo $message;
    
    		print('<div class="wrap">');
    		print('<h2>Blogengage Options</h2>');
    
            print ('<form name="blogeng_form" action="'. get_bloginfo("wpurl") . '/wp-admin/options-general.php?page=wp-blogengage.php' .'" method="post">');
    ?>
    
    		<p>Align:
            <select name="blogeng_align_sl" id="blogeng_align_sl">
    			<option value="Top Left"   <?php if (get_option("blogeng_box_align") == "Top Left") echo " selected"; ?> >Top Left</option>
    			<option value="Top Right"   <?php if (get_option("blogeng_box_align") == "Top Right") echo " selected"; ?> >Top Right</option>
    			<option value="Bottom Left"  <?php if (get_option("blogeng_box_align") == "Bottom Left") echo " selected"; ?> >Bottom Left</option>
    			<option value="Bottom Right"  <?php if (get_option("blogeng_box_align") == "Bottom Right") echo " selected"; ?> >Bottom Right</option>
    			<option value="None"  <?php if (get_option("blogeng_box_align") == "None") echo " selected"; ?> >None</option>
    		</select><br /><br /> </p>
    
    <?php
    		print ('<p><input type="submit" value="Save &raquo;"></p>');
    		print ('<input type="hidden" name="blogeng_action" value="update options" />');
    		print('</form></div>');
    
        }
    }
    
    
    if (!function_exists('blogeng_blogengagehtml')) {
    	function blogeng_blogengagehtml($float) {
    		global $wp_query;
    		$post = $wp_query->post;
    		$permalink = get_permalink($post->ID);
            $title = urlencode($post->post_title);
    		$blogengagehtml = <<<CODE
    
        <span style="margin: 0px 6px 0px 0px; float: $float;">
    
    	<script type="text/javascript">
    	submit_url = "$permalink";
    	</script>
        <script src="http://blogengage.com/evb/button4.php"></script>
    	</span>
    CODE;
    	return  $blogengagehtml;
    	}
    }
    
    
    if (!function_exists('blogeng_addbutton')) {
    	function blogeng_addbutton($content) {
    
    		if ( !is_feed() && !is_page() && !is_archive() && !is_search() && !is_404() ) {
        		if(! preg_match('|<!--blogengage-->|', $content)) {
        		    $blogeng_align = get_option("blogeng_box_align");
        		    if ($blogeng_align) {
                        switch ($blogeng_align) {
                            case "Top Left":
            		              return blogeng_blogengagehtml("left").$content;
                                  break;
                            case "Top Right":
            		              return blogeng_blogengagehtml("Right").$content;
                                  break;
                            case "Bottom Left":
            		              return $content.blogeng_blogengagehtml("left");
                                  break;
                            case "Bottom Right":
            		              return $content.blogeng_blogengagehtml("right");
                                  break;
                            case "None":
            		              return $content;
                                  break;
                            default:
            		              return blogeng_blogengagehtml("left").$content;
                                  break;
                        }
                    } else {
            		      return blogeng_blogengagehtml("left").$content;
                    }
    
        		} else {
                      return str_replace('<!--blogengage-->', blogeng_blogengagehtml(""), $content);
                }
            } else {
    			return $content;
            }
    	}
    }
    
    if (!function_exists('show_blogengage')) {
    	function show_blogengage($float = "left") {
            global $post;
    		$permalink = get_permalink($post->ID);
    		echo <<<CODE
    
        <span style="margin: 0px 6px 0px 0px; float: $float;">
    
    	<script type="text/javascript">
    	submit_url = "$permalink";
    	</script>
        echo '<script src="http://blogengage.com/evb/button4.php"></script>';
    	</span>
    CODE;
        }
    }
    
    add_filter('the_content', 'blogeng_addbutton', 999);
    add_action('admin_menu', 'blogeng_add_menu');
    add_action('init', 'blogeng_request_handler');
    
    ?>
    Code (markup):


    Thanks,

    Brian
     
    bbrian017, Apr 29, 2010 IP
  2. Ascendancy

    Ascendancy Active Member

    Messages:
    1,721
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    90
    #2
    Just by chance, are you running this module through the Pligg system?
     
    Ascendancy, Apr 29, 2010 IP
  3. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #3
    Yes it's based of pligg but not included with pligg I had a friend custom code it.

    So I need help making it work properly especially with that rss subscribe plugin like in the link I showed.
     
    bbrian017, May 6, 2010 IP