reput modunda sql sorunu...
Tarih:
25.03.2006, 19:15
babish
abi forumda aradım biraz ama bulamadım..
hata msjı..
Could not obtain reputation stats for this user
DEBUG MODE
SQL Error : 1146 Table 'aktiffor_forum.aktiffor_reputation' doesn't exist
SELECT COUNT(user_id) AS count_reps FROM aktiffor_reputation AS r WHERE r.user_id = 12 GROUP BY user_id
Line : 1220
File : viewtopic.php
ne yapmam lazım acaba?
Tarih:
25.03.2006, 19:23
the_alorak
aktiffor_reputation
Diye yazıyor.Kurarken phpbb_reputation'i öyle düzenlemen gerekiyor. install.php varsa onun içinden düzenle.
Cvp: reput modunda sql sorunu...
Tarih:
25.03.2006, 19:28
babish
- Kod: Tümünü seç
<?php
//copyright © 2004 IdleVoid & brustverein
//copyright © 2003 Volodymy (CLowN) Skoryk
//this update template copyright © 2006 Anton Granik
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
if( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=reputation_mod_db_update_v001.$phpEx", true));
exit;
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}
$page_title = 'Setting the database for Reputation Mod v.0.0.2 by Anton Granik';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Setting the database for Reputation Mod v.0.0.2 by Anton Granik</th></tr><tr><td><span class="genmed"><ul>';
$sql = array();
$sql[] = " CREATE TABLE `" . $table_prefix . "reputation` (
`user_id` mediumint(8) NOT NULL default '0',
`user_id_2` mediumint(8) NOT NULL default '0',
`post_id` mediumint(8) NOT NULL default '0',
`rep_sum` smallint(5) NOT NULL default '0',
`rep_neg` tinyint(1) NOT NULL default '0',
`rep_comment` varchar(200) NOT NULL default '',
`rep_time` int(11) NOT NULL default '0',
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;";
$sql[] = " CREATE TABLE `" . $table_prefix . "reputation_config` (
`config_name` VARCHAR( 255 ) NOT NULL ,
`config_value` VARCHAR( 255 ) NOT NULL
)";
$sql[] = " ALTER TABLE `" . $table_prefix . "users` ADD `user_reputation` SMALLINT( 5 ) NOT NULL AFTER `user_newpasswd`";
$sql[] = " ALTER TABLE `" . $table_prefix . "users` ADD `user_rep_last_time` INT( 11 ) NOT NULL AFTER `user_reputation`";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('posts_to_earn', '50')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('rep_disable', '0')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('days_to_earn', '30')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('flood_control_time', '30')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('graphic_version', '1')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('medal4_to_earn', '10')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('medal3_to_earn', '50')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('medal2_to_earn', '100')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('medal1_to_earn', '200')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('given_rep_to_earn', '20')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('show_stats_to_mods', '0')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('repsum_limit', '0')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('pm_notify', '1')";
$sql[] = " INSERT INTO `" . $table_prefix . "reputation_config` VALUES ('default_amount', '0')";
$errors = 0;
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
}
}
if ($errors == 0)
echo '<tr><th>Finish</th></tr><tr><td><span class="med">Now run <a href="reputation_mod_install_users_v002.php">reputation_mod_install_users_v002.php</a> to create reputations for users with default settings. Or go to the admin panel -> reputation and change the config values according to what you want on your board and run the file after that.</span></td></tr></table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
bu var abi neresini düzenlicem? sanırım öle bi yer yok..?
Tarih:
25.03.2006, 19:33
the_alorak
Şimdilik config.php de $table_prefix bölümünü "aktiffor_" yap.(Bu arada siten açılmaz ama install.php yi çalıştır)Sonra tekrar "phpbb_" yap.Olur sanırım.
Tarih:
25.03.2006, 19:39
babish
o kısım zaten aktiffor_ abi.. başka ne yapabilirm?
install edince de şu hataları veriyor
[code]CREATE TABLE `aktiffor_reputation` ( `user_id` mediumint(8) NOT NULL default '0', `user_id_2` mediumint(8) NOT NULL default '0', `post_id` mediumint(8) NOT NULL default '0', `rep_sum` smallint(5) NOT NULL default '0', `rep_neg` tinyint(1) NOT NULL default '0', `rep_comment` varchar(200) NOT NULL default '', `rep_time` int(11) NOT NULL default '0', KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+++ Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 10
CREATE TABLE `aktiffor_reputation_config` ( `config_name` VARCHAR( 255 ) NOT NULL , `config_value` VARCHAR( 255 ) NOT NULL )
+++ Error: Table 'aktiffor_reputation_config' already exists
ALTER TABLE `aktiffor_users` ADD `user_reputation` SMALLINT( 5 ) NOT NULL AFTER `user_newpasswd`
+++ Error: Duplicate column name 'user_reputation'
ALTER TABLE `aktiffor_users` ADD `user_rep_last_time` INT( 11 ) NOT NULL AFTER `user_reputation`
+++ Error: Duplicate column name 'user_rep_last_time'
INSERT INTO `aktiffor_reputation_config` VALUES ('posts_to_earn', '50')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('rep_disable', '0')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('days_to_earn', '30')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('flood_control_time', '30')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('graphic_version', '1')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('medal4_to_earn', '10')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('medal3_to_earn', '50')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('medal2_to_earn', '100')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('medal1_to_earn', '200')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('given_rep_to_earn', '20')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('show_stats_to_mods', '0')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('repsum_limit', '0')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('pm_notify', '1')
+++ Successfull
INSERT INTO `aktiffor_reputation_config` VALUES ('default_amount', '0')
+++ Successfull
Tarih:
25.03.2006, 19:40
the_alorak
bu sql'u onu aktiffor_ yaptıktan önce mi kurdun? Bir de phpbb_ yapıp dener misin.Kesinlikle olmasa bile sorun olmaz.
Tarih:
25.03.2006, 19:46
babish
önceden aktiffor_ du zaten abi bu hataları verdi sonra tekrar phpbb_ yapıp denedim db ye ulaşılamıyor hatası vardi..
+
abi aktiffor_reputation diye manuel ekledim oldu...
ama bunda puan verince azalıyor kendi puanın...??
Cvp: reput modunda sql sorunu...
Tarih:
25.03.2006, 20:27
MatrixNeo
bunu install.php yapıp çalıştır.sorun düzelir
- Kod: Tümünü seç
<?php
//copyright © 2004 IdleVoid & brustverein
//copyright © 2003 Volodymy (CLowN) Skoryk
//this update template copyright © 2006 Anton Granik
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
if( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=reputation_mod_db_update_v001.$phpEx", true));
exit;
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}
$page_title = 'Setting the database for Reputation Mod v.0.0.2 by Anton Granik';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Setting the database for Reputation Mod v.0.0.2 by Anton Granik</th></tr><tr><td><span class="genmed"><ul>';
$sql = array();
$sql[] = " CREATE TABLE `aktiffor_reputation` (
`user_id` mediumint(8) NOT NULL default '0',
`user_id_2` mediumint(8) NOT NULL default '0',
`post_id` mediumint(8) NOT NULL default '0',
`rep_sum` smallint(5) NOT NULL default '0',
`rep_neg` tinyint(1) NOT NULL default '0',
`rep_comment` varchar(200) NOT NULL default '',
`rep_time` int(11) NOT NULL default '0',
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;";
$sql[] = " CREATE TABLE `aktiffor_reputation_config` (
`config_name` VARCHAR( 255 ) NOT NULL ,
`config_value` VARCHAR( 255 ) NOT NULL
)";
$sql[] = " ALTER TABLE `aktiffor_users` ADD `user_reputation` SMALLINT( 5 ) NOT NULL AFTER `user_newpasswd`";
$sql[] = " ALTER TABLE `aktiffor_users` ADD `user_rep_last_time` INT( 11 ) NOT NULL AFTER `user_reputation`";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('posts_to_earn', '50')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('rep_disable', '0')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('days_to_earn', '30')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('flood_control_time', '30')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('graphic_version', '1')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('medal4_to_earn', '10')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('medal3_to_earn', '50')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('medal2_to_earn', '100')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('medal1_to_earn', '200')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('given_rep_to_earn', '20')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('show_stats_to_mods', '0')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('repsum_limit', '0')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('pm_notify', '1')";
$sql[] = " INSERT INTO `aktiffor_reputation_config` VALUES ('default_amount', '0')";
$errors = 0;
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
}
}
if ($errors == 0)
echo '<tr><th>Finish</th></tr><tr><td><span class="med">Now run <a href="reputation_mod_install_users_v002.php">reputation_mod_install_users_v002.php</a> to create reputations for users with default settings. Or go to the admin panel -> reputation and change the config values according to what you want on your board and run the file after that.</span></td></tr></table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>