The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom classes/pages placement without disturbing core
#1
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
  Reply


Messages In This Thread
Custom classes/pages placement without disturbing core - by gaiusjaugustus - 05-24-2017, 09:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)