//#####################Installation##################// // Updated Feb 23, 2005 by: Mohamed Sallam (sallam) // Rewritten Feb 19, 2003 by: P.H. Johansson (josini) // Hack rewritten according to Google restriction of max. 90 links in one page. // Updated for IPB 2 Feb 22, 2005 by: P.H. Johansson (josini) // Also the need of changing table-names have been changed to using the standard DB-class // // Installation: // 1) Now the only thing you have to do is to verify that you want 90 links on each page in $navlimit // 2) Add any forum ids you do not want to be in the sitemap (ie admin) to $admin_forums (seperate ids with commas) // 3) Upload this file to the root directory of your Board (same folder that has index.php and admin.php) // 4) Make sure that show_sitemap.php resides in that directory too...!!! // //##################End installation#################// //-------------------------------------------------------------------------- // config //-------------------------------------------------------------------------- // This file can be saved as any name, but upload to your forum dir. // But should you wish to rename this file make sure that show_sitemap.php contains the correct URL // Only real variables for you to change. Include the trailing / $navlimit=3600; // How many entries do you want on each page?? $admin_forums = "1,8,35,59"; // The Forum Ids for your admin forums that you want to hide eg $admin_forums = "3,5"; // If you have no admin forums you need to hide keep this string empty; //------------------------------------------------------------------------------- // Do Not touch anything else below this line unless you know what you are doing //------------------------------------------------------------------------------- //----------------------------------------------- // USER CONFIGURABLE ELEMENTS //----------------------------------------------- // Root path //-- mod_php5 begin $HTTP_SERVER_VARS = isset($_SERVER)?$_SERVER:array(); $HTTP_GET_VARS = isset($_GET)?$_GET:array(); $HTTP_POST_VARS = isset($_POST)?$_POST:array(); $HTTP_POST_FILES = isset($_FILES)?$_FILES:array(); $HTTP_COOKIE_VARS = isset($_COOKIE)?$_COOKIE:array(); $HTTP_ENV_VARS = isset($_ENV)?$_ENV:array(); $HTTP_SESSION_VARS = isset($_SESSION)?$_SESSION:array(); //-- mod_php5 end @header("HTTP/1.0 200 OK"); @header("HTTP/1.1 200 OK"); @header("Content-type: text/html; charset=windows-1251"); define( 'ROOT_PATH' , "./" ); define( 'KERNEL_PATH', ROOT_PATH.'ips_kernel/' ); // Enable module usage? // (Vital for some mods and IPB enhancements) define ( 'USE_MODULES', 1 ); // Enable shut down features? // Uses PHPs register_shutdown_function to save // low priority tasks until end of exec define ( 'USE_SHUTDOWN', 1 ); $templates_dir = ROOT_PATH."ssi_templates"; $max_show = 100; // Maximum number of topics possible to show... $allow_syndication = 1; // To turn off, use $allow_syndication = 0; //----------------------------------------------- // NO USER EDITABLE SECTIONS BELOW //----------------------------------------------- define ( 'IN_IPB', 1 ); define ( 'IN_DEV', 0 ); error_reporting (E_ERROR | E_WARNING | E_PARSE); //set_magic_quotes_runtime(0); php5 if( version_compare( phpversion(), '5.4.0', '<') ) { set_magic_quotes_runtime(0); if ( ! defined( 'IPS_MAGIC_QUOTES' ) ) { define( 'IPS_MAGIC_QUOTES', get_magic_quotes_gpc() ); } } else { if ( ! defined( 'IPS_MAGIC_QUOTES' ) ) { define( 'IPS_MAGIC_QUOTES', false ); } } //set_magic_quotes End class info { var $input = array(); var $base_url = ""; var $vars = ""; function __construct() { global $sess, $std, $DB, $INFO; $this->vars = $INFO; } } //-------------------------------- // Import $INFO, now! //-------------------------------- require ROOT_PATH."conf_global.php"; //-------------------------------- // Require our global functions //-------------------------------- require ROOT_PATH."sources/functions.php"; $std = new FUNC; //-------------------------------- // Load the DB driver and such //-------------------------------- $INFO['sql_driver'] = ! $INFO['sql_driver'] ? 'mysql' : strtolower($INFO['sql_driver']); //require ( KERNEL_PATH.'class_db_'.$INFO['sql_driver'].".php" ); require ( "sources/Drivers/mySQL.php" ); $DB = new db_driver; $DB->obj['sql_database'] = $INFO['sql_database']; $DB->obj['sql_user'] = $INFO['sql_user']; $DB->obj['sql_pass'] = $INFO['sql_pass']; $DB->obj['sql_host'] = $INFO['sql_host']; $DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; $DB->obj['query_cache_file'] = ROOT_PATH.'sources/sql/'.$INFO['sql_driver'].'_queries.php'; $DB->obj['use_shutdown'] = USE_SHUTDOWN; //----------------------------------- // Required vars? //----------------------------------- if ( is_array( $DB->connect_vars ) and count( $DB->connect_vars ) ) { foreach( $DB->connect_vars as $k => $v ) { $DB->connect_vars[ $k ] = $INFO[ $k ]; } } //-------------------------------- // Get a DB connection //-------------------------------- $DB->connect(); $DB->query("SET CHARACTER SET cp1251"); ?>