PHP Nuke

Update: January 8th, 2010
  1. Download the latest version here.
  2. Unzip contents and edit config.php to your liking. Ensure that the MySQL settings are correct so that create_table.php will finish successfully.
  3. Upload the wowhead directory to the base directory of your PHP-Nuke installation.
  4. Upload wowhead.css to ./themes//style/ located relative your installation. will be the name of your theme.
  5. Open ./mainfile.php
    • Find:
      // End the transaction
      if(!defined('END_TRANSACTION')) {
        define('END_TRANSACTION', 2);
      }
      				
      Immediately after add:
      include_once('wowhead/parse.php');
    • Find:
      function check_words($Message) {
      	global $CensorMode, $CensorReplace, $EditedMessage;
      	include("config.php");
      	$EditedMessage = $Message;
      	if ($CensorMode != 0) {
      		if (is_array($CensorList)) {
      			$Replace = $CensorReplace;
      			if ($CensorMode == 1) {
      				for ($i = 0; $i < count($CensorList); $i++) {
      					$EditedMessage = eregi_replace("$CensorList[$i]([^a-zA-Z0-9])","$Replace\\1",$EditedMessage);
      				}
      			} elseif ($CensorMode == 2) {
      				for ($i = 0; $i < count($CensorList); $i++) {
      					$EditedMessage = eregi_replace("(^|[^[:alnum:]])$CensorList[$i]","\\1$Replace",$EditedMessage);
      				}
      			} elseif ($CensorMode == 3) {
      				for ($i = 0; $i < count($CensorList); $i++) {
      					$EditedMessage = eregi_replace("$CensorList[$i]","$Replace",$EditedMessage);
      				}
      			}
      		}
      	}
      	return ($EditedMessage);
      }
      				
      Immediately before
      	return ($EditedMessage);
      Add:
      	$EditedMessage = whp_parse($EditedMessage);
    • Save and close mainfile.php and reupload as necessary.
  6. Open ./header.php and find:
    echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"backend.php\">\n";
    echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
    		
    Immediately after add:
    	echo '<!-- Wowhead Item Links -->\n';
    echo '<link href="themes/'. $ThemeSel . '/style/wowhead.css" rel="stylesheet" type="text/css" />\n';
    echo '<script src="http://www.wowhead.com/widgets/power.js"></script>\n';
    echo '<link href="themes/' . $ThemeSel . '/style/armory.css" rel="stylesheet" type="text/css" />\n';
    echo '<script src="./wowhead/js/armory.js.php" type="text/javascript"></script>\n';
    		
    Save header.php and reupload as necessary.
  7. You’re done!
TOP