Sub Menu
Links Menu
Online Users

In total there are 574 users online :: 2 registered, 0 hidden and 572 guests

Most users ever online was 1091 on Wed Aug 16, 2023 5:27 pm

Registered users: Majestic-12 [Bot], Yandex based on users active over the past 60 minutes

Question of MODing curiosity

This forum is purely to discuss issues with the released public betas of IntegraMOD to discuss

Moderator: Integra Moderator

Question of MODing curiosity

PostAuthor: Demonicpagan » Wed Oct 11, 2006 5:03 am

Is there any difference really in the coding of an admin mod in refrence to db submission and retrieval?

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.
Last edited by Demonicpagan on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Demonicpagan
Members
Members
 
Posts: 55
Likes: 0 post
Liked in: 0 post
Joined: Tue Aug 01, 2006 1:02 am
Cash on hand: 0.00

PostAuthor: MadUser » Mon Oct 23, 2006 3:29 am

you mean, there is no error message?
it looks like evetything going well?
Last edited by MadUser on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Joined: Mon Jul 10, 2006 11:26 pm
Cash on hand: 0.00

Re: Question of MODing curiosity

PostAuthor: Teelk » Mon Oct 23, 2006 3:21 pm

Everything should work exactly the same in that regard. I honestly don't know what the problem would be.
Last edited by Teelk on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 5:25 pm
Cash on hand: 0.00
Location: Canada


Return to IntegraMOD Public Beta

Who is online

Registered users: Majestic-12 [Bot], Yandex

cron