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
/printthread.php 16 require_once



UserSpice
header.php in usersc not overwriting? - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: header.php in usersc not overwriting? (/showthread.php?tid=623)



header.php in usersc not overwriting? - fylking - 07-03-2017

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?


header.php in usersc not overwriting? - mudmin - 07-03-2017

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.



header.php in usersc not overwriting? - haydentech - 08-04-2017

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.


header.php in usersc not overwriting? - firestorm - 08-04-2017

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


header.php in usersc not overwriting? - haydentech - 08-04-2017

I did see that post. That sounds intriguing, @Firestorm. Anything would be an improvement.


header.php in usersc not overwriting? - firestorm - 08-04-2017

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


header.php in usersc not overwriting? - Brandin - 08-04-2017

^^^^^^^^ exactly what I've been planning and just haven't done yet. Can't wait for that Smile


header.php in usersc not overwriting? - mudmin - 08-05-2017

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.