Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/install/pn5.php
<?php

// Change those damn faq tables to lowercase if user loaded the nuke.sql from .5.1.2

$result = mysql_query("ALTER TABLE ".$prefix."_faqAnswer RENAME ".$prefix."_faqanswer");
if(!$result) {
  echo "Table faqaategories is already as it should be.<br>\n";
  echo "No need to rename it";
} else {
  echo "Table ".$prefix."_faqAnswer renamed to ".$prefix."_faqanswer<br>";
}

$result = mysql_query("ALTER TABLE ".$prefix."_faqCategories RENAME ".$prefix."_faqcategories");
if(!$result) {
  echo "Table faqcategories is already as it should be.<br>\n";
  echo "No need to rename it";
} else {
  echo "Table ".$prefix."_faqCategories renamed to ".$prefix_."faqcategories<br><br>";
}

// Add the timezone field

$result = mysql_query("ALTER TABLE users ADD timezone_offset float(3,1) DEFAULT '0.0' NOT NULL");

// Add language field for admins , no need to set a default because blank means ALL languages
mysql_query("ALTER TABLE ".$prefix."_authors ADD admlanguage VARCHAR (30) not null ");

// Add language field to automated news and fill it up with the default language
mysql_query("ALTER TABLE ".$prefix."_autonews ADD alanguage VARCHAR (30) not null ");

// Add language field to blocks, no need to fill up because blank means visible to ALL
mysql_query("ALTER TABLE ".$prefix."_blocks ADD blanguage VARCHAR (30) not null ");

// Add language field to ephemerids
mysql_query("ALTER TABLE ".$prefix."_ephem ADD elanguage VARCHAR (30) not null ");

// Add language field to faq categories
mysql_query("ALTER TABLE ".$prefix."_faqcategories ADD flanguage VARCHAR (30) not null ");

// Add language field to poll description
mysql_query("ALTER TABLE ".$prefix."_poll_desc ADD planguage VARCHAR (30) not null ");

// Add language field to submitted news in queue
mysql_query("ALTER TABLE ".$prefix."_queue ADD alanguage VARCHAR (30) not null ");

// Add language field to reviews
mysql_query("ALTER TABLE ".$prefix."_reviews ADD rlanguage VARCHAR (30) not null ");

// Add language field to waiting reviews
mysql_query("ALTER TABLE ".$prefix."_reviews_add ADD rlanguage VARCHAR (30) not null ");

// Add language field to articles in sections
mysql_query("ALTER TABLE ".$prefix."_seccont ADD slanguage VARCHAR (30) not null ");

// Add themeoverride to stories
mysql_query("ALTER TABLE ".$prefix."_stories ADD themeoverride VARCHAR (30) not null ");

// Add language field to the stories
mysql_query("ALTER TABLE ".$prefix."_stories ADD alanguage VARCHAR (30) not null ");

// Add themeoverride to stories_cat
mysql_query("ALTER TABLE ".$prefix."_stories_cat ADD themeoverride VARCHAR (30) not null ");

// Add author field to quotes
mysql_query("ALTER TABLE ".$prefix."_quotes ADD author VARCHAR (150) not null ");

// New Message System : Add message id and language field , fill up with one example to explain
// WARNING : This will drop the existing message table first !!!
mysql_query("DROP TABLE ".$prefix."_message ");
mysql_query("CREATE TABLE ".$prefix."_message (
   mid int(11) NOT NULL auto_increment,
   title varchar(100) NOT NULL,
   content text NOT NULL,
   date varchar(14) NOT NULL,
   expire int(7) DEFAULT '0' NOT NULL,
   active int(1) DEFAULT '1' NOT NULL,
   view int(1) DEFAULT '1' NOT NULL,
   mlanguage varchar(30) NOT NULL,
   PRIMARY KEY (mid),
   UNIQUE mid (mid)
)");

mysql_query("INSERT INTO ".$prefix."_message VALUES ( '1', 'Welcome to PostNuke, the =-Rogue-= release (0.7)', '<A HREF=\"http://www.PostNuke.com\">PostNuke</A> is a fork of <A HREF=\"http://www.phpnuke.org\">Francisco Burzi\'s PHP-Nuke</A> weblog/Content Management System (CMS). While <A HREF=\"http://www.PostNuke.com\">PostNuke</A> is based on PHP-Nuke 5, it offers full CSS support, HTML 4.01 transitional compliance throughout, and active decimation of bugs - the new \'Rogue release furthermore introduces an advanced blocks system, and a full multi-lingual system.<br>

<br>This new system allows posting of <b>multiple</b> messages in <b>multiple languages</b>, visible to different types of users. This central message also has an option to be posted to ALL languages at once...<br><br>

<A HREF=\"http://www.PostNuke.com\">PostNuke</A> also has a very active developer and support community at <A HREF=\"http://www.PostNuke.com\">www.PostNuke.com</A>.

We hope you will enjoy using PostNuke.

The PostNuke development Team', '993373194', '0', '1', '1', '')");

mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE bid bid INT UNSIGNED NOT NULL AUTO_INCREMENT");
mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE bkey bkey VARCHAR(255) NOT NULL");
mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE title title VARCHAR(255) NOT NULL");
mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE url url VARCHAR(255) NOT NULL");
mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE weight weight DECIMAL(10,1) NOT NULL DEFAULT 0");
mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE active active TINYINT UNSIGNED NOT NULL DEFAULT 0");
mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE refresh refresh INT UNSIGNED NOT NULL DEFAULT 0");
mysql_query("ALTER TABLE ".$prefix."_blocks CHANGE time last_update TIMESTAMP");
mysql_query("UPDATE ".$prefix."_blocks SET bkey='html' WHERE bkey=''");
mysql_query("ALTER TABLE ".$prefix."_headlines CHANGE hid id INT UNSIGNED NOT NULL AUTO_INCREMENT");
mysql_query("ALTER TABLE ".$prefix."_headlines CHANGE sitename sitename VARCHAR(255) NOT NULL DEFAULT ''");
mysql_query("ALTER TABLE ".$prefix."_headlines CHANGE headlinesurl rssurl VARCHAR(255) NOT NULL DEFAULT ''");
mysql_query("ALTER TABLE ".$prefix."_headlines ADD siteurl VARCHAR(255) NOT NULL DEFAULT ''");

?>
Return current item: ProNuke. Postnuke To Oracle