My EVB

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #171 (permalink)  
Old 01-26-2008, 06:50 AM
New Pligger
 
Join Date: Mar 2007
Posts: 11
hi , i see you got this to work. could you please share with me how u managed to do it. i am having same problem withonly "go" appearing instead of the count on the EVB. thanks!


Quote:
Originally Posted by jrothra View Post
I've got the EVB placed on my blog, but noticed a few things.

1. The large container says "Go" - I found this in the code of url.php, but the demo uses numbers. Does it say "Go" until the story is submitted?

2. Submitted story still says "Go" - I have submitted one of my blog articles that has the EVB on it.
Blog URL: Salvation’s Call (Rom 10:13)
FaithTag Submission URL: FaithTag - Mission Accomplished: Not Really

As you can see, the story has been voted on three times, yet the EVB shows "Go" in the box.

It seems there's something I'm not understanding or missing.
Reply With Quote
  #172 (permalink)  
Old 01-27-2008, 03:08 AM
NeoSys's Avatar
Pligg Donor
Pligg Version: Modified 9.9
Pligg Template: Custom
 
Join Date: Sep 2007
Location: San Juan, PR
Posts: 26
Send a message via Skype™ to NeoSys
Hi great work and I have nver had a problem with it since day one. I do have a question I have what I think is the latest code but I can not find the Auto Vote variable. Is this still an option or was it removed from the code.
Reply With Quote
  #173 (permalink)  
Old 01-27-2008, 06:54 AM
Constant Pligger
Pligg Version: 9.9.0
Pligg Template: yget
 
Join Date: Jan 2008
Posts: 159
if a websites story URL is like

Code:
domain.com/modules.php?name=News&file=article&sid=42&mode=thread&order=0&thold=0
When submitting it cuts the URL address to

Code:
domain.com/modules.php?name=News

any help with this..??
Reply With Quote
  #174 (permalink)  
Old 01-27-2008, 02:57 PM
Constant Pligger
Pligg Version: 9.9.0
Pligg Template: yget
 
Join Date: Jan 2008
Posts: 159
/bumpy
Reply With Quote
  #175 (permalink)  
Old 01-28-2008, 04:55 PM
Constant Pligger
Pligg Version: 9.9.0
Pligg Template: yget
 
Join Date: Jan 2008
Posts: 159
Quote:
Originally Posted by sefs View Post
I find that it breaks genearally with complex urls, which is most cms systems like joomla ect.

Attached are files for the developer to preview.

What I think is happening is that URL encoding is not being done correctly or consistently or in the right places.
You know I have the same problem, but I don't think its evb.. Because I had it before with the regular bookmarklet.. also.

I think somewhere when it gets to the submission process..


Any help with this.. let me know if you want to test something..

go to gamingdd.com and select a news story and bookmark to igameit

you will see how the URL gets stripped once its on the submit process page, but if you like at the address bar it shows..??

here is the code.

The Bookmarklet code

Quote:
javascript:q=(document.location.href);void(open('h ttp://igameit.com/submit.php?url='+escape(q),'','width=880px,height= 500px,status=0,location=0,resizable=1,scrollbars=1 ,left=0,top=100'));
Help Help.. Please..
Reply With Quote
  #176 (permalink)  
Old 01-29-2008, 12:30 AM
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 804
I installed this mod, and it's working great!

9.8.2

Thanks
Reply With Quote
  #177 (permalink)  
Old 01-30-2008, 07:13 PM
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 804
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 &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="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

Last edited by bbrian017; 01-30-2008 at 07:21 PM.
Reply With Quote
  #178 (permalink)  
Old 01-30-2008, 10:22 PM
New Pligger
 
Join Date: Jan 2008
Posts: 29
Is this mod 9.9.0 compatible?
Reply With Quote
  #179 (permalink)  
Old 01-31-2008, 05:47 AM
Constant Pligger
Pligg Version: 9.9.0
Pligg Template: yget
 
Join Date: Jan 2008
Posts: 159
I Have been at it all night, as to why complex url from CMS gets cut.

I solved a little issue and that if you add
this
Code:
submit_url=encodeURIComponent(submit_url);
in button.php right below function
It will actually put the whole address in the button instead of returning half of it., but my problem still remains.

why does pliggit.php

Code:
<?php

include('config.php');
include(mnminclude.'html1.php');

// is user logged in?
if(anonymous_vote == "false") {
	force_authentication();
}

//other needed info
$userid = $current_user->user_id;
//$url = preg_replace('&', "&amp;", $_GET['url']);
$url = htmlspecialchars($url);

$url1 = ""; $url2 = "";
$slash_check = substr($url, -1);
if($slash_check == '/') {
	$url1 = substr($url, 0, -1);
	$url2 = $url;
} else {
	$url1 = $url;
	$url2 = $url."/";
}

// has story been submitted yet?
$url1 = @mysql_real_escape_string($url1);
$url2 = @mysql_real_escape_string($url2);
$link_query = mysql_query("SELECT link_id FROM " . table_links . " WHERE (link_url=\"$url1\" OR link_url=\"$url2\") AND (link_status='published' OR link_status='queued') LIMIT 1");
$link_rows = mysql_num_rows($link_query);

echo "$url";

/*
if($link_rows == 0) {
	//redirect to submit page
	header('Location: submit.php?url='.$url);
	exit();
} else {
	//vote and then redirect to story page
	$value = 10; 
	if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
		$ip = strip_tags($_SERVER['HTTP_X_FORWARDED_FOR']);
		$ip = @mysql_real_escape_string($ip);
	} else {
		$ip = strip_tags($_SERVER['REMOTE_ADDR']);
		$ip = @mysql_real_escape_string($ip);
	}
	if(ip2long($ip) === FALSE || ip2long($ip) == -1) {
		header('Location: story.php?id='.$link_id);
		exit();
	} else {
		while($link = mysql_fetch_array($link_query)) {
			$link_id = @mysql_real_escape_string($link['link_id']);
		}
		if(anonymous_vote == "false") {
			$vote_check = mysql_query("SELECT vote_id FROM " . table_votes . " WHERE vote_link_id=\"$link_id\" AND vote_user_id=\"$userid\" AND vote_type='links' LIMIT 1");
		} else {
			$vote_check = mysql_query("SELECT vote_id FROM " . table_votes . " WHERE vote_link_id=\"$link_id\" AND vote_ip=\"$ip\" AND vote_type='links' LIMIT 1");
		}
		$vote_rows = mysql_num_rows($vote_check);
		if($vote_rows == 0) {
			if($vote_update1 = mysql_query("INSERT INTO " . table_votes . " (vote_type,vote_link_id,vote_user_id,vote_value,vote_ip) VALUES ('links','$link_id','$userid','$value','$ip')")) {
				$vote_update2 = mysql_query("UPDATE " . table_links . " SET link_votes=link_votes+1 WHERE link_id=\"$link_id\"");
			}
		}
		header('Location: story.php?id='.$link_id);
		exit();
	}
}
*/
?>
transforms the code in half.

The url you provided for pliggit.php is as follows.

Code:
http://domain.com/pliggit.php?url=http://altf4.rodtrucks.com/modules.php?name=News&amp;file=article&amp;sid=6
but the code returned in pliggit is

Code:
http://altf4.rodtrucks.com/modules.php?name=News

Any expert help on this?? Please Please Thanks
Reply With Quote
  #180 (permalink)  
Old 02-25-2008, 05:19 PM
Casual Pligger
Pligg Version: 9.5
Pligg Template: yget modified
 
Join Date: Apr 2007
Posts: 43
Any Ideas why my Button don't count anonymous votes?
My pliggit.php settings
Quote:
// is user logged in?
if(anonymous_vote == false) {
force_authentication();
}
Quote:
//vote and then redirect to story page
$value = 10;
$ip = strip_tags($_SERVER['REMOTE_ADDR']);
while($link = mysql_fetch_array($link_query)) {
$link_id = $link['link_id'];
}
if(anonymous_vote == true)
I have also allowed anonymous votes in the admin center.
Reply With Quote
Reply

Thread Tools
Display Modes




Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development