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.

Change the order of reactions and people that reacted

First, thanks to @hgtonight‌ for this fantastic application; now my question is: How can I change the order of reaction and people that reacted in me discussion/comment? Now appear thereby under the message:

  1. People that reacted.
  2. Last edit.
  3. Signature (signature plugin).
  4. Reactions.

Check the image

The order that I want:

  1. last edit.
  2. Signature
  3. People that reacted
  4. Reactions

Thanks for the help and sorry for my worst english :(

Tagged:

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Thanks for trying my addon!

    What plugin are you using that shows the "Last edit" message?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    Thanks for trying my addon!

    What plugin are you using that shows the "Last edit" message?

    Last Edited 1.1.1 - http://vanillaforums.org/addon/lastedited-plugin

  • you could change the After to Before in Last edited plugin

    e.g. in class.lastedited.plugin.php

      public function DiscussionController_BeforeDiscussionBody_Handler($Sender) {
          $this->DrawEdited($Sender);
       }
    
       public function DiscussionController_BeforeCommentBody_Handler($Sender) {
          $this->DrawEdited($Sender);
       }
    
       public function PostController_BeforeCommentBody_Handler($Sender) {
          $this->DrawEdited($Sender);
       }
    

    it will put the last edited above the body but equally visible.

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

  • hgtonighthgtonight ∞ · New Moderator

    You could unregister the hooks file and then re-register:

    public function Gdn_PluginManager_AfterStart_Handler($Sender) {
      $Sender->UnRegisterPlugin('YagaHooks');
      $Sender->RegisterPlugin('YagaHooks');
    }
    

    The downside is you are registering the plugin twice.

    A method that should perform better would be to copy the /applications/yaga/settings/class.hooks.php file to /applications/yaga/library/actual.hooks.file.php. This will prevent the autoloader from loading the file. Then, in /applications/yaga/settings/class.hooks.php, replace the contents with:

    <?php if(!defined('APPLICATION')) exit();
    /* Copyright 2013-2014 Zachary Doll */
    
    /**
     * Delays registering Yaga Hooks until the plugin manager is finished registering autoloaded
     * plugins.
     */
    class FakeHooks implements Gdn_IPlugin {
      public function Gdn_PluginManager_AfterStart_Handler($Sender) {
        require_once(PATH_APPLICATIONS . DS . 'yaga' . DS . 'library' . DS . 'actual.hooks.file.php');
        $Sender->RegisterPlugin('YagaHooks');
      }
    
      public function Setup() { return TRUE; }
    
    }
    

    Let me know if this works, as it is mostly theory on my end.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thanks @hgtonight‌ works perfectly :smiley:

  • Hi @hgtonight‌ , I have changed my server, I have not changed anything in the system and the order has changed again. I returned to copy the original files from the yaga and proceeded to perform the above steps and it didn't work ....

  • hgtonighthgtonight ∞ · New Moderator

    What is in /applications/yaga/settings/class.hooks.php?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    What is in /applications/yaga/settings/class.hooks.php?

    <?php if(!defined('APPLICATION')) exit(); /* Copyright 2013-2014 Zachary Doll */ /** * Delays registering Yaga Hooks until the plugin manager is finished registering autoloaded * plugins. */ class FakeHooks implements Gdn_IPlugin { public function Gdn_PluginManager_AfterStart_Handler($Sender) { require_once(PATH_APPLICATIONS . DS . 'yaga' . DS . 'library' . DS . 'actual.hooks.file.php'); $Sender->RegisterPlugin('YagaHooks'); } public function Setup() { return TRUE; } }

Sign In or Register to comment.