Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9
Author Message
Vchat20
Hangin' Around



Joined: Nov 27, 2004
Posts: 31

PostPosted: Wed Oct 12, 2005 11:34 pm Reply with quote

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?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 12, 2005 11:48 pm Reply with quote

header.php - seriously. It's just been renamed. Look in header.php and you will see these lines
Code:
   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.
 
View user's profile Send private message
Vchat20







PostPosted: Wed Oct 12, 2005 11:50 pm Reply with quote

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 Smile
 
Vchat20







PostPosted: Thu Oct 13, 2005 11:22 pm Reply with quote

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







PostPosted: Thu Oct 13, 2005 11:26 pm Reply with quote

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







PostPosted: Fri Oct 14, 2005 12:38 am Reply with quote

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
Worker



Joined: Feb 02, 2005
Posts: 145
Location: Tucson, AZ

PostPosted: Thu Jan 12, 2006 11:50 am Reply with quote

Okay, I'm really confused now. Confused

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 [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Send e-mail Visit poster's website
Raven







PostPosted: Thu Jan 12, 2006 11:57 am Reply with quote

header.php is in the root folder, where mainfile.php is.
 
azism







PostPosted: Thu Jan 12, 2006 12:21 pm Reply with quote

Opps, I guess I am having a Blonde Moment .

In RavenNuke 7.6 it is the header.php, correct? Thanks.
 
Raven







PostPosted: Thu Jan 12, 2006 12:26 pm Reply with quote

You can use any of the ones mentioned in my first post.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©