14.9. How to change a buggy PHP-Nuke theme

You changed your PHP-Nuke theme to one that is buggy. Now, you cannot see anything, or you only see errors and the Administration panel cannot be reached to change the theme - a chicken-and-egg problem...

There are various solutions to this problem:

  1. Copy the following code into a file and save it as fixtheme.php:

    <?php
    require("config.php");
    $host = $dbhost;
    $database = $dbname;
    $username = $dbuname;
    $password = $dbpass;
    $def_theme = "NukeNews";
    mysql_connect($host, $username, $password);
    @mysql_select_db($database);
    mysql_query("update ".$prefix."_config set Default_Theme='$def_theme'");
    ?>

    If you don't have the NukeNews theme uploaded in your site then change the value for $def_theme in the code above so that it reflects one of your working themes, save it, upload it to where nuke's config.php file is, then point your browser to http://yoursite.com/fixtheme.php (thanks to Humpa for this).

  2. Just rename the DeepBlue theme (or some other theme known to work) folder to the problematic one.

  3. Use phpMyAdmin and change the default_theme field in the nuke_config table.