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.
Hooking to rendering of private messages.
I plugged in an event I needed (See: http://github.com/Dykam/Garden/commit/46a5d7539cc8eb8f043f37bd59883a31a046ec6c ), for smiley rendering and some other stuff. I tried to find the same spot in the Conversation app, and did, but I was unable to find the place to fetch the message from. Had to add $this->FireEvent("BeforeMessageRender") somewhere, but the local $Message was not exposed as it was not part of the sender. How do I plug this in without doing more than only additional hooking in the core, like I did with Vanilla.
0
Comments
$Sender->EventArguments['Comment'] = &$Comment;
So, within your plugin's method, you can get at the comment to alter it like this: That should get you where you need to go. Notice the ampersand When I assign the $Comment variable - this makes it assign by reference - which means that the actual comment outside your hook is affected by the change.
Here is a simply example I use to test the altering of the Output of existing comments: I can successfully activate my plugin, but simply nothing happens with the comments when displaying a discussion... Any ideas?
On I sidenote, I have the feeling accessing stuff like this is overly complex, but that's just me.
Vanilla Forums COO [GitHub, Twitter, About.me]
Vanilla Forums COO [GitHub, Twitter, About.me]