Plugins will highly depend on the application you're writing them for. That is, one application's plugins may bear very little resemblance to another's. The only real similarity would perhaps be that they both [are designed to] extend functionality in some way, but how it's done in each case can be significantly different.
As for PHP tutorials, there's many of them across the internet , and I believe there are already some MyBB plugin guides around the place.
So I'm not sure about this, but if there's any difference in me putting in all the effort to do it, then please say so.
Thanks for the suggestion regardless
(05-23-2010 09:24 AM)ZiNgA BuRgA Wrote: [ -> ]Plugins will highly depend on the application you're writing them for. That is, one application's plugins may bear very little resemblance to another's. The only real similarity would perhaps be that they both [are designed to] extend functionality in some way, but how it's done in each case can be significantly different.
I'd definitely agree on that part. It would be nigh on impossible to implement a generic howto regarding plugins and suchlike. A better option, if something like that is wanted, would be to have a specific category for helping people produce MyBB plugins or suchlike, and help guide them when they get stuck with something. Adding information for good coding practice and such would definitely be a boon though. Try and give people good, generic base practices to build from. Good, secure code is a must across the board.
(05-24-2010 12:31 AM)MattF Wrote: [ -> ]A better option, if something like that is wanted, would be to have a specific category for helping people produce MyBB plugins or suchlike, and help guide them when they get stuck with something. Adding information for good coding practice and such would definitely be a boon though. Try and give people good, generic base practices to build from. Good, secure code is a must across the board.
Thanks for the suggestion
I'm willing to do that, just now, due to the low amount of posting here, I think people can just post in this forum if they have any such queries. If many people do this, then a separate section can easily be made.
As for my code, unfortunately, it's not really neat - I tend to code for speed, and often omit comments here and there... >_>
(05-24-2010 12:14 PM)ZiNgA BuRgA Wrote: [ -> ]As for my code, unfortunately, it's not really neat - I tend to code for speed, and often omit comments here and there... >_>
I am hardly one to comment on the code commenting part. That's something I do depending upon which way the wind is blowing at the time.
Commenting has always struck me as being one of those possibly needless areas. Granted, in large code structures it can possibly help to find a section quickly when scrolling through the code, but in general, my opinion is that people should have enough of an eye to realise generally what each portion/section does without comments if they're at the point where they are delving into the code. I class it more as cruft than anything. As I say though, I do actually do it on occasion.
Legibility, (for example indentation, so that it's easier to follow the flow of the code and spot omissions/errors), and robust, secure coding practices are far more important, IMHO.
Sanitisation, validation and escaping are three points which really need some serious highlighting, as they are the three areas which tend to be sadly lacking in a lot of the existing information online and which always seem to be prevalently lacking in a lot of user code.
You should also explain that indentation is necessary, most of the plugins developers do not use proper (if any) identation and they'll take way more time to fix bugs if they don't use identation since they can barely read the code.
I could probably think of hundreds of bad things the majority of PHP "programmers" do...
True enough, but merely starting with the glaringly bad is as good a place as any to start. Limiting the possibilities of XSS, SQL, directory traversal, file inclusion exploits and such is always a good starting point. Teaching coding style for readability and bug finding is also desirable. The finer points of access permissions etc can always be added later, when there's time and/or opportunity, as those can be more esoteric.
This forum looks real nice and friendly. And rich in contents as well with some very nice and much needed plugins. I have one suggestion but I think it would be best if I posted it as a new thread instead.
(06-15-2010 08:19 AM)ZiNgA BuRgA Wrote: [ -> ]Thanks for the compliment.
I think I've mentioned before that I really don't mind giving out admin, or even FTP, accounts and letting people do what they want here (within reason) as long as I get to keep my little section. So if you want to "clean" something up, just say so.
Or if you think you have a good idea about something, please feel free to make any suggestions here: http://mybbhacks.zingaburga.com/showthread.php?tid=310
Thanks.
by clean I was talking about like may be installing a new theme, fixing those top link inages then modifying the plugin forum to a better view with xthread..
I've split and merged the thread, Sept