Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

remove VOTE from voting plugin

2»

Answers

  • ah nvm, just manually added it to all the spans i didn't want. crash course in css, ha.

  • peregrineperegrine MVP
    edited August 2012

    if you don't want to have to hide it with css and never have it sent or shown``

    just comment it out in the plugin. you don't have to mess with css.

    all you have to do is go into class.voting.plugin.php look around line 120.
    and add the two lines shown that say "add this line"

    /*  add this line
        // Votes
        if ($Session->IsValid()) {
            echo Wrap(Anchor(
                Wrap(T('Votes')) . Gdn_Format::BigNumber($CountVotes),
                '/vanilla/discussion/votediscussion/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl),
                '',
                array('title' => T('Vote'))
            ), 'div', array('class' => 'StatBox VotesBox'));
        } else {
            echo Wrap(Wrap(T('Votes')) . $CountVotes, 'div', array('class' => 'StatBox VotesBox'));
        }
    */  // add this line
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • fh111fh111 Vanilla Padawan ✭✭

    We were using Voting plugin like this for a while but i did not like that the ajax posting funtionality was compromised (when posting a comment for example)

    we are now happily using peregrines plugin AuthorTimeView (thanks @peregrine:) in combination with vanilla's built in bookmark discussion function.

    the only difference is that users don't see how many other user bookmarked a discussion, which is fine. apart from that discussion view is much cleaner now

  • @peregrine your way disables voting but the voting per comment in discussion still displays.

    how can I also remove it?

  • peregrineperegrine MVP
    edited January 2013
    • around line 208 either
    • add a return in the line below the function,
    • or remove the entire function totally (if you understand how to do that).

     public function DiscussionController_BeforeCommentMeta_Handler($Sender) {
     // add the line below           
      return;
    
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • These replies are great about removing the counts on the index. But on each thread there is still a vote count option that I would like to remove. I am only using this mod to add the comments and views to the thread index.

  • peregrineperegrine MVP
    edited March 2013

    @insanemustang said:
    These replies are great about removing the counts on the index. But on each thread there is still a vote count option that I would like to remove. I am only using this mod to add the comments and views to the thread index.

    change in class.voting.plugin.php

    public function DiscussionController_BeforeCommentMeta_Handler($Sender) {
        // add the line below       
    return;
    
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine I'm looking at that code, do I remove stuff, or just add this in there? Mine looks like this

    public function DiscussionController_BeforeCommentMeta_Handler($Sender) { // if (!C('Plugins.Voting.Enabled')) // return;

  • peregrineperegrine MVP
    edited March 2013
    public function DiscussionController_BeforeCommentMeta_Handler($Sender) {
    return; 
    // if (!C('Plugins.Voting.Enabled')) 
    // return;
    

    you could either remove the whole function, or leave everything intact with the one line addition.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.