קוד: בחר הכל
################################################################
## COLOR GROUPS ##
## 1.2.1 ##
################################################################
##
## Description: This mod will replace the current
## name colorization with a group
## system. You may define your group
## name, group color, and group members.
##
## Compatibility: phpBB - 2.0.4 - 2.0.6, 2.0.13 - 2.0.17
## (probably works with any version above 2.0.5)
## php - 4.0.1 or above
################################################################
## This hack brought to you by donation support from Kozy. ##
## Visit him at Kozy Net (http://www.kozysplace.net) to ##
## offer your thanks. ##
################################################################
****************************************************************
** Author: Nivisec ([email protected]) **
** http://www.nivisec.com **
** **
** Language **
** Files At: http://www.nivisec.com/phpbb.php?l=la **
****************************************************************
################################################################
## Installation Level: Fairly Easy
## Installation Time: 10-15 minutes
##
## Author Notes:
## Once installed, you will have a new admin panel
## option called "Color Groups" under the "Group Admin"
## area.
##
## Support: http://www.phpbbhacks.com/forums
## Copyright: ©2002-2003 Nivisec.com
##
################################################################
## ********* UPDATING *********
## Please see the goodies/updating/ directory
## for information on upgrading from a previous
## version.
################################################################
עכשיו,הרצתי את השורות האלו ב db:
קוד: בחר הכל
CREATE TABLE `phpbb_color_groups` (
`group_id` mediumint(8) unsigned NOT NULL auto_increment,
`group_name` varchar(255) NOT NULL default '',
`group_color` varchar(50) NOT NULL default '',
PRIMARY KEY (`group_id`),
UNIQUE KEY `group_name` (`group_name`)
) TYPE=MyISAM ;
ALTER TABLE `phpbb_users` ADD `user_color_group` MEDIUMINT UNSIGNED NOT NULL ;
ALTER TABLE `phpbb_color_groups` ADD `hidden` TINYINT( 1 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `phpbb_color_groups` ADD `order_num` MEDIUMINT NOT NULL ;
ALTER TABLE `phpbb_groups` ADD `group_color_group` MEDIUMINT UNSIGNED NOT NULL ;
ואת השורה הזאת:
קוד: בחר הכל
ALTER TABLE `phpbb_groups` ADD `group_color_group` MEDIUMINT UNSIGNED NOT NULL ;
ואני מקבל את השגיאה הזאת:
קוד: בחר הכל
Error querying the users table.
DEBUG MODE
SQL Error : 1146 Table 'if_876328_Betar.COLOR_GROUPS_TABLE' doesn't exist
SELECT group_id, group_name FROM COLOR_GROUPS_TABLE
Line : 145
File : admin_color_groups.php
למישהו יש רעיון איך לפתור את הבעיה?
עריכה:
קוד: בחר הכל
$sql = 'SELECT group_id, group_name FROM ' . COLOR_GROUPS_TABLE;
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, $lang['Error_Users_Table'], '', __LINE__, __FILE__, $sql);
while ($row = $db->sql_fetchrow($result))
{
$c_groups[$row['group_id']] = stripslashes($row['group_name']);
}
return $c_groups;
זאת השורה של השגאיה,אני מבין שמשהו לא בסדר בשם של הטבלה,כי הטבלה נוצרה..
אז צריך לשנות את שם הטבלה נכון? זה משהו של אותיות גדולות וקטנות או משהו כזה נכון?
אבל אני לא ממש יודע למה לשנות את זה...