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.
Options

Plugin Development

I am making my own plugin using the QnA plugin as a basis. Where is the correct area to post questions as I go through development?

Best Answer

Answers

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    @Rangerine - so far I uploaded a dozen of plugins and asked many questions on the main discussion list and it never occurred to me to ask to be added to the development category. I don't know if it is needed... @Adrian/@Linc -- what am I missing? If you add me there, would it mean that I would start to take myself too seriously?;-)

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    @Rangerine - so far I uploaded a dozen of plugins and asked many questions on the main discussion list and it never occurred to me to ask to be added to the development category. I don't know if it is needed... @Adrian/@Linc -- what am I missing? If you add me there, would it mean that I would start to take myself too seriously?;-)

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    And I would advise you to use code sniffer and the available standards: https://github.com/vanilla/addons/tree/master/standards/Vanilla

    It helps keeping your code readable and makes it simple for you to reuse code.

    @rbrahmson: maybe that is the reason why you don't have access to this category: you still write code that looks messy just because it is not formatted ;)

  • Options
    rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    @R_J - thanks for the link - didn't know about the standards or that anyone actually looks at the contributed plugin code. You feedback prompted me to look at few related discussions and I saw a remark that the standards apply to new code. You may remember that the plugins I post here were actually being used in our intranet and I was forced to "sanitize" them before uploading them here lest they contain some internal references... The good thing is that most have been "field tested" (on 2.1),the bad news is that for me they're not new code and some of the commentary actually conforms to my intranet standards... Anyway, it would have been nice to pose development related questions and ideas in the right category...

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    The standards mentioned above are just a convention. Before that, Vanilla code used to use 3 spaces for indenting, upper case method names and such. It really don't matter what standard you use, but using a standard is advisable. e.g. hgtonight uses two spaces, although Vanilla uses four for indenting, but no one would ever say his code is unreadable.

    By the way: it doesn't matter if you use Base_Render_Before or base_render_before. Look at those two lines from your new plugin (line 30, 31):

            $Sender->addSideMenu('dashboard/settings/plugins');
            $this->SettingDefaults($Sender,'settingsController');
    

    The first one uses spaces, the second one tabs. The first method name is lower case the second upper case.

    It doesn't matter which coding standard you use or if you use no standard at all: your plugin will work nevertheless.

Sign In or Register to comment.