05-24-2017, 09:18 PM
I'd like to be able to update UserSpice whenever updates are available. But I'm adding functionality. So this is mostly a question of the best practices for placement of files and such.
1) Adding functions
My understanding is that all custom functions should go in usersc/includes/custom_functions.php
And if I want to add additional files with custom functions, I can require them within custom_functions.php. Is this the best practice? I know I could add an additional require_once to us_helpers.php, but that would alter the core files, which I don't want to do.
2) Adding pages
My understanding is that custom pages can be added to the users/ folder. Should I be adding them to usersc directory instead, or is the users folder a more appropriate place for them? I haven't tried usersc yet to see if they even show up in the Admin Dashboard as pages.
3) Adding custom Validation (and maybe other classes in the future)
I've found that I need to validate dates as well as the currently available validations. I don't necessarily want to add to the current Validate class since that will alter core functionality. Where should I put a file with new classes? My first thought is to add a folder to usersc and then require from the custom_function.php, but that may be naive?
Thanks in advance for your suggestions.
Gaius
1) Adding functions
My understanding is that all custom functions should go in usersc/includes/custom_functions.php
And if I want to add additional files with custom functions, I can require them within custom_functions.php. Is this the best practice? I know I could add an additional require_once to us_helpers.php, but that would alter the core files, which I don't want to do.
2) Adding pages
My understanding is that custom pages can be added to the users/ folder. Should I be adding them to usersc directory instead, or is the users folder a more appropriate place for them? I haven't tried usersc yet to see if they even show up in the Admin Dashboard as pages.
3) Adding custom Validation (and maybe other classes in the future)
I've found that I need to validate dates as well as the currently available validations. I don't necessarily want to add to the current Validate class since that will alter core functionality. Where should I put a file with new classes? My first thought is to add a folder to usersc and then require from the custom_function.php, but that may be naive?
Thanks in advance for your suggestions.
Gaius