It's been a while since I started enquiring about dev tuts, and a lot more seem to have been added since (which is awesome - thank you!) so I was wondering if anyone has any advice on which ones to go through first?
Ideally I would like to start from the beginning, easy to more advanced, but hopefully ones that echo XF/MVC best practises as well - to stop me picking up any bad habits.
I have been learning Ruby on Rails and Ruby for the last few years so I'm familiar with MVC, REST, etc. but my PHP is very patchy - I did know the very basics but I have probably forgotten it all now.
I made some notes about Ruby/PHP:
(class variables or methods)
With regards to what I am trying to achieve, in my first plug-in I'd like to create a simple permission check for conversations. Where unless the User is a Moderator or Admin they may not initiate a conversation with anyone who does not have the ability to start conversations themsevles.
So basically conversations can only take place when both parties have the correct permission via their usergroup permissions - apart from mods and admins who can initiate a conversation with anyone.
Could you give me some quick hints/tips please? Your help would be very much appreciated and the plug-in will be released here with full rights transferred to XF to include in the stock product if they so wish.
Well, that type of add-on would need to extend the proper controller (I don't know it off the top of my head, but probably XenForo_ControllerPublic_Conversations) and action (actionInsert) that will interject before running the parent and verify the permissions of all recipients. For that, you should read the class proxy article I linked, about PHP OOP, specifically inheritance and the use of parent.