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.

Modify pocket content with another plugin?

This discussion is related to the Pockets addon.
mattmatt ✭✭
edited August 2012 in Vanilla 2.0 - 2.8

Is there a way for my plugin to modify the pocket content?

I want my plugin to replace a tag in the pocket content.

If it's not possible, what sort of hooks or events would I need to add?

Comments

  • ToddTodd Chief Product Officer Vanilla Staff

    It looks like the pockets plugin doesn't throw any events, but I could add some. Can you explain a bit more about what you want to do so I can see what can be done?

  • mattmatt ✭✭

    My Countdown plugin replaces a peice of text with a widget. This works for comments but users have requested it work in more areas, such as those provided by pockets.

    Basically, I need to replace some text in a pocket with some content of my own.

    Does that clarify things?

  • ToddTodd Chief Product Officer Vanilla Staff

    Gotcha, let me see what I can do.

    matt
  • mattmatt ✭✭

    Thanks!

  • ToddTodd Chief Product Officer Vanilla Staff

    Okay, I've added an event, but I need to back-port it to the current pockets plugin. You'll be able to use it like this:

       public function PocketsPlugin_ToString_Handler($Sender, $Args) {
          $Pocket = $Args['Pocket'];
    
          if ($Pocket->Name == 'Test pocket...') {
             $Pocket->Body = '<b>Foo</b>';
             $Pocket->Format = 'Raw';
          }
       }
    
  • ToddTodd Chief Product Officer Vanilla Staff

    Do you mind testing this version of the Pockets plugin @matt?

  • mattmatt ✭✭

    Will do ASAP.

Sign In or Register to comment.