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.

[Idea] PM box in the panel

2»

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    I'm no expert, but look at what peregrine told you: what is $this? Is it anywhere the same? No, that would make no sense. If it is not anywhere the same, then using $this in your context will not offer the same functionality...

    When I started with Vanilla I had no real idea of OOP, too (and even know most of what I do is guessing, testing and hoping). What helped me a lot was looking at source code of Vanilla and of plugins. The function Get2 is inside the ConversationModel. So how can you use the ConversationModel? Take a look at how it is used in Vanilla: https://github.com/vanilla/vanilla/search?utf8=✓&q=conversationmodel

    You'll find some examples and the first hit in the result list (applications/conversations/modules/class.inboxmodule.php) holds a very easy example on how to access functions of the ConversationModel!

    Bleistivt
  • peregrineperegrine MVP
    edited August 2015

    r_j said: You'll find some examples and the first hit in the result list (applications/conversations/modules/class.inboxmodule.php) holds a very easy example on how to access functions of the ConversationModel!

    Bingo! Exactly where I tried to point him.

    you could also use grep if you have access to the command line and have the code on your computer. Then you can find the line number and file name and an ecample in a matter of seconds.

    e.g.

    change directory so you are at the root of the vanilla forum folder.

    grep -irn --exclude=*.{png,txt,lst,js,zip,sql} 'ConversationModel' * | more

    or you could find a file

    du -a | grep inboxmodule

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

    Bleistivt
Sign In or Register to comment.