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.

Updating a Plugin for Vanilla 2.3

About 6 years ago, I made a DiceRoller plugin for Vanilla 2.0 or 2.1... I don't remember which version. The username was different (ToastyFish), but I can't get logged back into that.

Anyway, I've had a user ask if I can get it updated for 2.3 and I'd like to be a good open source community member, but I'm having trouble figuring out where to start.

The original plugin extended CommentModel_BeforeSaveComment_Handler. Is there a event or method or whatever that I should be overriding for Vanilla 2.3 so I can intercept and modify the text that the user typed in (to turn something like 1d20 into a number between 1 and 20)?

Thanks,
John

Tagged:

Best Answer

Answers

  • Answer ✓

    You need to remove the ampersand from all the $Senders and others..

    change this

    (&$Sender){

    to this

    ($Sender){

    ( &$strComment  ) 
    

    ( $strComment )

    Report back if that fixes it.

  • You can always upload a new plugin with a new name and ask for the original to be deleted .

  • Thanks for the quick response. I've updated my code and have sent the file along to the user. I don't have a Vanilla 2.3 forum up right now so I can't test it personally, but I'll let you know if I hear back. And if it works, I'll upload a new version of the DiceRoller for Vanilla 2.3.

  • For me your original plugin works fine (for 2.3), even without the ampersand changes.

    What was the problem the user had with the plugin?

    They might not be aware they have to wrap their rolls in roll tags for it to work?

    <roll>5d6</roll>
    
  • The user said that when they added the roll tag, the comment would just say "5d6" or whatever and not actually generate random numbers.

    I sent them an updated version of the plugin (with the ampersand changes) last Monday, but I haven't heard back from them about whether those changes helped.

    Glad to hear it's working for you.

  • CaylusCaylus ✭✭
    edited February 2017

    Do they have experience switching on Vanilla plugins?

    It sounds like they correctly inputted <roll>5d6</roll>, but your plugin simply didn't do anything to it (most likely since it's not been turned on) and the tags get stripped from their post, like this: 5d6 (which Vanilla does automatically with tags it does not know to prevent XSS attacks).

    It really sounds like an user error instead of a plugin error.

  • Oh cool. I'm not sure what they were doing, they haven't responded to my most recent emails. Oh well. It just bugs me that something I made (even something that small) stopped working and I want to make sure it's working for people.

Sign In or Register to comment.