foruma bir eklenti eklerken install da sorun yaşadım bir bakın arkadaşlar. install dosyası aşağıdaki gibi.
Kod:
<?php
#########################################################
## SQL commands to phpBB2
## Author: Niels Chr. Rød
## Nickname: Niels Chr. Denmark
## Web: http://mods.db9.dk
## Email: ncr@db9.dk
##
## Ver 1.0.9
##
## phpBB2 database update script for mods
## this file is intended to use with phpBB2, when installing mods
## after so you may delete this file, but only admin can use so it really doesen't matter
## The script will look what prefix you are using, and use the existing DB defined by congig.php
## The execution of this script's included SQL is harmless, so you can run it as meny times you like
## note, though that the users last visit, will be set back to his/her last login,
## but that is a minor cosmetic isue, that will correct it self next time the use logs in
##
## the following example are from my mods, and you can add some self, for other mods if you like
## you will after execution get a list over those commands that are run with succes and those with warnings !
## delete the sample lines if you are using it only for other mods
##
#########################################################
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
}
if ($popup != "1"){
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");
}
else
{
$phpbb_root_path = 'modules/Forums/';
}
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include('includes/functions_selects.'.$phpEx);
###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################
$sql=array(
'ALTER TABLE '.FORUMS_TABLE.' ADD auth_ban TINYINT (2) not null DEFAULT "3"',
'ALTER TABLE '.FORUMS_TABLE.' ADD auth_greencard TINYINT (2) not null DEFAULT "5"',
'ALTER TABLE '.FORUMS_TABLE.' ADD auth_bluecard TINYINT (2) not null DEFAULT "1"',
'ALTER TABLE '.AUTH_ACCESS_TABLE.' ADD auth_ban TINYINT (1) not null DEFAULT "0"',
'ALTER TABLE '.AUTH_ACCESS_TABLE.' ADD auth_greencard TINYINT (1) not null DEFAULT "0"',
'ALTER TABLE '.AUTH_ACCESS_TABLE.' ADD auth_bluecard TINYINT (1) not null DEFAULT "0"',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("bluecard_limit", "3")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("bluecard_limit_2", "1")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("max_user_bancard", "10")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("report_forum", "0")',
'ALTER TABLE '.USERS_TABLE.' ADD user_warnings SMALLINT (5) DEFAULT "0"',
'ALTER TABLE '.POSTS_TABLE.' ADD post_bluecard TINYINT (1)'
);
if ($userdata['user_level']!=ADMIN)
message_die(GENERAL_ERROR, "You are not Authorised to do this");
$n=0;
$message="<b>This list is a result of the SQL queries needed for this Mod</b><br/><br/>";
while($sql[$n])
{
$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
if(!$result = $db->sql_query($sql[$n]))
$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
$n++;
}
message_die(GENERAL_MESSAGE, $message);
?>
bunu sql sorgusu haline getirmem lazım, yardımcı olurmusunuz?
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız