How to detract one vote from story when disliked

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 09-02-2010, 12:26 PM
New Pligger
 
Join Date: Dec 2009
Posts: 20
Hello,

I have played around with the voting function and tried to get it to detract one vote whenever a user dislikes a story, but I can't figure out how to do it and instead when a user dislikes a story it just fades out. I would like to set it so that when a user dislikes a story, it isn't faded out and instead detracts one vote from the story so the total number of votes decreases.
Would anybody know how to do this and could point me in the right direction?

Thanks in advance for your help!

Best regards, Jonas
Reply With Quote
  #2 (permalink)  
Old 09-02-2010, 07:02 PM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Check out "The Standard" template. It uses up/down voting, which lets users vote down articles. Just copy out the voting function from it's link_summary.tpl file and past it into your own template. You will also need to edit pligg.tpl where it says...


Code:
    <script src="{$my_pligg_base}/templates/xmlhttp.php" type="text/javascript"></script>
Change it to:
Code:
    <script src="{$my_pligg_base}/templates/xmlhttp_total.php" type="text/javascript"></script>
I think that if you just change that last bit to xmlhttp_total it will change all template's bury links as a negative vote.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #3 (permalink)  
Old 09-03-2010, 01:02 PM
New Pligger
 
Join Date: Dec 2009
Posts: 20
Yankidank, thank you very much for the quick reply. I will try it out as per your help and see if I could get it to work.

Best regards, Jonas
Reply With Quote
Reply

Tags
detract vote

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
customize story box to contain vote sytem sweetmove Questions and Comments 2 06-23-2009 03:27 AM
Submit story to a group feature needs enhancement for clearer and better usage argh2xxx Questions and Comments 0 02-25-2009 02:11 PM
customize vote box next to story. jmundane Questions and Comments 5 06-28-2007 02:38 AM
Wrong Posting Time and it is changed after vote on the story bizdig Questions and Comments 2 04-30-2007 12:30 PM
Vote button links to story page after voted canadaka Questions and Comments 1 04-02-2007 12:12 PM


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