Author |
Message |
Vchat20
Hangin' Around

Joined: Nov 27, 2004
Posts: 31
|
Posted:
Wed Oct 12, 2005 11:34 pm |
|
pretty simple. since my_header.php seems to no longer be available in the latest versions of nuke, what would be an appropriate place to add custom header code? |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed Oct 12, 2005 11:48 pm |
|
header.php - seriously. It's just been renamed. Look in header.php and you will see these linesCode: if (file_exists("includes/custom_files/custom_head.php")) {
include_once("includes/custom_files/custom_head.php");
}
echo "\n\n\n</head>\n\n";
if (file_exists("includes/custom_files/custom_header.php")) {
include_once("includes/custom_files/custom_header.php");
}
|
Add it to either of those. Create them if they don't already exist. |
|
|
|
 |
Vchat20

|
Posted:
Wed Oct 12, 2005 11:50 pm |
|
ah. to tell you the truth, i would have never thought of that. after all these years, im so used to using my_header for all these things that im running around like a chicken with my head chopped off trying to find this thing. thx a bunch  |
|
|
|
 |
Vchat20

|
Posted:
Thu Oct 13, 2005 11:22 pm |
|
one simple problem here. i know its more a php issue than nuke, but its related to this thread. it seems that the code i put in the header (which outputs via a $ variable for other bits in the site to use) cant make any connections to the other sections on my site.
let me try to explain a bit better: as you may have noticed from a previous thread, ive been playing around with some "Now Playing" display solutions. barring some problems with the mysql solution, i have decided to go back to simply having each page load go out and grab the data on the fly from the shoutcast server and immediately output on the page. as i (probably) stated in that last thread, many parts on the site in the future are going to be utilizing this info so i dont need multiple instances of the same code going out and grabbing the needed info so thats why i decided to put the base code in the header (this thread) and simply have it output the single line of info to a variable named "$np_desc". but anytime i try and have anything outside the header file do anything with that variable, it spits back an empty line. but if i echo that directly in the header, it shows the line clearly on the site in the top left corner.
is there any way around this? or is this a common technicality of php in general? cuz i know in my past attempts at php coding i could never get any data shared outside of the parent php file.
thx again for all this help. you guys have been great. and i should say that i love nukesentinel (although my newest sites dont have it, ive been meaning to install it). my older phpnuke sites used it and it grabbed a mess of baddies whereas without it i was always getting people hacking the site and screwing everything to the point of needing a db restore. |
|
|
|
 |
Raven

|
Posted:
Thu Oct 13, 2005 11:26 pm |
|
Are you adding a statement like this to each script? It has to also be added to each function call if you are in a function.
global $np_desc; |
Last edited by Raven on Fri Oct 14, 2005 4:25 am; edited 1 time in total |
|
|
 |
Vchat20

|
Posted:
Fri Oct 14, 2005 12:38 am |
|
no. i never really thought of that. i just saw it in all the curent nuke code, never really bothered to look it up. thx for the insight. |
|
|
|
 |
azism
Worker


Joined: Feb 02, 2005
Posts: 145
Location: Tucson, AZ
|
Posted:
Thu Jan 12, 2006 11:50 am |
|
Okay, I'm really confused now.
I can't find header.php either. I see a "page_header.php" file, but I don't want to make any changes not knowing if this may be the proper place to add custom code.
I assume there is a easy explanation here. Thanks. |
_________________ Webmaster
TI99ers On-Line User Group
http://www.ti99ers.org/ |
|
|
 |
Raven

|
Posted:
Thu Jan 12, 2006 11:57 am |
|
header.php is in the root folder, where mainfile.php is. |
|
|
|
 |
azism

|
Posted:
Thu Jan 12, 2006 12:21 pm |
|
Opps, I guess I am having a .
In RavenNuke 7.6 it is the header.php, correct? Thanks. |
|
|
|
 |
Raven

|
Posted:
Thu Jan 12, 2006 12:26 pm |
|
You can use any of the ones mentioned in my first post. |
|
|
|
 |
|