Knowledge Base()
!!!

##############################################################
## MOD : Knowledge Base
## MOD : 2.1.0
## MOD :Sandprince
## MOD : . !!!

!

## : 4
## viewonline.php,
## includes/page_header.php,
## language/lang_english/lang_main.php,
## templates/subSilver/overall_header.tpl

## : 105
## root/kb.php,
## root/admin/admin_kb.php (1),
## root/kb/admin/*.php (5),
## root/kb/includes/*.php (6),
## root/kb/includes/*.php, (2),
## root/kb/language/lang_english/*.php (2),
## root/kb/modules/*.php (12),
## root/kb/modules/tabs/*.* (2),
## root/kb/includes/js/*.* (7),
## root/kb/shared/DynamicTree/*.* (3),
## root/kb/shared/DynamicTree/images/*.* (17),
## root/kb/shared/XulMenu/*.* (3),
## root/kb/shared/XulMenu/images/*.* (2),
## root/kb/shared/XulTabs/*.* (2),
## root/templates/print_version.css
## root/templates/subSilver/*.tpl (14),
## root/templates/subSilver/admin/*.tpl (17),
## root/templates/subSilver/images/lang_english/*.gif (7),
## root/templates/subSilver/images/*.gif (3),
## root/kb_install.php,
## root/kb_uninstall.php

:

1. phpBB2 .
2. kb_install.php mysql-a :

CREATE TABLE `phpbb_kb_articles` (
`article_id` mediumint(8) unsigned NOT NULL auto_increment,
`article_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
`article_description` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
`article_category_id` mediumint(8) unsigned NOT NULL default '0',
`approved` tinyint(1) unsigned NOT NULL default '0',
`article_body` text NOT NULL,
`bbcode_uid` varchar(10) character set latin1 collate latin1_bin NOT NULL default '',
`article_type` mediumint(8) unsigned NOT NULL default '0',
`article_date` int(50) default NULL,
`article_author_id` mediumint(8) NOT NULL,
`username` varchar(255) default NULL,
`topic_id` mediumint(8) unsigned NOT NULL default '0',
`views` bigint(8) NOT NULL default '0',
PRIMARY KEY (`article_id`)
);


CREATE TABLE `phpbb_kb_categories` (
`category_id` int(10) NOT NULL auto_increment,
`category_name` text,
`category_details` text,
`parent` int(50) default NULL,
`parents_data` text NOT NULL,
`cat_order` int(50) default NULL,
`cat_allow_file` tinyint(2) NOT NULL default '1',
`cat_allow_comments` tinyint(2) NOT NULL default '-1',
`internal_comments` tinyint(2) NOT NULL default '-1',
`autogenerate_comments` tinyint(2) NOT NULL default '-1',
`comments_forum_id` mediumint(8) NOT NULL default '-1',
`cat_allow_ratings` tinyint(2) NOT NULL default '-1',
`show_pretext` tinyint(2) NOT NULL default '-1',
`notify` tinyint(2) NOT NULL default '-1',
`notify_group` mediumint(8) NOT NULL default '-1',
`number_articles` mediumint(8) NOT NULL default '-1',
`cat_last_article_id` mediumint(8) unsigned NOT NULL default '0',
`cat_last_article_name` varchar(255) NOT NULL default '',
`cat_last_article_time` int(50) unsigned NOT NULL default '0',
`auth_view` tinyint(3) NOT NULL default '0',
`auth_post` tinyint(3) NOT NULL default '0',
`auth_rate` tinyint(3) NOT NULL default '0',
`auth_view_comment` tinyint(3) NOT NULL default '0',
`auth_post_comment` tinyint(3) NOT NULL default '0',
`auth_edit_comment` tinyint(3) NOT NULL default '0',
`auth_delete_comment` tinyint(3) NOT NULL default '2',
`auth_edit` tinyint(3) NOT NULL default '0',
`auth_delete` tinyint(3) NOT NULL default '2',
`auth_approval` tinyint(3) NOT NULL default '0',
`auth_approval_edit` tinyint(3) NOT NULL default '0',
`auth_view_groups` varchar(255) NOT NULL default '0',
`auth_post_groups` varchar(255) NOT NULL default '0',
`auth_rate_groups` varchar(255) NOT NULL default '0',
`auth_view_comment_groups` varchar(255) NOT NULL default '0',
`auth_post_comment_groups` varchar(255) NOT NULL default '0',
`auth_edit_comment_groups` varchar(255) NOT NULL default '0',
`auth_delete_comment_groups` varchar(255) NOT NULL default '0',
`auth_edit_groups` varchar(255) NOT NULL default '0',
`auth_delete_groups` varchar(255) NOT NULL default '0',
`auth_approval_groups` varchar(255) NOT NULL default '0',
`auth_approval_edit_groups` varchar(255) NOT NULL default '0',
`auth_moderator_groups` varchar(255) NOT NULL default '0',
PRIMARY KEY (`category_id`),
KEY `cat_order` (`cat_order`)
);

INSERT INTO `phpbb_kb_categories` VALUES (1, 'Test Category', 'Just a test category', 0, 'a:0:{}', -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 'test', 1184338675, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');

CREATE TABLE `phpbb_kb_comments` (
`comments_id` int(10) NOT NULL auto_increment,
`article_id` int(10) NOT NULL default '0',
`comments_text` text NOT NULL,
`comments_title` text NOT NULL,
`comments_time` int(50) NOT NULL default '0',
`comment_bbcode_uid` varchar(10) default NULL,
`poster_id` mediumint(8) NOT NULL default '0',
PRIMARY KEY (`comments_id`),
KEY `comments_id` (`comments_id`),
FULLTEXT KEY `comment_bbcode_uid` (`comment_bbcode_uid`)
);


CREATE TABLE `phpbb_kb_config` (
`config_name` varchar(255) NOT NULL default '',
`config_value` varchar(255) NOT NULL default '',
PRIMARY KEY (`config_name`)
);


INSERT INTO `phpbb_kb_config` VALUES ('enable_module', '1');
INSERT INTO `phpbb_kb_config` VALUES ('module_name', 'Knowledge Base');
INSERT INTO `phpbb_kb_config` VALUES ('wysiwyg_path', 'mx_mod/mx_shared/');
INSERT INTO `phpbb_kb_config` VALUES ('formatting_wordwrap', '1');
INSERT INTO `phpbb_kb_config` VALUES ('formatting_image_resize', '300');
INSERT INTO `phpbb_kb_config` VALUES ('formatting_truncate_links', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_wysiwyg', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_html', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_bbcode', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_smilies', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allowed_html_tags', 'b,i,u,a');
INSERT INTO `phpbb_kb_config` VALUES ('allow_links', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_images', '0');
INSERT INTO `phpbb_kb_config` VALUES ('no_image_message', '[No image please]');
INSERT INTO `phpbb_kb_config` VALUES ('no_link_message', '[No links please]');
INSERT INTO `phpbb_kb_config` VALUES ('max_subject_chars', '100');
INSERT INTO `phpbb_kb_config` VALUES ('max_desc_chars', '500');
INSERT INTO `phpbb_kb_config` VALUES ('max_chars', '0');
INSERT INTO `phpbb_kb_config` VALUES ('sort_method', 'Alphabetic');
INSERT INTO `phpbb_kb_config` VALUES ('sort_order', 'ASC');
INSERT INTO `phpbb_kb_config` VALUES ('pagination', '10');
INSERT INTO `phpbb_kb_config` VALUES ('stats_list', '1');
INSERT INTO `phpbb_kb_config` VALUES ('header_banner', '1');
INSERT INTO `phpbb_kb_config` VALUES ('use_simple_navigation', '1');
INSERT INTO `phpbb_kb_config` VALUES ('cat_col', '2');
INSERT INTO `phpbb_kb_config` VALUES ('settings_newdays', '1');
INSERT INTO `phpbb_kb_config` VALUES ('use_comments', '1');
INSERT INTO `phpbb_kb_config` VALUES ('internal_comments', '0');
INSERT INTO `phpbb_kb_config` VALUES ('formatting_comment_wordwrap', '1');
INSERT INTO `phpbb_kb_config` VALUES ('formatting_comment_image_resize', '300');
INSERT INTO `phpbb_kb_config` VALUES ('formatting_comment_truncate_links', '1');
INSERT INTO `phpbb_kb_config` VALUES ('max_comment_subject_chars', '50');
INSERT INTO `phpbb_kb_config` VALUES ('max_comment_chars', '5000');
INSERT INTO `phpbb_kb_config` VALUES ('allow_comment_wysiwyg', '0');
INSERT INTO `phpbb_kb_config` VALUES ('allow_comment_html', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_comment_bbcode', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_comment_smilies', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_comment_links', '1');
INSERT INTO `phpbb_kb_config` VALUES ('allow_comment_images', '0');
INSERT INTO `phpbb_kb_config` VALUES ('no_comment_image_message', '[No image please]');
INSERT INTO `phpbb_kb_config` VALUES ('no_comment_link_message', '[No links please]');
INSERT INTO `phpbb_kb_config` VALUES ('allowed_comment_html_tags', 'b,i,u,a');
INSERT INTO `phpbb_kb_config` VALUES ('del_topic', '1');
INSERT INTO `phpbb_kb_config` VALUES ('autogenerate_comments', '1');
INSERT INTO `phpbb_kb_config` VALUES ('comments_pagination', '5');
INSERT INTO `phpbb_kb_config` VALUES ('comments_forum_id', '1');
INSERT INTO `phpbb_kb_config` VALUES ('use_ratings', '1');
INSERT INTO `phpbb_kb_config` VALUES ('votes_check_userid', '1');
INSERT INTO `phpbb_kb_config` VALUES ('votes_check_ip', '1');
INSERT INTO `phpbb_kb_config` VALUES ('show_pretext', '0');
INSERT INTO `phpbb_kb_config` VALUES ('pt_header', 'Article Submission Instructions');
INSERT INTO `phpbb_kb_config` VALUES ('pt_body', 'Please check your references and include as much information as you can.');
INSERT INTO `phpbb_kb_config` VALUES ('notify', '0');
INSERT INTO `phpbb_kb_config` VALUES ('notify_group', '0');
INSERT INTO `phpbb_kb_config` VALUES ('art_pagination', '5');
INSERT INTO `phpbb_kb_config` VALUES ('news_sort', 'Alphabetic');
INSERT INTO `phpbb_kb_config` VALUES ('news_sort_par', 'ASC');


CREATE TABLE `phpbb_kb_custom` (
`custom_id` int(50) NOT NULL auto_increment,
`custom_name` text NOT NULL,
`custom_description` text NOT NULL,
`data` text NOT NULL,
`field_order` int(20) NOT NULL default '0',
`field_type` tinyint(2) NOT NULL default '0',
`regex` varchar(255) NOT NULL default '',
PRIMARY KEY (`custom_id`)
);


CREATE TABLE `phpbb_kb_customdata` (
`customdata_file` int(50) NOT NULL default '0',
`customdata_custom` int(50) NOT NULL default '0',
`data` text NOT NULL
);


CREATE TABLE `phpbb_kb_types` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`type` varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
KEY `id` (`id`)
);


CREATE TABLE `phpbb_kb_votes` (
`user_id` mediumint(8) NOT NULL default '0',
`votes_ip` varchar(50) NOT NULL default '0',
`votes_userid` int(50) NOT NULL default '0',
`votes_article` int(50) NOT NULL default '0',
`rate_point` tinyint(3) unsigned NOT NULL default '0',
KEY `user_id` (`user_id`)
);


3. kb_install.php.


#-----[ ]------------------------------------------
#
copy root/kb_install.php to kb_install.php
copy root/kb.php to kb.php
copy root/admin/admin_kb.php to admin/admin_kb.php
copy root/kb/*.* to kb/*.*
copy root/kb/admin/*.* to kb/admin/*.*
copy root/kb/cache/index.htm to kb/cache/index.htm
copy root/kb/includes/*.* to kb/includes/*.*
copy root/kb/includes/js/*.* to kb/includes/js/*.*
copy root/kb/modules/*.* to kb/modules/*.*
copy root/kb/modules/tabs/*.* to kb/modules/tabs/*.*
copy root/kb/shared/*.* to kb/shared/*.*
copy root/kb/shared/DynamicTree/*.* to kb/shared/DynamicTree/*.*
copy root/kb/shared/DynamicTree/images/*.* to kb/shared/DynamicTree/images/*.*
copy root/kb/shared/XulMenu/*.* to kb/shared/XulMenu/*.*
copy root/kb/shared/XulMenu/images/*.* to kb/shared/XulMenu/images/*.*
copy root/kb/shared/XulTabs/*.* to kb/shared/XulTabs/*.*
copy root/kb/language/*.* to kb/language/*.*
copy root/kb/language/lang_english/*.* to kb/language/lang_english/*.*
copy root/templates/print_version.css to templates/print_version.css
copy root/templates/subSilver/*.* to templates/subSilver/*.*
copy root/templates/subSilver/admin/*.* to templates/subSilver/admin/*.*
copy root/templates/subSilver/images/*.* to templates/subSilver/images/*.*

kb/cache (CHMOD) 777 !!!

...

#-----[ ]------------------------------------------------
#

viewonline.php

#
#-----[ ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "faq.$phpEx";
break;

#
#-----[ ]------------------------------------------
#
case PAGE_KB:
$location = $lang['Viewing_KB'];
$location_url = "kb.$phpEx";
break;
#
#-----[ ]------------------------------------------
#
includes/page_header.php

#
#-----[ ]------------------------------------------
#

'L_FAQ' => $lang['FAQ'],

#
#-----[ ]------------------------------------------
#

'L_KB' => $lang['KB_title'],

#
#-----[ ]------------------------------------------
#

'U_FAQ' => append_sid('faq.'.$phpEx),

#
#-----[ ]------------------------------------------
#
'U_KB' => append_sid('kb.'.$phpEx),

#
#-----[ ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ ]------------------------------------------
#

$lang['FAQ'] = 'FAQ';

#
#-----[ ]------------------------------------------
#

$lang['KB_title'] = 'Knowledge Base';

#
#-----[ ]------------------------------------------
#

$lang['Viewing_FAQ'] = 'Viewing FAQ';

#
#-----[ ]------------------------------------------
#

$lang['Viewing_KB'] = 'Viewing KB';

#
#-----[ ]------------------------------------------
#
templates/subSilver/overall_header.tpl

#
#-----[ ]------------------------------------------
#
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>

#
#-----[ ]------------------------------------------
#
<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">
#
#-----[ ]------------------------------------------
#

<a href="{U_KB}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_kb.gif" width="12" height="13" border="0" alt="{L_KB}" hspace="3" />{L_KB}</a>

#
#-----[ / ]------------------------------------------
#


!



E ...






:
!

: wtuser
: 123456zxc



/ /
: skilletbg
16:06 06-03-2011
, ... :X
1