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.

Who Liked...

2»

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @hbf said:
    i have a zero tolerance for that sort of thing. so if i believed this community supported that behavior, i'd be gone.

    You misunderstood, I never said to fork it and upload it as a new plugin, I meant it as personal use. Not to distribute. I have never recommended to anyone to clone something without permission and upload it. I do resent the accusation .
    My comments to phreak about this plugin were tongue in cheek . I see no harm in modifying something for personal use. Is modifying a plugin for personal use wrong, is it forbidden ?
    I was under the impression that one could do this for oneself. Not to distribute but for personal use.

    I think I have been rather supportive of your plugins and your forum hbf . And I think I would be that last person here to recommend cloning and uploading the same plugin .

  • $Configuration['Plugin']['LikeThis']['DisplayPhotoName'] = 'N'; //switch off display of individual photos and names

    setup for vanilla 2.0 and 2.1 and above

        public function DiscussionController_AfterCommentBody_Handler($Sender)
            {
             if (substr(APPLICATION_VERSION,0,3) < 2.1) {
                     $this->LikeThisDisplayPhotoName($Sender);
            }
    
            }
    
    
        public function DiscussionController_AfterReactions_Handler($Sender)
            {   
                   if (substr(APPLICATION_VERSION,0,3) > 2.0) {  
                     $this->LikeThisDisplayPhotoName($Sender);     
              }
    
            }
    
    
        public function  LikeThisDisplayPhotoName($Sender)
    
            {
             if (C(Plugins.LikeThis.DisplayPhotoName) == "N")   return; 
    
                  if ($Sender->EventArguments['Type'] == 'Discussion') 
                {
                    $DiscussionID = $Sender->EventArguments['Discussion']->DiscussionID;
                    if ($Sender->Data['Comments'] instanceof Gdn_DataSet)
                        $this->LikeModel->PreloadLikes($Sender->Data['Comments']);
                    $ID = $DiscussionID;
                    $Model = new DiscussionModel();
                    $Data = $Model->GetID($ID);
                    $Likes = $this->LikeModel->GetDiscussionLikes($ID);
                }
                else
                {
                    $DiscussionID = $Sender->EventArguments['Object']->DiscussionID;
                    $ID = $Sender->EventArguments['Object']->CommentID;
                    $Model = new CommentModel();
                    $Data = $Model->GetID($ID);
                    $Likes = $this->LikeModel->GetCommentLikes($ID);
                    $Url = $DiscussionID . '/comment/' . $ID;
                }   
    
              foreach($Likes as $val) {
                    $Reactor = Gdn::UserModel()->GetID($val);
                    $photo = UserPhoto($Reactor,array('ImageClass' => 'ProfilePhotoSmall'));
                     echo '<span class="URWrap">';
                    if($photo) {
                        echo $photo;
                       } else {
                       echo UserAnchor($Reactor);
                    } 
                    echo '<span class="RSprite"></span>';
                     echo '</span>';
                    }
    
            }
    

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

  • peregrineperegrine MVP
    edited June 2013

    @hbf said:

    Yes, i remember reading that discussion. I also remember V getting on a soap box in there on the subject. yet, i've seen her recommend forking my plugins or other such nonsense a couple times now.

    i have a zero tolerance for that sort of thing. so if i believed this community supported that behavior, i'd be gone.

    I'm thinking of finishing my reactions plugin, if I can get pledged donations, I gathered ideas from your plugin, kudos, and thankful people, and 200 other plugins on this forum, as well as from 1000 discussions. It will most likely have the ability for 3 types of reactions (none of them named like). Would you consider that a fork?? and would you be offended?

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

  • hbfhbf wiki guy? MVP

    @peregrine said:
    I'm thinking of finishing my reactions plugin, if I can get pledged donations, I gathered ideas >from your plugin, kudos, and thankful people, and 200 other plugins on this forum, as well as >from 1000 discussions. It will most likely have the ability for 3 types of reactions (none of them >named like). Would you consider that a fork?? and would you be offended?

    if you think it is closely enough related to the software i created to ask honestly, then send me a PM and we can discuss. I never said i would not condone a fork. I just said if someone were to fork my code without permission and post it in the add-ons section i would take offense.

  • hbfhbf wiki guy? MVP

    @peregrine said:
    $Configuration['Plugin']['LikeThis']['DisplayPhotoName'] = 'N'; //switch off display of individual photos and names

    setup for vanilla 2.0 and 2.1 and above

        public function DiscussionController_AfterCommentBody_Handler($Sender)
          {
           if (substr(APPLICATION_VERSION,0,3) < 2.1) {
                   $this->LikeThisDisplayPhotoName($Sender);
          }
          
          }
          
          
        public function DiscussionController_AfterReactions_Handler($Sender)
          {   
                 if (substr(APPLICATION_VERSION,0,3) > 2.0) {  
                   $this->LikeThisDisplayPhotoName($Sender);     
            }
        
          }
          
          
        public function    LikeThisDisplayPhotoName($Sender)
           
          {
           if (C(Plugins.LikeThis.DisplayPhotoName) == "N")   return; 
    
                  if ($Sender->EventArguments['Type'] == 'Discussion') 
              {
                  $DiscussionID = $Sender->EventArguments['Discussion']->DiscussionID;
                      if ($Sender->Data['Comments'] instanceof Gdn_DataSet)
                      $this->LikeModel->PreloadLikes($Sender->Data['Comments']);
                  $ID = $DiscussionID;
                      $Model = new DiscussionModel();
                  $Data = $Model->GetID($ID);
                      $Likes = $this->LikeModel->GetDiscussionLikes($ID);
                  }
              else
              {
                  $DiscussionID = $Sender->EventArguments['Object']->DiscussionID;
                  $ID = $Sender->EventArguments['Object']->CommentID;
                  $Model = new CommentModel();
                  $Data = $Model->GetID($ID);
                      $Likes = $this->LikeModel->GetCommentLikes($ID);
                      $Url = $DiscussionID . '/comment/' . $ID;
              }   
                      
              foreach($Likes as $val) {
                    $Reactor = Gdn::UserModel()->GetID($val);
                    $photo = UserPhoto($Reactor,array('ImageClass' => 'ProfilePhotoSmall'));
                     echo '<span class="URWrap">';
                    if($photo) {
                        echo $photo;
                       } else {
                       echo UserAnchor($Reactor);
                    } 
                      echo '<span class="RSprite"></span>';
                       echo '</span>';
                      }
          
          }
    

    very cool. thank you.

  • hbfhbf wiki guy? MVP

    @vrijvlinder said:

    You misunderstood, I never said to fork it and upload it as a new plugin, I meant it as personal use. Not to distribute. I have never recommended to anyone to clone something without permission and upload it. I do resent the accusation . My comments to phreak about this plugin were tongue in cheek . I see no harm in modifying something for personal use. Is modifying a plugin for personal use wrong, is it forbidden ? I was under the impression that one could do this for oneself. Not to distribute but for personal use.

    I think I have been rather supportive of your plugins and your forum hbf . And I think I would be that last person here to recommend cloning and uploading the same plugin .

    I wasn't referring to forking for personal use, as that is the name of the game. Almost every plugin I've downloaded from the addons repository has been modified for my own use.

    I misunderstood your intent, probably due to working 36 hrs in two days and then reading your post. My mistake.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Thanks I appreciate it, remember also that we made a fuss over the blatant clone from your kudos plugin and got it removed from the depo here. I would never condone doing that specially not without permission from someone.

    Cloning to me means copying the entire thing as is no mods and then changing all the names correspondingly. That would be the same plugin with another name. That would be useless to create why have two of the same right?

    However if one takes useful parts from the plugin i.e. generic code that exists in every other plugin , like senders and handlers etc. user models, to create another different plugin , that to me is not a clone is it? maybe a son is more like it...

    How much of the garden vanilla code is even ours in any event ? Doesn't all the basis for every plugin already exist in the core in the library etc? even blank controllers and plugin startups for people to learn how to make them?

    So possibly the real authors of this code are the designers of Vanilla and how it works. We are mere masons that use the rocks they carved out of the mountain for us to build with. Possibly our attribution is crafty logic and the creation of something unexpected from this source. Maybe that is what authorship means in this case, not owner of the code but an engineer who used it to make something else with it.

    Ultimately every idea has been thought of in multiple ways. To make it real there should not be restrictions based on my code your code, all this code is the same when you break it down and it does not originate from us. It originated by Vanilla devs and gardeners, and on and on , we are the end user of this pre made drawer of tools.

    Now this is far from saying that people should clone and claim, just incase it gets taken that way .

    I just think that code is like music and it should be shared. I could use those drums on my tune can I use them, come jam with me ? Kind of like that....

    I like that code can I use it for my experiment ? The end result will be something much different and you would get credit for sharing that small part that was used.

    Maybe I am a dreamer but I'm not the only one ..... right? :)

  • peregrineperegrine MVP
    edited June 2013

    @hbf said:
    very cool. thank you.

    my pleasure...

    @hbf said:

    @peregrine said: I'm thinking of finishing my reactions plugin, if I can get pledged donations, I gathered ideas >from your plugin, kudos, and thankful people, and 200 other plugins on this forum, as well as >from 1000 discussions. It will most likely have the ability for 3 types of reactions (none of them >named like). Would you consider that a fork?? and would you be offended?

    if you think it is closely enough related to the software i created to ask honestly, then send me a PM and we can discuss. I never said i would not condone a fork. I just said if someone were to fork my code without permission and post it in the add-ons section i would take offense.

    What I am working on, is more like the vanilla reactions (probably with 3 or 4 reactions best, wow, scholarly, brilliant, and lol) its not really a fork of your plugin, but it is yet another type of reactions plugin (likethis, thankful people, and kudos, etc). However I will be using a portion of the code below to display the photos, vanillicons, names etc. assuming I can get any pledges of financial support to finish it.

     foreach($PeregrineReactions as $val) {
    $Reactor = Gdn::UserModel()->GetID($val);
    $photo = UserPhoto($Reactor,array('ImageClass' => 'ProfilePhotoSmall'));
    echo '<span class="URWrap">';
    if($photo) {
    echo $photo;
    } else {
    echo UserAnchor($Reactor);
    }
    echo '<span class="RSprite"></span>';
    echo '</span>';
    }
    

    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.