× 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
allow override of core in require'd script
#1
As mentioned here: http://userspice.org/forums/topic/verify...#post-2055

It is currently possible to override "pages" but it is not possible to override scripts which are brought into other pages by means of require_once() or the related include*() and require*() functions...

I believe that by changing the require_once() calls from absolute to relative:

Code:
require_once('header.php');

instead of

Code:
require_once($us_url_root.'users/includes/header.php');

and then making judicious use of
Code:
include_path
(presumably configured in init.php during installation) you could make these over-ridable.

Of course the disadvantage is the code becomes a bit less readable and you will suffer a bit of a performance hit (I would guess negligible).
  Reply


Messages In This Thread
allow override of core in require'd script - by plb - 09-10-2016, 10:28 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)