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
header.php in usersc not overwriting?
#1
Hi,

I'm just trying to adjust US (4.2.8) to another bootstrap site and have therefore changed a copy of header.php and saved it in /usersc/includes. Same for navigation.php

But when i as a test loads join.php, the new header.php is not loaded or overwriting the original. But the navigation actually are.

My understanding is that files placed in /usersc/ by the same name will overwrite files in the /users/?
But not for header.php?
  Reply
#2
Ahh. That's more for the pages in the users folder.

If you are trying to ADD something to the header, you would do it in usersc/includes/custom_head tags

If you want a completely different header, then you just need to rename our header and create your own in the users folder. Thanks for bringing this up.
  Reply
#3
I agree with fylking that it should be more straight-forward to override header.php. Speaking as a someone who just started a project with UserSpice, that was literally the first thing I tried to do. By sheer chance, I ran across his post while looking through the forums, or I would have been very frustrated, I can assure you.
  Reply
#4
you’ll see in a previous post i made, ive created a hook system same as wordpress uses , in this case hooks would be perfect for, header contents would be a registered function like userspice_head() then to replace entire contents you would create a function to filter(replace contents) the userspice_head() function if you know what i mean ? you can also have an action function to add to the contents of userspice_head(). theres also the option when registering hooks and filters to declare its order aswell.

im not sure if @mudmin is including it into 4.3 or not tho
  Reply
#5
I did see that post. That sounds intriguing, @Firestorm. Anything would be an improvement.
  Reply
#6
its a step towards extensions (plugins), ive almost completed database driven menu’s with almost unlimited children, ui to add & remove menu items, set icon classes, labels, links, assign to login state and assign to perm level i.e: admin or user, then extensions will come after, hooks will make life so much easier when using extensions, no more modding core and potentialy auto updates
  Reply
#7
^^^^^^^^ exactly what I've been planning and just haven't done yet. Can't wait for that Smile
  Reply
#8
All of this is great. I'm trying to roll this stuff out in Alpha a little bit at a time. Everyone had lots of plans for my time once summer was over...so I have lots to catch up on.
  Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)