HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

This is awesome!

Makke375Makke375
edited May 2014 in General Banter

Thank you! MyYagaPoints 1.0 addon works perfectly on Vanilla 2.1!

This type of addon I've been looking for Yaga!

how it looks:

Comments

  • peregrineperegrine MVP
    edited May 2014

    amazing - r0obert creates his first plugin and gets awesome feedback within minutes of it being announced to the world and uploaded.

    how awesome is that. (answer: pretty awesome).

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

  • edited May 2014

    Unheard of since peregrine badges and reactions ..granted not your first but generated much excitement and fanfare

  • peregrineperegrine MVP
    edited May 2014

    @vrijvlinder said:
    Unheard of since peregrine badges and reactions ..granted not your first but generated much excitement and fanfare

    Yes, it filled a need in the pre-Yaga days. but now they are irrelevant.

    but Yaga is awesomer, look at it, and its also got a following of plugin makers, 2 plugins for it already.

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

  • Yes I bet hg is regretting not adding that to his already complex app. But it does show scaleability for sure. Not sure all your points would fit in that space lol

  • @Makke375 said:
    Thank you! MyYagaPoints 1.0 addon works perfectly on Vanilla 2.1!

    This type of addon I've been looking for Yaga!

    how it looks:

    V 1.1 is up, feel free to download it if you want to show "Point(s)" suffix (eg. 1 Point; 10 Points) here: http://vanillaforums.org/addon/myyagapoints-plugin-1.1

    @peregrine said:
    amazing - r0obert creates his first plugin and gets awesome feedback within minutes of it being announced to the world and uploaded.

    how awesome is that. (answer: pretty awesome).

    I was actually expecting this insta-feedback.... lol no :)

  • Makke375Makke375
    edited May 2014

    @r0obert said:
    V 1.1 is up, feel free to download it if you want to show "Point(s)" suffix (eg. 1 Point; 10 Points) here: http://vanillaforums.org/addon/myyagapoints-plugin-1.1

    thank you for information! :)

    how to change the order of the points is the word "Pisteet" before the number 12?

  • r0obertr0obert
    edited May 2014

    @Makke375 said:

    Make this changes to the default.php (the only file in the plugin's folder lol):

    Change this:

    echo Wrap($Author->Points .  " " . T("Point")   ,'span', array('class' => 'Points Count', 'title' => sprintf(T('Total Points'))));
    echo Wrap($Author->Points . " " .  T("Points")   ,'span', array('class' => 'Points Count', 'title' => sprintf(T('Total Points'))));
    

    To this:

    echo Wrap(T("Point") . " " . $Author->Points   ,'span', array('class' => 'Points Count', 'title' => sprintf(T('Total Points'))));
    echo Wrap(T("Points") . " " . $Author->Points   ,'span', array('class' => 'Points Count', 'title' => sprintf(T('Total Points'))));
    

    Basically you swap positions of T("Points") with $Author->Points in both cases.

    Else, if you're too lazy just simply replace the entire code inside default.php with this one:

    <?php
    if(!defined('APPLICATION')) { exit(); }
    
    $PluginInfo['MyYagaPoints'] = array(
       'Description' => 'Display Yaga Points with Author Meta.',
       'Version' => '1.0',
       'Author' => "r0obert",
       'AuthorUrl' => 'http://vanillaforums.org'
    
    );
    
    class MyYagaPointsPlugin extends Gdn_Plugin {
    
    public function DiscussionController_AuthorInfo_Handler($Sender) {
      $Author = $Sender->EventArguments['Author'];
    
      if ($Author->Points == 1) {
      echo Wrap(T("Point")  . " " .  $Author->Points  ,'span', array('class' => 'Points Count', 'title' => sprintf(T('Total Points'))));
      }else {
      echo Wrap(T("Points") . " "  .  $Author->Points  ,'span', array('class' => 'Points Count', 'title' => sprintf(T('Total Points'))));
      }
    
    }
    
    
    
    public function Setup() {
    
       } 
    }
    
  • Makke375Makke375
    edited May 2014

    @r0obert‌ thank you

    but Is it possible to change the word "Point" with the word "Pisteet"?
    EDIT:I fixed it

  • peregrineperegrine MVP
    edited May 2014

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

  • HOW DOES RECEIVE POINTS IN PROFILE?

  • HOW DOES RECEIVE POINTS IN PROFILE?

  • HI I LIKE ALL CAPS! please no just no

Sign In or Register to comment.