query("CREATE TABLE `".$db->prefix."links_category` ( `id` int(11) NOT NULL auto_increment, `category` varchar(255) default NULL, `column` int(1) default NULL, `height` int(11) default NULL, PRIMARY KEY (`id`)) ") or error('Unable to create the '.$db->prefix.'links_category table', __FILE__, __LINE__, $db->error()); $db->query("CREATE TABLE `".$db->prefix."links_links` ( `id` int(11) NOT NULL auto_increment, `name_link` varchar(255) default NULL, `url` varchar(255) default NULL, `category` int(11) default NULL, `target` varchar(6) default NULL, `image` varchar(255) NOT NULL, `show` int(1) default NULL, `hits` int(100) default NULL, PRIMARY KEY (`id`)) ") or error('Unable to create the '.$db->prefix.'links_links table', __FILE__, __LINE__, $db->error()); $db->query("INSERT INTO ".$db->prefix."links_category ( `category` , `column` , `height` ) VALUES ( 'Credits', '1', '100' ) ") or error('Unable to insert category into the '.$db->prefix.'links_links table', __FILE__, __LINE__, $db->error()); $db->query("INSERT INTO ".$db->prefix."links_links ( `name_link`, `url`, `category`, `target`, `image`, `show`, `hits` ) VALUES ( 'Famfamfam', 'http://www.famfamfam.com', '1', '_blank', '' , '1', '' ), ( 'PunBB', 'http://punbb.org', '1', '_blank', '' , '1', '' ), ( 'PunRes', 'http://punres.org', '1', '_blank', '' , '1', '' ), ( 'Kierownik', 'http://kierownik.nl', '1', '_blank', '' , '1', '' ) ") or error('Unable to insert links into the '.$db->prefix.'links_links table', __FILE__, __LINE__, $db->error()); $links_config = array( 'o_links_guest_posts' => 'NULL', 'o_links_review' => 'NULL', 'o_links_debug_info' => 'NULL', 'o_links_send_mail' => 'NULL', 'o_links_captcha' => 'NULL', 'o_links_hits_count' => 'NULL' ); foreach($links_config AS $key => $value) { $db->query("INSERT INTO ".$db->prefix."config (conf_name, conf_value) VALUES ('$key', '".$db->escape($value)."') ") or error('Unable to add column "'.$key.'" to config table', __FILE__, __LINE__, $db->error()); } break; } } // This following function will be called when the user presses the "Restore" button (only if $mod_uninstall is true (see above)) function restore() { global $db, $db_type, $pun_config; // DO DATABASE RESTORE HERE switch ($db_type) { default: $db->query("DROP TABLE ".$db->prefix."links_links") or error('Unable to drop table "links_links"', __FILE__, __LINE__, $db->error()); $db->query("DROP TABLE ".$db->prefix."links_category") or error('Unable to drop table "links_category"', __FILE__, __LINE__, $db->error()); $links_config = array( 'o_links_guest_posts' => '0', 'o_links_review' => '0', 'o_links_debug_info' => '0', 'o_links_send_mail' => '0', 'o_links_captcha' => '0', 'o_links_hits_count' => '0' ); foreach($links_config AS $key => $value) { $db->query("DELETE FROM ".$db->prefix."config where conf_name = '$key' ") or error('Unable to drop column "'.$key.'" from config table', __FILE__, __LINE__, $db->error()); } break; } } /***********************************************************************/ // DO NOT EDIT ANYTHING BELOW THIS LINE! // Circumvent maintenance mode define('PUN_TURN_OFF_MAINT', 1); define('PUN_ROOT', './'); require PUN_ROOT.'include/common.php'; // We want the complete error message if the script fails if (!defined('PUN_DEBUG')) define('PUN_DEBUG', 1); // Make sure we are running a PunBB version that this mod works with $version_warning = false; if(!in_array($pun_config['o_cur_version'], $punbb_versions)) { foreach ($punbb_versions as $temp) { if (substr($temp, 0, 3) == substr($pun_config['o_cur_version'], 0, 3)) { $version_warning = true; break; } } if (!$version_warning) exit('You are running a version of PunBB ('.$pun_config['o_cur_version'].') that this mod does not support. This mod supports PunBB versions: '.implode(', ', $punbb_versions)); } $style = (isset($cur_user)) ? $cur_user['style'] : $pun_config['o_default_style']; ?> <?php echo $mod_title ?> installation

Installation successful

Your database has been successfully prepared for . See readme.txt for further instructions.

Restore successful

Your database has been successfully restored.

Mod installation

This script will update your database to work with the following modification:

Mod title:

Author: ()

Disclaimer: Mods are not officially supported by PunBB. Mods generally can't be uninstalled without running SQL queries manually against the database. Make backups of all data you deem necessary before installing.

If you've previously installed this mod and would like to uninstall it, you can click the restore button below to restore the database.

Warning: The mod you are about to install was not made specifically to support your current version of PunBB (). However, in most cases this is not a problem and the mod will most likely work with your version as well. If you are uncertain about installning the mod due to this potential version conflict, contact the mod author.