Like I said in the previous post I installed this mod and it's working great. I use the "must login method" to allow voting! I'm running pligg 9.8.2 with Push It template (Semi custom)
The problem I'm facing is placement of the following code in, wordpress, blogger blogs.
I have a wordpress mod and added the java code into allowing 4 options of placement on a wordpress blog and can only use the top, right and left as the bottom right and left are not placed correctly. Please if you have a moment see this post,
http://forums.pligg.com/general-help...on-please.html
The specific user that is having issues is this blog here,
TownshipVibes.Com :: Linking Zimbabwe Together
As you can clearly see we don't know where to add the code so it counts each blog article single and separate. Right now the're all displaying the same story. When you go to the actual blog aarticle it display perfect seen here,
TownshipVibes.Com :: Linking Zimbabwe Together
Shouldn't one of the following strings of code work for the bloggers index page and where would a blogger add it?
(b) Advanced Method - display single or multiple buttons on a page, each pointing to a different target url:
Code:
<script type="text/javascript">submit_url = 'http://www.targeturl.com';</script>
Code:
<script type="text/javascript" src="http://domain.com/evb/button.php"></script>
As you can also see I'm using wordpress and it's working great, demo,
Blog Engage Blog Like I mentioned I just can't get it to fit Bottom right or left! ( Template issue I think)
This is my blogengage wordpress plugin, it was created from someone else I just edited it so I could use it with this specific mod instead!
Code:
<?php
/*
Plugin Name: WP-Blogengage
Version: 1.0.1
Plugin URI: http://www.1stchoicetraffic.com/blog/
Description: Adds a Blogengage vote button to your posts.
Author: David Hobson
Author URI: http://www.1stchoicetraffic.com/blog/
*/
$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 »"></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="padding: 5px 5px 5px 5px; margin: 0px 0px 0px 0px; float: $float;">
<script type="text/javascript">
submit_url = "$permalink";
</script>
<script type="text/javascript" src="http://blogengage.com/evb/button.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('|<!--sphinnit-->|', $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="padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; float: $float;">
<script type="text/javascript">
submit_url = "$permalink";
</script>
<script type="text/javascript" src="http://blogengage.com/evb/button.php"></script>
</span>
CODE;
}
}
add_filter('the_content', 'blogeng_addbutton', 999);
add_action('admin_menu', 'blogeng_add_menu');
add_action('init', 'blogeng_request_handler');
?>
Does this look ok to you? I'm far from a php pro....
Please if you can take a moment to get a better understanding of my members concerns visit my pligg site forums where I'm getting this information from. maybe reading the posts of my members will help you solve my questions. Our
EVB support topic is found here,
Blog Engage Forums - View topic - Blog Engage External Vote Button Support Donations can be made for any assistance in getting and resolving be's
EVB option
Thanks
bbrian017