View Single Post
  #1 (permalink)  
Old 01-31-2006, 01:56 PM
Yankidank's Avatar
Yankidank Yankidank is offline
Pligg Founder
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,931
Thanks: 114
Thanked 189 Times in 134 Posts
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
External Vote Button (EVB)

Demo Page

NOTE: This mod will be available with Pligg Beta 6, which I expect to have some type of version prepared by this weekend. You can not use this mod without the files that will be included with the next release, this is only for demonstrating purposes right now.

External Vote Button (EVB)

This vote button will allow you to create a vote link to an article automatically. The vote url is directed to the page the button appears on, so you will want to make sure that it appears only in the individual articles, not the archives. Once the first vote is cast it will change the "cast vote" image to "vote cast" and redirect clicks to the pligg article url. Technically you could just insert the html/php into your site's template so the vote button appears on every page and each page would be counted as seperate submissions. I'm not 100% sure if this is possible, but I believe that it could work this way.

Images used:


How to add an External Vote Button:
Add this code to a HTML enabled blog post or article where you want the vote button to appear:
HTML Code:
 <script type="text/javascript" src="http://domain.com/api/check_url.js"></script> 
Replace domain.com with your own domain where a Pligg install exists. If you wish to test a domain, try scadart.com and it should work.
For PHP pages:

PHP Code:
<?php 
         
include('../config.php');
          echo 
'<script type="text/javascript" src="http://domain.com/api/check_url.js.php"></script>';
         
?>
or if you want to use the vote button only on your own domain...

PHP Code:
<?php 
         
include('../config.php');
          echo 
'<script type="text/javascript" src="http://'.get_server_name().'/api/check_url.js.php"></script>';
         
?>
See anexample of a PHP vote image here.
Download the PHP example here. Make sure to rename it from phpvote.phps to phpvote.php
Attached Images
File Type: psd add-01.psd (152.0 KB, 371 views)
File Type: psd over-01.psd (152.8 KB, 209 views)
File Type: psd vote-01.psd (152.3 KB, 221 views)

Last edited by Yankidank; 02-24-2007 at 12:32 AM..
Reply With Quote
The Following 4 Users Say Thank You to Yankidank For This Useful Post: