Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How do I edit the header.php on phpnuke?

  1. #1
    Ferinos's Avatar
    Ferinos is offline x10Hosting Member Ferinos is an unknown quantity at this point
    Join Date
    Nov 2006
    Location
    England but Half Scottish
    Posts
    69

    How do I edit the header.php on phpnuke?

    Hi, I am a total newbie at web designing, and especially php nuke. I need to edit the header.php to insert the code for the text/banner link. If anyone could give me instructions on how to do this, I would be most grateful,
    #Thanks in advance,
    Ferinos

    PS, could someone tell me if this is posted somewhere else? I checked this forum and couldn't find it, so sorry in avance if I missed it. Cheers peeps, PS2 urgent replies required Cheers!!

  2. #2
    Fedlerner's Avatar
    Fedlerner is offline Retired Fedlerner is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    Buenos Aires, Argentina
    Posts
    12,923

    Re: How do I edit the header.php on phpnuke?

    You need to edit it with an FTP client, or with the File Manager of cPanel.
    You'll need to edit the header.php, and insert the PHP code in the very top of the header. Do it and tell us if it worked for you ;)
    Federico Lerner
    Former x10Hosting Administrator - Staff Manager

  3. #3
    Ferinos's Avatar
    Ferinos is offline x10Hosting Member Ferinos is an unknown quantity at this point
    Join Date
    Nov 2006
    Location
    England but Half Scottish
    Posts
    69

    Re: How do I edit the header.php on phpnuke?

    K, Ill give that a shot cheers mate.

  4. #4
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: How do I edit the header.php on phpnuke?

    What you need to do is to login to cPanel. From their navigate to your File manager.

    Once you have done that, open the WWW directory and then navigate to the main folder where you have PHP NUKE installed.

    Once there, find a file callsed header.php

    Click on the name of the file, and the box in the top right will change to a list of options that you can do to that file.

    Click on "Edit this file".

    A new window will open and a editor for that file will appear.

    For corperate place this at the very top:
    PHP Code:
    <div align="center">
    <? include("http://staff.x10hosting.com/adCode.php?ad=corporate"); ?>
    </div>
    For Advanced place this at the very top:
    PHP Code:
    <div align="center">
    <? include("http://staff.x10hosting.com/adCode.php?ad=advanced"); ?>
    </div>
    I hope this helps you

    Regards,
    Zenax
    Regards,
    Zenax

  5. #5
    Ferinos's Avatar
    Ferinos is offline x10Hosting Member Ferinos is an unknown quantity at this point
    Join Date
    Nov 2006
    Location
    England but Half Scottish
    Posts
    69

    Re: How do I edit the header.php on phpnuke?

    K, I did that, went to my site to check it and it's taking ages to oad. I'll try later, in the meantime, can someone tell me how long I have b4 my account gets terminated for no ad, and who I can talk to about my probs, so that I might not get banned, this site means a lot to both me and my clan, for over a year we've been trying to get a decent site, we cannot lose this, so please, post the admin/site owners username so I can contact him.

  6. #6
    Ferinos's Avatar
    Ferinos is offline x10Hosting Member Ferinos is an unknown quantity at this point
    Join Date
    Nov 2006
    Location
    England but Half Scottish
    Posts
    69

    Re: How do I edit the header.php on phpnuke?

    Ok, thats slowed my site right down, I waited, and it said it took 2 mins to generate the home page, and that's only since I modified the footer.php, and it still doesn't show up. I get this standard footer message about licensed by php view the licence here, registere by blah blah, but no text link!

    Is it me doing something wrong still, please help, before I tear my hair out completely!!!

  7. #7
    Ferinos's Avatar
    Ferinos is offline x10Hosting Member Ferinos is an unknown quantity at this point
    Join Date
    Nov 2006
    Location
    England but Half Scottish
    Posts
    69

    Re: How do I edit the header.php on phpnuke?

    My site is at normal speed again now, after I removed the code from the footer, which still wouldn't display. Also, I uploaded the theme sub black how the instructions said to, and it isn't listed in my account themes, or my site themes.

    I have downloaded the theme subblack from a php theme download site, if anyone could give me EXACT instructions on how to upload this for use on my site/member profiles, as I have never done anything like this before, I would be most grateful, cheers peeps.
    Last edited by Ferinos; 11-20-2006 at 09:06 AM.

  8. #8
    Ferinos's Avatar
    Ferinos is offline x10Hosting Member Ferinos is an unknown quantity at this point
    Join Date
    Nov 2006
    Location
    England but Half Scottish
    Posts
    69

    Re: How do I edit the header.php on phpnuke?

    Ok, here's the footer code for my site without any editing. I cannot get it to display with the text link, so could someone please modify it with the advanced text code, place it where it needs to be, then paste the whole thing in a reply? Cheers peeps, my footer is;;
    PHP Code:
    <?php

    /************************************************************************/
    /* PHP-NUKE: Advanced Content Management System                         */
    /* ============================================                         */
    /*                                                                      */
    /* Copyright (c) 2005 by Francisco Burzi                                */
    /* [url]http://phpnuke.org[/url]                                                   */
    /*                                                                      */
    /* This program is free software. You can redistribute it and/or modify */
    /* it under the terms of the GNU General Public License as published by */
    /* the Free Software Foundation; either version 2 of the License.       */
    /************************************************************************/

    if (stristr(htmlentities($_SERVER['PHP_SELF']), "footer.php")) 
        
    Header("Location: index.php");
        die();
    }

    define('NUKE_FOOTER'true);

    function 
    footmsg() {
        global 
    $foot1$foot2$foot3$copyright$total_time$start_time$commercial_license$footmsg;
        
    $mtime microtime();
        
    $mtime explode(" ",$mtime);
        
    $mtime $mtime[1] + $mtime[0];
        
    $end_time $mtime;
        
    $total_time = ($end_time $start_time);
        
    $total_time _PAGEGENERATION." ".substr($total_time,0,4)." "._SECONDS;
        
    $footmsg "<span class=\"footmsg\">\n";
        if (!empty(
    $foot1))     $footmsg .= $foot1."<br>\n";
        }
        if (!empty(
    $foot2)) {
            
    $footmsg .= $foot2."<br>\n";
        }
        if (!empty(
    $foot3)) {
            
    $footmsg .= $foot3."<br>\n";
        }
        
    // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
        // IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK: [url]http://phpnuke.org/modules.php?name=Commercial_License[/url]
        // PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
        
    if ($commercial_license == 1) {
            
    $footmsg .= $total_time."<br>\n</span>\n";
        } else {
            
    $footmsg .= $copyright."<br>$total_time<br>\n</span>\n";
        }
        echo 
    $footmsg;
    }

    function 
    foot() {
        global 
    $prefix$user_prefix$db$index$user$cookie$storynum$user$cookie$Default_Theme$foot1$foot2$foot3$foot4$home$name$admin$commercial_license;
        if(
    defined('HOME_FILE')) {
            
    blocks("Down");
        }
        if (
    basename($_SERVER['PHP_SELF']) != "index.php" AND defined('MODULE_FILE') AND file_exists("modules/$name/copyright.php") && $commercial_license != 1) {
            
    $cpname str_replace("_"" "$name);
            echo 
    "<div align=\"right\"><a href=\"javascript:openwindow()\">$cpname &copy;</a></div>";
        }
        if (
    basename($_SERVER['PHP_SELF']) != "index.php" AND defined('MODULE_FILE') AND (file_exists("modules/$name/admin/panel.php") && is_admin($admin))) {
            echo 
    "<br>";
            
    OpenTable();
            include(
    "modules/$name/admin/panel.php");
            
    CloseTable();
        }
        
    themefooter();
        if (
    file_exists("includes/custom_files/custom_footer.php")) {
            include_once(
    "includes/custom_files/custom_footer.php");
        }
        echo 
    "</body>\n</html>";
            
    ob_end_flush();
        die();


    foot();


    ?>
    Exactly like that. Thanks.

    edit by Chris Z-i [PHP]ed your code
    Last edited by Chris Z; 11-21-2006 at 07:26 AM.

  9. #9
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: How do I edit the header.php on phpnuke?

    I said that you should modify the header so that the ads will appear at the very top of the page.

    PHP Code:
    <?php 

    /************************************************************************/ 
    /* PHP-NUKE: Advanced Content Management System                         */ 
    /* ============================================                         */ 
    /*                                                                      */ 
    /* Copyright (c) 2005 by Francisco Burzi                                */ 
    /* [url]http://phpnuke.org[/url]                                                   */ 
    /*                                                                      */ 
    /* This program is free software. You can redistribute it and/or modify */ 
    /* it under the terms of the GNU General Public License as published by */ 
    /* the Free Software Foundation; either version 2 of the License.       */ 
    /************************************************************************/ 

    if (stristr(htmlentities($_SERVER['PHP_SELF']), "footer.php"))  
        
    Header("Location: index.php"); 
        die(); 


    define('NUKE_FOOTER'true); 

    function 
    footmsg() { 
        global 
    $foot1$foot2$foot3$copyright$total_time$start_time$commercial_license$footmsg
        
    $mtime microtime(); 
        
    $mtime explode(" ",$mtime); 
        
    $mtime $mtime[1] + $mtime[0]; 
        
    $end_time $mtime
        
    $total_time = ($end_time $start_time); 
        
    $total_time _PAGEGENERATION." ".substr($total_time,0,4)." "._SECONDS
        
    $footmsg "<span class=\"footmsg\">\n"
        if (!empty(
    $foot1))     $footmsg .= $foot1."<br>\n"
        } 
        if (!empty(
    $foot2)) { 
            
    $footmsg .= $foot2."<br>\n"
        } 
        if (!empty(
    $foot3)) { 
            
    $footmsg .= $foot3."<br>\n"
        } 
        
    // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS. 
        // IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK: [url]http://phpnuke.org/modules.php?name=Commercial_License[/url] 
        // PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE! 
        
    if ($commercial_license == 1) { 
            
    $footmsg .= $total_time."<br>\n</span>\n"
        } else { 
            
    $footmsg .= $copyright."<br>$total_time<br>\n</span>\n"
        } 
        echo 
    $footmsg


    function 
    foot() { 
        global 
    $prefix$user_prefix$db$index$user$cookie$storynum$user$cookie$Default_Theme$foot1$foot2$foot3$foot4$home$name$admin$commercial_license
        if(
    defined('HOME_FILE')) { 
            
    blocks("Down"); 
        } 
        if (
    basename($_SERVER['PHP_SELF']) != "index.php" AND defined('MODULE_FILE') AND file_exists("modules/$name/copyright.php") && $commercial_license != 1) { 
            
    $cpname str_replace("_"" "$name); 
            echo 
    "<div align=\"right\"><a href=\"javascript:openwindow()\">$cpname &copy;</a></div>"
        } 
        if (
    basename($_SERVER['PHP_SELF']) != "index.php" AND defined('MODULE_FILE') AND (file_exists("modules/$name/admin/panel.php") && is_admin($admin))) { 
            echo 
    "<br>"
            
    OpenTable(); 
            include(
    "modules/$name/admin/panel.php"); 
            
    CloseTable(); 
        } 
        
    themefooter(); 
        if (
    file_exists("includes/custom_files/custom_footer.php")) { 
            include_once(
    "includes/custom_files/custom_footer.php"); 
        } 
        echo 
    "</body>\n</html>"
            
    ob_end_flush(); 
        die(); 


    foot(); 



    ?> 

    <div align="center"> 
    <? include("http://staff.x10hosting.com/adCode.php?ad=advanced"); ?> 
    </div>
    But if you really want the ads in the footer, replace the footer code with what is in the modified version above. However this will only work on the advanced plan, as you know corperate plan requires the ads to be at the top of the page. This code has been modified so that it displays the advanced ads.

    If you are on the corperate plan, PM me and I shall guide you into placing the corperate plan ads in.

    EDIT: Make sure you place the code after the code of PHP NUKE, which means placing outside the end PHP tag, like shown above.
    Last edited by Zenax; 11-21-2006 at 07:47 AM.
    Regards,
    Zenax

  10. #10
    Ferinos's Avatar
    Ferinos is offline x10Hosting Member Ferinos is an unknown quantity at this point
    Join Date
    Nov 2006
    Location
    England but Half Scottish
    Posts
    69

    Re: How do I edit the header.php on phpnuke?

    Ok, I tried both of those codes, both of them slowed my site down, but not as much as before, just a lil bit, and neither worked. Could someone else check my site @ www.hawksclan.exofire.net/home and tell me if its just me that cant see it, ps, I couldn't see ANY footer.
    And who can I goto and ask not to terminate my site because I am trying to obey the rules, like I said we need this site badly.
    cheers peeps, ps, im a firefox (;latest version user) could this be the prob, I don't recall seeing anything about ff/ie etc.

Closed Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Edit FLV, Posible?
    By killerkaos in forum Graphics & Webdesign
    Replies: 3
    Last Post: 11-07-2009, 03:19 PM
  2. phpnuke theme help
    By Xempttt in forum Free Hosting
    Replies: 2
    Last Post: 09-06-2005, 06:10 AM
  3. Ads on phpnuke
    By Stiv_ in forum Free Hosting
    Replies: 4
    Last Post: 08-01-2005, 04:39 PM
  4. Cannot edit in Front Page
    By katyW in forum Free Hosting
    Replies: 9
    Last Post: 05-26-2005, 06:34 PM
  5. Integrating HLStats with PHPNuke Platinum?
    By Jordan Knezevic in forum Scripts & 3rd Party Apps
    Replies: 1
    Last Post: 03-17-2005, 01:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers