Go Back   Pligg Forum > Pligg Development > Pligg Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-31-2006, 12:56 PM
Yankidank's Avatar
Yankidank Yankidank is online now
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Pligg Founder
Pligg Version: SVN
Pligg Template: LemonTwist
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,540
Downloads: 65
Uploads: 6
Thanks: 100
Thanked 156 Times in 105 Posts
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, 309 views - Who Downloaded?)
File Type: psd over-01.psd (152.8 KB, 161 views - Who Downloaded?)
File Type: psd vote-01.psd (152.3 KB, 164 views - Who Downloaded?)

Last edited by Yankidank : 02-23-2007 at 11:32 PM.
Reply With Quote
The Following 4 Users Say Thank You to Yankidank For This Useful Post:
Sponsored Links
Check out the New Templates at the Pligg Pro Shop.
  #2 (permalink)  
Old 01-31-2006, 01:37 PM
cryptkeeper cryptkeeper is offline
Constant Pligger
 
Join Date: Jan 2006
Posts: 198
Downloads: 7
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
awsome! I was gonna mod somethign like this myself looks sweet dude!
Reply With Quote
  #3 (permalink)  
Old 01-31-2006, 04:45 PM
Pentarix Pentarix is offline
Casual Pligger
 
Join Date: Dec 2005
Posts: 74
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Will you be able to release the photoshop or original file so we can change colors easily? As I said in IRC, it looks awesome and I'll definetly be using it!
Reply With Quote
  #4 (permalink)  
Old 01-31-2006, 05:36 PM
Yankidank's Avatar
Yankidank Yankidank is online now
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Pligg Founder
Pligg Version: SVN
Pligg Template: LemonTwist
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,540
Downloads: 65
Uploads: 6
Thanks: 100
Thanked 156 Times in 105 Posts
I have included the photoshop files to the top post. The text requires the "Trebuchet MS" font, which I think is standard with Windows installations. Changing the text and color should only take about a minute for each image. The quickest way is probably Image->Adjustments->Hue/Saturation and just playing with the sliders until you get a nice color. Just a quick tip to help Photoshop noobies.
Reply With Quote
  #5 (permalink)  
Old 02-01-2006, 06:35 AM
Xanatos Xanatos is offline
Casual Pligger
 
Join Date: Jan 2006
Posts: 33
Downloads: 2
Uploads: 0
Thanks: 37
Thanked 0 Times in 0 Posts
i like this , well done Yankidank
Reply With Quote
  #6 (permalink)  
Old 02-01-2006, 11:04 AM
mightyb mightyb is offline
Pligg Donor
 
Join Date: Jan 2006
Posts: 118
Downloads: 13
Uploads: 0
Thanks: 10
Thanked 3 Times in 3 Posts
It would be great if the code was being generated automatically when the person submits a story so that he can just copy/paste it.
Reply With Quote
  #7 (permalink)  
Old 02-02-2006, 05:18 PM
fwebz fwebz is offline
Casual Pligger
 
Join Date: Jan 2006
Posts: 56
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Great, well done
Reply With Quote
  #8 (permalink)  
Old 03-17-2006, 10:38 AM
andyc andyc is offline
New Pligger
 
Join Date: Feb 2006
Posts: 19
Downloads: 4
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Hi

This works fantastic. Just what I wanted. Its all shaping up nicely.

Andy
Reply With Quote
  #9 (permalink)  
Old 03-17-2006, 12:45 PM
Yankidank's Avatar
Yankidank Yankidank is online now
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Pligg Founder
Pligg Version: SVN
Pligg Template: LemonTwist
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,540
Downloads: 65
Uploads: 6
Thanks: 100
Thanked 156 Times in 105 Posts
I forgot to mention this with the Beta 6 release, but the EVBs are included in the /api directory. You can check http://yourdomain.com/api/evb.html for an example of it and instructions. You will have to edit 1 or two files in the api directory to point to your domain.
__________________
Need a Pligg Host?
Get 3 free months
when you buy a year of hosting.
Use the coupon PLIGG at either...
MidPhase hosting starting at $7.95/month.
ANhosting hosting starting as low as $4.95/month.
Reply With Quote
  #10 (permalink)  
Old 03-23-2006, 06:37 PM
andyc andyc is offline
New Pligger
 
Join Date: Feb 2006
Posts: 19
Downloads: 4
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Hi

Now that I have used this a little I have found a small bug.

When an article has already been pligged then it works great. It shows the number of votes and takes you to the pligg story, as it should.

When you are a member and logged onto Pligg then the button goes to the submit page as it should, prefilling the fields etc.

But..

When you are not logged in clicking the pligg button results in a 404 as the url goes a bit wrong. It attempts to take you to the login screen but appends the url and therefore doesn't work.

Is this an easy fix?

Andy
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
delay vote number change cryptkeeper General Help 2 01-31-2006 12:19 AM
what is the code that does vote update cryptkeeper Pligg Templates 1 01-30-2006 02:16 PM
Vote Count Box ascendchris Pligg Templates 8 01-28-2006 09:43 AM


LinkBacks Enabled by vBSEO 3.0.0