My EVB

Register an Account
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 03-25-2007, 08:31 PM
Iceburg's Avatar
Pligg Donor
 
Join Date: Sep 2006
Posts: 85
Send a message via ICQ to Iceburg Send a message via AIM to Iceburg Send a message via MSN to Iceburg Send a message via Yahoo to Iceburg
I don't see any javascript in url.php, I have:

Code:
<?php

header('Content-Type: text/html; charset=UTF-8');
if(empty($_GET['url'])) die;

include('../config.php');

$web1 = 'FeedTheBull.com';
$web2 = 'Feed!';
$server = $my_base_url.$my_pligg_base;

$url = htmlspecialchars(strip_tags($_GET['url']));
$query = mysql_query("SELECT link_id,link_votes FROM " . table_links . " WHERE link_url=\"$url\" AND (link_status='published' OR link_status='queued') LIMIT 1");
$res = mysql_num_rows($query);

?>

<style type="text/css">
<!--
.wrap {background:url(/evb/img/vote-01.png) no-repeat 0 0;position:absolute;top:0px;left:0px;width:54px;height:71px;text-align:center;font-size:85%;margin:0;padding:0;list-style:none}
.mnm-publish a {font-size:26px;letter-spacing:-1px;text-decoration:none;line-height:48px;padding:15px 0 6px 0}
.mnm-publish a small {font-size:12px;letter-spacing:0px;text-decoration:none} 
.mnm-publish a:link, .mnm-publish a:visited {color:#FFFFFF}
.mnm-publish a:hover, .mnm-publish a:active {text-decoration:none;color:#000}
.menealo a:link,.menealo a:visited, .menealo span {display:block;padding:4px 0 5px 0;color:#774525;font-size:12px; text-decoration:none}
.menealo a:hover {color:#000}
.menealo span {color:#ccc;font-size:11px}
//-->
</style>

<?php

if($res == 1) {
	$array = mysql_fetch_array($query);
	$id = $array['link_id'];
	$votes = $array['link_votes'];
	echo '<div>
	<ul class="wrap">
	<li class="mnm-publish"><a href="' . $server . '/story.php?id=' . $id . '" title="Vote for this story on ' . $web1 . '" target="_parent"><b>' . $votes . '</b></a></li>
	<li class="menealo">
	<a href="' . $server . '/story.php?id=' . $id . '">' . $web2 . '</a>
	</li>
	</ul>
	</div>';
} else {
	echo '<div>
	<ul class="wrap">
	<li class="mnm-publish"><a href="' . $server . '/submit.php?url=' . $url . '" title="Submit this story on ' . $web1 . '" target="_parent"><b>Go</b></a></li>
	<li class="menealo">
	<a href="' . $server . '/submit.php?url=' . $url . '">' . $web2 . '</a>
	</li>
	</ul>
	</div>';
}

?>
Since the links are:
http://www.feedthebull.com/story.php?id=1770

Does it have anything to do with me using URL method 2?
Reply With Quote
  #12 (permalink)  
Old 03-26-2007, 10:20 AM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
No, it shouldnt do, since they should just redirect to the method 2 urls. I think you downloaded the first attachment, which doesn't contain the auto-voting mod, and so contains no javascript in url.php.

EDIT: updated the download in the 1st post to correct the problems with links (thanks savant!) - the actual voting works for me in FF and IE6.

Remember, if you use this, you must have anonymous voting set to true if you want anyone to be able to vote, otherwise only those who are logged into the pligg site can vote using the EVB.

Last edited by Simon; 03-26-2007 at 02:18 PM.
Reply With Quote
  #13 (permalink)  
Old 03-26-2007, 02:48 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
EVB Mirror Here - in case anyone can't download the attachment
Reply With Quote
  #14 (permalink)  
Old 03-26-2007, 03:47 PM
Casual Pligger
 
Join Date: Feb 2007
Posts: 93
has this made it into the SVN code yet?
Reply With Quote
  #15 (permalink)  
Old 03-26-2007, 03:53 PM
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
No, not yet.
Reply With Quote
  #16 (permalink)  
Old 03-27-2007, 01:28 PM
Iceburg's Avatar
Pligg Donor
 
Join Date: Sep 2006
Posts: 85
Send a message via ICQ to Iceburg Send a message via AIM to Iceburg Send a message via MSN to Iceburg Send a message via Yahoo to Iceburg
It looks a lot closer:

http://www.feedthebull.com/evb/

The only problem I see is that I have my variables set as:
$web1 = 'FeedTheBull.com';
$web2 = 'Feed!';
$auto_vote = 1; //1=yes, no=0
$server = $my_base_url.$my_pligg_base;

When you click on "Feed" it takes you to the article instead of the login page (Login is required to vote)

If you click on the number, it takes you to the login screen, and if I log in, and go back to the EVB page, I am unable to click on another article, does it disable itself after you click on it once?

What exactlly is the auto-voting? I assume its that the article gets a vote after you log in, is that correct?

htp://www.feedthebull.com/evb am I missing something?
Reply With Quote
  #17 (permalink)  
Old 03-27-2007, 02:21 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
It might be that the way the EVB works now is not how people want it...

Right now it does this:

1.) Auto-voting is switched off:
  • if story is already submitted, then both links on the EVB (top and bottom) will redirect the user straight to the story page on your pligg site, without asking the user to login.
  • if it hasn't been submitted, both links on the EVB will take you to the submit page (forcing the user to login first).
2.) If auto-voting is switched on:
  • if the story is already submitted, then the top EVB link will display the voting code. If your site has anonymous voting enabled, and a user who has yet to vote clicks on it, then a vote will be added, but you will stay on the same page. If they have already voted then nothing happens (bad idea?). The bottom link takes you straight to the story, without asking you to login.
  • if the story hasn't been submitted, then both links on the EVB will take you to the submit page (forcing the user to login again).
Ok, that sounds more complicated than I had thought. But I guess the point i'm trying to make is that the digg button does it differently (takes you to the login page first). So my question is, how do people want it set up? You've got 2 links on the EVB, where do you want them to go and what do you want them to do?
Reply With Quote
  #18 (permalink)  
Old 03-27-2007, 02:49 PM
Casual Pligger
 
Join Date: Feb 2007
Posts: 93
Whatever they do, they probably should be the same link IMHO
Reply With Quote
  #19 (permalink)  
Old 04-01-2007, 01:27 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
Just a reminder that if you have the latest SVN code, where menealo.php has changed to vote.php, then you'll need to adjust the url accordingly in the button.php file.
Reply With Quote
  #20 (permalink)  
Old 04-20-2007, 02:13 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
The other EVB thread reminded me to updated this code. Only changes relate to an attempt to speed up display of the button (particularly when showing multiple buttons on the same page).

If anyone has any ideas on how to further speed it up, now's the time to speak up.
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