MyBB Community Forums

Full Version: If/Then, plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was just thinking about this earlier today. There should be some type of plugin that would allow to write custom If/Then statements. It would be nice if this were a core feature, enabling it to work any future plugins that would be released in the future, but I understand this could be a daunting task. Even for a team of clever individuals like yourselves. 

Would this be too big of a task for the myBB team? Or even a single developer? It would be an amazing plugin to have, creating a whole new array of possibilities for the myBB software. So you want to give an award on registration? 

"If user_registration successful, then give_award(award)." 

I'm probably combining more than one coding syntax here, but hopefully you all get the idea. So what do you think? Is it possible? Or is it too ahead of our time right now?
template conditionals plugin is already available
(2015-07-01, 08:41 AM).m. Wrote: [ -> ]template conditionals plugin is already available


Hmm, that's close, but really what I was talking about. What I'm talking about is more like IFTT (https://itunes.apple.com/us/app/if-by-if...44635?mt=8), but for myBB. It should work between plugins, templates, and core myBB functionality. Check it out. When you understand what I mean, I'd love to hear what you think.

I would try to do this myself, but such a large task requires way more php knowledge than I actually have.
This seems like more than just the ability to write if-then-else statements into templates. It's more like an integration between numerous third party plugins, and however something like "if registration_successful then give_award" shouldn't be declared in templates, which should just contain the html structure.
(2015-07-01, 09:30 AM)Shade Wrote: [ -> ]This seems like more than just the ability to write if-then-else statements into templates. It's more like an integration between numerous third party plugins, and however something like "if registration_successful then give_award" shouldn't be declared in templates, which should just contain the html structure.

Well, I'm not saying it strictly has to apply to templates here. This could apply to anything. I suppose you have to make it so that it could read all the variables that are currently being used, then you should be able to assign those variables to an action. So, if a user registers, (I don't know what myBB uses as a variable for registration), then use the myBB plugin to give an award. 

I might not be explaining this right. It makes sense in my head, but I don't know too much about myBB or the extent of its functionality.
So basically the plugin hooks system, which has been in MyBB for a long time? There's really no easy way to make it much friendlier. There is a hooks plugin that eases its use a little: https://github.com/frostschutz/MyBB-Hooks
(2015-07-01, 10:06 AM)Euan T Wrote: [ -> ]So basically the plugin hooks system, which has been in MyBB for a long time? There's really no easy way to make it much friendlier. There is a hooks plugin that eases its use a little: https://github.com/frostschutz/MyBB-Hooks

Yes! Something exactly like that! I couldn't think of the right terminology for it. Thank you