The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (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
usersc/navigation.php inconsistent
#1
If I understand the use of the usersc directory it allows me to modify the core of US and still not interfere with updates to US.

In other words, if I make a change to users/foo.php I put my changed copy in usersc/foo.php and my customized version overrides the original.

However, users/includes/navigation.php and usersc/includes/navigation.php are different in this respect. The expectation is that the copy in users will have the standard US menus whereas the copy in usersc (which exists from initial install) creates a separate menu in a different horizontal space in the top bar.

What if I want to change the US menu, adding my items to that menu? How do I override users/includes/navigation.php.

IMHO the custom menu (in a separate horizontal space) should be named usersc/includes/alt_nav.php or something like that. Then if I copy users/includes/navigation.php into usersc/includes/navigation.php then I could actually make the usual override...

Of course now the difficulty is backwards compatibility for all those who have a copy of UserSpice with an existing (either modified or unmodified) usersc/includes/navigation.php.

Anyway, I would just like to see a consistent use of usersc and I would like to have the viable capability of overriding navigation.php without causing problems with future upgrades...
  Reply
#2
We're actually working on tackling that problem now. We're experimenting with moving the menu to the database. It's actually just a test at the moment.

You're right about the nav needing to be edited directly at the moment. The good thing is that we almost never touch the nav in updates, so it's not likely to break until 5.0.

If our plan works for 5.0, the menu will be slick enough that it will be worth the little bit of work.

Just a note, you generally won't have to worry about 5 breaking too much. We're doing a ton to maintain backwards compatibility there. I'll also be writing scripts to translate as much of the code as possible.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)