I ask because the TeamSpeak MOD that I have that works with 1.4.0 doesn't work with 1.4.1
Ver. 1.4 code
- Code: Select all
<?php/*************************************************************************** * admin_teamspeak.php * ------------------- ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // Admin Panelif( !empty($setmodules) ){ $filename = basename(__FILE__); $module['TS_Admin']['TS_Config'] = $filename; return;} define('IN_PHPBB', true);//// Let's set the root dir for phpBB//$phpbb_root_path = '../';require($phpbb_root_path . 'extension.inc');require('pagestart.' . $phpEx);require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_teamspeak.' . $phpEx);include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); //// Pull Configuration Data//$sql = "SELECT * FROM phpbb_teamspeak";if(!$result = $db->sql_query($sql)){ message_die(CRITICAL_ERROR, "Could not query config information in phpbb_teamspeak table", "", __LINE__, __FILE__, $sql);}else{ while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = isset($_POST['submit']) ? str_replace("'", "'", $config_value) : $config_value; $new[$config_name] = ( isset($_POST[$config_name]) ) ? $_POST[$config_name] : $default_config[$config_name]; if( isset($_POST['submit']) ) { $sql = "UPDATE phpbb_teamspeak SET config_value = '" . str_replace("'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Failed to update configuration for $config_name", "", __LINE__, __FILE__, $sql); } } } if( isset($_POST['submit']) ) { $message = $lang['Config_updated'] . "<br><br>" . sprintf($lang['Click_return_config'], "<a>", "</a>") . "<br><br>" . sprintf($lang['Click_return_admin_index'], "<a>", "</a>"); message_die(GENERAL_MESSAGE, $message); }} $template->set_filenames(array( 'body' => 'admin/teamspeak_config_body.tpl')); $template->assign_vars(array( 'TS_CONFIGURATION_TITLE' => $lang['TS_CONFIGURATION_TITLE'], 'TS_EXPLANATION' => $lang['TS_EXPLANATION'], 'L_IP_ADDRESS' => $lang['IP_ADDRESS'], 'L_UPD_PORT' => $lang['UDP_PORT'], 'Q_PORT' => $lang['Q_PORT'], 'L_RENAME_USER' => $lang['RENAME_USER'], 'TS_GENERAL_SETTINGS' => $lang['TS_GENERAL_SETTINGS'], 'Q_PORT_EXPLAIN' => $lang['Q_PORT_EXPLAIN'], 'RENAME_USER_EXPLAIN' => $lang['RENAME_USER_EXPLAIN'], 'IP_ADDRESS' => $new['ip_address'], 'UDP_PORT' => $new['udp_port'], 'QUERY_PORT' => $new['query_port'], 'RENAME_USER' => $new['rename_user'], 'S_CONFIG_ACTION' => append_sid("admin_teamspeak.$phpEx"), 'TS_SUBMIT' => $lang['TS_SUBMIT'], 'TS_RESET' => $lang['TS_RESET'] )); $template->pparse("body"); include('./page_footer_admin.'.$phpEx); ?>
Is there anything there that I need to change for it to work with 1.4.1? When I click the submit, it says it submits to DB but in reality it doesn't.