[BETA] phpBB3-Knowledgebase

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

Sajaki wrote:do you know a demo site featuring your mod with an extensive knowledgebase ? i'm really considering using your mod as a replacement of a wiki.
A Link is provided in the first post, but so you don't have to search back here it is again. This is the only site using this as it is still very much beta and should not be used live yet. If you have any questions let me know.
I intend to live forever. So far, so good.
Steven Wright
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

Blue Blood wrote:Looks Great!!
Thank you, but most of the credit goes to the previous authors as I am picking up where they left off.
I intend to live forever. So far, so good.
Steven Wright
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

Beta version 1.0.4 is now available. See first post for link.
I intend to live forever. So far, so good.
Steven Wright
User avatar
WileCoyote
Registered User
Posts: 432
Joined: Sun Jan 15, 2006 7:37 am
Location: Austria
Name: Wolfgang
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by WileCoyote »

Hi pertneer,
i've i tried to install beta 1.0.4 with AutoMOD 1.0.2. There seems to a problem with includes/acp/acp_styles.php as 'button_topic_reply', could not be found by AutoMOD. IMO you should change

Code: Select all

				<find><![CDATA['icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',]]></find>
to

Code: Select all

				<find><![CDATA[				'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_report_spam', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',]]></find>
because the mod parser searches also for the tabs at the beginning of this line.

There is a second problem i encountered with this version (and also with the original version 1.0.2). The Knowledge Base Roles seems not to be deleted on uninstall. If you deinstall and then reinstall the knowledge base you have all roles twice.
Regards
WileCoyote
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

WileCoyote wrote:Hi pertneer,
i've i tried to install beta 1.0.4 with AutoMOD 1.0.2. There seems to a problem with includes/acp/acp_styles.php as 'button_topic_reply', could not be found by AutoMOD. IMO you should change

Code: Select all

				<find><![CDATA['icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',]]></find>
to

Code: Select all

				<find><![CDATA[				'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_report_spam', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',]]></find>
because the mod parser searches also for the tabs at the beginning of this line.

There is a second problem i encountered with this version (and also with the original version 1.0.2). The Knowledge Base Roles seems not to be deleted on uninstall. If you deinstall and then reinstall the knowledge base you have all roles twice.
First question:
I have been testing with AutoMOD Version 1.0.2 and have no issues with this find. I have to assume that you have a previous mod installed that has changed this section prior to installing this mod. If you could let me know what mod it is that was installed, I will try change the find to make sure it does not conflict with it.

The seconds question:
I believe this is an issue with UMIL because UMIL is handling the installing the permissions. I have been looking into this so I can submit a bug report to them, but I want to make sure first.
I intend to live forever. So far, so good.
Steven Wright
User avatar
WileCoyote
Registered User
Posts: 432
Joined: Sun Jan 15, 2006 7:37 am
Location: Austria
Name: Wolfgang
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by WileCoyote »

I've tested the installation with quickinstall 1.1.7-RC1, AutoMOD 1.0.2 and a clean install of phpbb 3.0.11. There where no other mods installed.

For the second issue exists a workaround. Resetting the permissions in the mod maintenence section before uninstalling.

On checking some other known problems with the last original version i found some more issues.
In includes/kb.php on line 1662

Code: Select all

		$error = $article_data = array();
should be changed to

Code: Select all

		$error = $article_data = $edit_data = array();
otherwise you'll get an error message Undefined Variable 'edit_data' in includes/kb.php on line xxxx with debug mode enabled. I'm not a programmer so i don't know if this is the correct way to fix this issue but it works for me.

For correct template parsing of the plugins the corresponding function in includes/functions_plugins_kb.php should be changed to

Code: Select all

/**
* Parse a template and return the parsed text
*
* This function should be used for ALL plugins that normally use $template->assign_display to output data with the plugin system.
*/
function kb_parse_template($filename, $template_file)
{
    global $phpbb_root_path, $template, $user;
    
    //Inherited
    if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherit_path'])
    {
        $tpl_path = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/kb/plugins/';        
    }
    //not inherited
    else
    {
        $tpl_path = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/kb/plugins/';
    }
    
    // If the template file does not exist
    if (!@file_exists($tpl_path . $template_file))
    {
        $error = sprintf($user->lang['PLUGIN_TEMPLATE_MISSING'], $template_file);
    
        trigger_error($error);
    }        
    
    $template_path = 'kb/plugins/';
    
    $template->set_filenames(array(
        $filename        => $template_path . $template_file,
    ));
    
    // return the output
    return $template->assign_display($filename);
}
If this is not changed there would be problems on boards which have installed multiple styles with template inheritance activated.

Within includes/functions_kb.php in the function function feed_output($feed, $feed_type, $feed_data = false) there are also error messages when debug mode is enabled

Code: Select all

line 2420: undefined variable: sql_where
line 2421: undefined variable: sql_order
line 2441: undefined variable: title
I've solved this issue on my forum by changing the function this way:

Code: Select all

/**
* Generates feeds for display
* $feed = RSS or ATOM
* $feed_type = latest or user or cat or popular
* $feed_data (only used by user and cat) = user_id or cat_id
* Credit to EXreaction, Lithium Studios for some of the code used here and the idea for the function workings
*/
function feed_output($feed, $feed_type, $feed_data = false)
{
	global $template, $phpbb_root_path, $phpEx, $config, $db, $user;
	
	switch ($feed_type)
	{
		case 'latest':
			$title = $user->lang['KB_LATEST'];
			$sql_where = 'a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'user':
			$title = $feed_data['USERNAME'] .  ' ' . $user->lang['ARTICLE'];
			$sql_where = 'a.article_user_id = ' . $feed_data['USER_ID'] . ' AND a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'cat':
			$title = $user->lang['KB_SORT_CAT'] . ' - ' . $feed_data['CAT_NAME'] .  ' ' . $user->lang['ARTICLE'];
			$sql_where = 'a.cat_id = ' . $feed_data['CAT_ID'] . ' AND a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'popular':
			$title = $user->lang['POPULAR_ART'];
			$sql_where = 'a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_views DESC';
		break;	
	
    	$sql = $db->sql_build_query('SELECT', array(
    		'SELECT'	=> 'a.article_id, a.article_title, a.article_desc, a.article_desc_uid, a.article_user_name, a.article_time',
    		'FROM'		=> array(
    			KB_TABLE => 'a'),		
    		'WHERE'		=> "$sql_where",
    		'ORDER_BY'	=> "$sql_order",
    	));
    	$result = $db->sql_query_limit($sql, 10);
    	while ($row = $db->sql_fetchrow($result))
    	{
    		strip_bbcode($row['article_desc'], $row['article_desc_uid']);
    		$template->assign_block_vars('item', array(
    			'TITLE'				=> $row['article_title'],
    			'URL'				=> generate_board_url() . '/kb.' . $phpEx . '?a=' . $row['article_id'],
    			'USERNAME'			=> $row['article_user_name'],
    			'MESSAGE'			=> str_replace("'", ''', $row['article_desc']),
    			'PUB_DATE'			=> date('r', $row['article_time']),
    			'DATE_3339'			=> ($feed_type == 'ATOM') ? date3339($row['article_time']) : '',
    		));
    	}
    	$db->sql_freeresult($result);
    
    	$template->assign_vars(array(
    		'FEED'				=> $feed,
    		'SELF_FULL_URL'		=> generate_board_url() . '/kb.' . $phpEx . '?i=feed&feed=' . $feed . '&feed_type=' . $feed_type,
    		'TITLE'				=> $config['sitename'] . ' ' . $title . ' ' . $user->lang['FEED'],
    		'SITE_URL'			=> generate_board_url() . '/kb.' . $phpEx,
    		'SITE_DESC'			=> $config['site_desc'],
    		'SITE_LANG'			=> $config['default_lang'],
    		'CURRENT_TIME'		=> ($feed_type == 'ATOM') ? date3339() : date('r'),
    	));
    
    	// Output time
    	header('Content-type: application/xml; charset=UTF-8');
    
    	header('Cache-Control: private, no-cache="set-cookie"');
    	header('Expires: 0');
    	header('Pragma: no-cache');
    
    	$template->set_template();
    	$template->set_filenames(array(
    		'body' => 'kb/kb_feed.xml'
    	));
    
    	$template->display('body');
    
    	garbage_collection();
    	exit_handler();
	}
}
The only change is setting the "}" from line 2421 to the end of the function. Again i don't know if this is the correct solution but it seems to work.

Depending on feed output i have also a suggestion. IMO feeds should not be enabled by default. If it is possible they should be enabled or disabled with the default feed settings of the board (maybe you could extend this section for the knowledge base)

All other errors which I knew from seem to have been completly addressed with your version.

Finally i wanna thank you for keep up working on this mod. I think it's greatly appreciated not only by me
Regards
WileCoyote
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

WileCoyote wrote:I've tested the installation with quickinstall 1.1.7-RC1, AutoMOD 1.0.2 and a clean install of phpbb 3.0.11. There where no other mods installed.

For the second issue exists a workaround. Resetting the permissions in the mod maintenence section before uninstalling.

On checking some other known problems with the last original version i found some more issues.
In includes/kb.php on line 1662

Code: Select all

		$error = $article_data = array();
should be changed to

Code: Select all

		$error = $article_data = $edit_data = array();
otherwise you'll get an error message Undefined Variable 'edit_data' in includes/kb.php on line xxxx with debug mode enabled. I'm not a programmer so i don't know if this is the correct way to fix this issue but it works for me.

For correct template parsing of the plugins the corresponding function in includes/functions_plugins_kb.php should be changed to

Code: Select all

/**
* Parse a template and return the parsed text
*
* This function should be used for ALL plugins that normally use $template->assign_display to output data with the plugin system.
*/
function kb_parse_template($filename, $template_file)
{
    global $phpbb_root_path, $template, $user;
    
    //Inherited
    if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherit_path'])
    {
        $tpl_path = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/kb/plugins/';        
    }
    //not inherited
    else
    {
        $tpl_path = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/kb/plugins/';
    }
    
    // If the template file does not exist
    if (!@file_exists($tpl_path . $template_file))
    {
        $error = sprintf($user->lang['PLUGIN_TEMPLATE_MISSING'], $template_file);
    
        trigger_error($error);
    }        
    
    $template_path = 'kb/plugins/';
    
    $template->set_filenames(array(
        $filename        => $template_path . $template_file,
    ));
    
    // return the output
    return $template->assign_display($filename);
}
If this is not changed there would be problems on boards which have installed multiple styles with template inheritance activated.

Within includes/functions_kb.php in the function function feed_output($feed, $feed_type, $feed_data = false) there are also error messages when debug mode is enabled

Code: Select all

line 2420: undefined variable: sql_where
line 2421: undefined variable: sql_order
line 2441: undefined variable: title
I've solved this issue on my forum by changing the function this way:

Code: Select all

/**
* Generates feeds for display
* $feed = RSS or ATOM
* $feed_type = latest or user or cat or popular
* $feed_data (only used by user and cat) = user_id or cat_id
* Credit to EXreaction, Lithium Studios for some of the code used here and the idea for the function workings
*/
function feed_output($feed, $feed_type, $feed_data = false)
{
	global $template, $phpbb_root_path, $phpEx, $config, $db, $user;
	
	switch ($feed_type)
	{
		case 'latest':
			$title = $user->lang['KB_LATEST'];
			$sql_where = 'a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'user':
			$title = $feed_data['USERNAME'] .  ' ' . $user->lang['ARTICLE'];
			$sql_where = 'a.article_user_id = ' . $feed_data['USER_ID'] . ' AND a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'cat':
			$title = $user->lang['KB_SORT_CAT'] . ' - ' . $feed_data['CAT_NAME'] .  ' ' . $user->lang['ARTICLE'];
			$sql_where = 'a.cat_id = ' . $feed_data['CAT_ID'] . ' AND a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'popular':
			$title = $user->lang['POPULAR_ART'];
			$sql_where = 'a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_views DESC';
		break;	
	
    	$sql = $db->sql_build_query('SELECT', array(
    		'SELECT'	=> 'a.article_id, a.article_title, a.article_desc, a.article_desc_uid, a.article_user_name, a.article_time',
    		'FROM'		=> array(
    			KB_TABLE => 'a'),		
    		'WHERE'		=> "$sql_where",
    		'ORDER_BY'	=> "$sql_order",
    	));
    	$result = $db->sql_query_limit($sql, 10);
    	while ($row = $db->sql_fetchrow($result))
    	{
    		strip_bbcode($row['article_desc'], $row['article_desc_uid']);
    		$template->assign_block_vars('item', array(
    			'TITLE'				=> $row['article_title'],
    			'URL'				=> generate_board_url() . '/kb.' . $phpEx . '?a=' . $row['article_id'],
    			'USERNAME'			=> $row['article_user_name'],
    			'MESSAGE'			=> str_replace("'", ''', $row['article_desc']),
    			'PUB_DATE'			=> date('r', $row['article_time']),
    			'DATE_3339'			=> ($feed_type == 'ATOM') ? date3339($row['article_time']) : '',
    		));
    	}
    	$db->sql_freeresult($result);
    
    	$template->assign_vars(array(
    		'FEED'				=> $feed,
    		'SELF_FULL_URL'		=> generate_board_url() . '/kb.' . $phpEx . '?i=feed&feed=' . $feed . '&feed_type=' . $feed_type,
    		'TITLE'				=> $config['sitename'] . ' ' . $title . ' ' . $user->lang['FEED'],
    		'SITE_URL'			=> generate_board_url() . '/kb.' . $phpEx,
    		'SITE_DESC'			=> $config['site_desc'],
    		'SITE_LANG'			=> $config['default_lang'],
    		'CURRENT_TIME'		=> ($feed_type == 'ATOM') ? date3339() : date('r'),
    	));
    
    	// Output time
    	header('Content-type: application/xml; charset=UTF-8');
    
    	header('Cache-Control: private, no-cache="set-cookie"');
    	header('Expires: 0');
    	header('Pragma: no-cache');
    
    	$template->set_template();
    	$template->set_filenames(array(
    		'body' => 'kb/kb_feed.xml'
    	));
    
    	$template->display('body');
    
    	garbage_collection();
    	exit_handler();
	}
}
The only change is setting the "}" from line 2421 to the end of the function. Again i don't know if this is the correct solution but it seems to work.

Depending on feed output i have also a suggestion. IMO feeds should not be enabled by default. If it is possible they should be enabled or disabled with the default feed settings of the board (maybe you could extend this section for the knowledge base)

All other errors which I knew from seem to have been completly addressed with your version.

Finally i wanna thank you for keep up working on this mod. I think it's greatly appreciated not only by me
1. My setup is also quickinstall 1.1.7-RC1, AutoMOD 1.0.2, Clean install of phpBB3 Version 3.0.11I will need to look deeper into why this is an issue.

2. includes/kb.php issues is fixed on line 1876.

3. includes/functions_plugins_kb.php issue I will test and get back with you.

4. Feeds I will also look into, so far i cannot find out why they are not allowed to even be disabled. I will definitely add the ability to disable.

Glad to hear this is appreciated.
I intend to live forever. So far, so good.
Steven Wright
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

Most, if not all, of these issues will be address in the next release. They are currently in the recent dev version in the repository and I should get a new version out this coming weekend.
WileCoyote wrote:I've tested the installation with quickinstall 1.1.7-RC1, AutoMOD 1.0.2 and a clean install of phpbb 3.0.11. There where no other mods installed.

For the second issue exists a workaround. Resetting the permissions in the mod maintenence section before uninstalling.

On checking some other known problems with the last original version i found some more issues.
In includes/kb.php on line 1662

Code: Select all

		$error = $article_data = array();
should be changed to

Code: Select all

		$error = $article_data = $edit_data = array();
otherwise you'll get an error message Undefined Variable 'edit_data' in includes/kb.php on line xxxx with debug mode enabled. I'm not a programmer so i don't know if this is the correct way to fix this issue but it works for me.

For correct template parsing of the plugins the corresponding function in includes/functions_plugins_kb.php should be changed to

Code: Select all

/**
* Parse a template and return the parsed text
*
* This function should be used for ALL plugins that normally use $template->assign_display to output data with the plugin system.
*/
function kb_parse_template($filename, $template_file)
{
    global $phpbb_root_path, $template, $user;
    
    //Inherited
    if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherit_path'])
    {
        $tpl_path = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/kb/plugins/';        
    }
    //not inherited
    else
    {
        $tpl_path = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/kb/plugins/';
    }
    
    // If the template file does not exist
    if (!@file_exists($tpl_path . $template_file))
    {
        $error = sprintf($user->lang['PLUGIN_TEMPLATE_MISSING'], $template_file);
    
        trigger_error($error);
    }        
    
    $template_path = 'kb/plugins/';
    
    $template->set_filenames(array(
        $filename        => $template_path . $template_file,
    ));
    
    // return the output
    return $template->assign_display($filename);
}
If this is not changed there would be problems on boards which have installed multiple styles with template inheritance activated.

Within includes/functions_kb.php in the function function feed_output($feed, $feed_type, $feed_data = false) there are also error messages when debug mode is enabled

Code: Select all

line 2420: undefined variable: sql_where
line 2421: undefined variable: sql_order
line 2441: undefined variable: title
I've solved this issue on my forum by changing the function this way:

Code: Select all

/**
* Generates feeds for display
* $feed = RSS or ATOM
* $feed_type = latest or user or cat or popular
* $feed_data (only used by user and cat) = user_id or cat_id
* Credit to EXreaction, Lithium Studios for some of the code used here and the idea for the function workings
*/
function feed_output($feed, $feed_type, $feed_data = false)
{
	global $template, $phpbb_root_path, $phpEx, $config, $db, $user;
	
	switch ($feed_type)
	{
		case 'latest':
			$title = $user->lang['KB_LATEST'];
			$sql_where = 'a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'user':
			$title = $feed_data['USERNAME'] .  ' ' . $user->lang['ARTICLE'];
			$sql_where = 'a.article_user_id = ' . $feed_data['USER_ID'] . ' AND a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'cat':
			$title = $user->lang['KB_SORT_CAT'] . ' - ' . $feed_data['CAT_NAME'] .  ' ' . $user->lang['ARTICLE'];
			$sql_where = 'a.cat_id = ' . $feed_data['CAT_ID'] . ' AND a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_time DESC';
		break;
		
		case 'popular':
			$title = $user->lang['POPULAR_ART'];
			$sql_where = 'a.article_status = ' . STATUS_APPROVED;
			$sql_order = 'a.article_views DESC';
		break;	
	
    	$sql = $db->sql_build_query('SELECT', array(
    		'SELECT'	=> 'a.article_id, a.article_title, a.article_desc, a.article_desc_uid, a.article_user_name, a.article_time',
    		'FROM'		=> array(
    			KB_TABLE => 'a'),		
    		'WHERE'		=> "$sql_where",
    		'ORDER_BY'	=> "$sql_order",
    	));
    	$result = $db->sql_query_limit($sql, 10);
    	while ($row = $db->sql_fetchrow($result))
    	{
    		strip_bbcode($row['article_desc'], $row['article_desc_uid']);
    		$template->assign_block_vars('item', array(
    			'TITLE'				=> $row['article_title'],
    			'URL'				=> generate_board_url() . '/kb.' . $phpEx . '?a=' . $row['article_id'],
    			'USERNAME'			=> $row['article_user_name'],
    			'MESSAGE'			=> str_replace("'", ''', $row['article_desc']),
    			'PUB_DATE'			=> date('r', $row['article_time']),
    			'DATE_3339'			=> ($feed_type == 'ATOM') ? date3339($row['article_time']) : '',
    		));
    	}
    	$db->sql_freeresult($result);
    
    	$template->assign_vars(array(
    		'FEED'				=> $feed,
    		'SELF_FULL_URL'		=> generate_board_url() . '/kb.' . $phpEx . '?i=feed&feed=' . $feed . '&feed_type=' . $feed_type,
    		'TITLE'				=> $config['sitename'] . ' ' . $title . ' ' . $user->lang['FEED'],
    		'SITE_URL'			=> generate_board_url() . '/kb.' . $phpEx,
    		'SITE_DESC'			=> $config['site_desc'],
    		'SITE_LANG'			=> $config['default_lang'],
    		'CURRENT_TIME'		=> ($feed_type == 'ATOM') ? date3339() : date('r'),
    	));
    
    	// Output time
    	header('Content-type: application/xml; charset=UTF-8');
    
    	header('Cache-Control: private, no-cache="set-cookie"');
    	header('Expires: 0');
    	header('Pragma: no-cache');
    
    	$template->set_template();
    	$template->set_filenames(array(
    		'body' => 'kb/kb_feed.xml'
    	));
    
    	$template->display('body');
    
    	garbage_collection();
    	exit_handler();
	}
}
The only change is setting the "}" from line 2421 to the end of the function. Again i don't know if this is the correct solution but it seems to work.

Depending on feed output i have also a suggestion. IMO feeds should not be enabled by default. If it is possible they should be enabled or disabled with the default feed settings of the board (maybe you could extend this section for the knowledge base)

All other errors which I knew from seem to have been completly addressed with your version.

Finally i wanna thank you for keep up working on this mod. I think it's greatly appreciated not only by me
I intend to live forever. So far, so good.
Steven Wright
User avatar
WileCoyote
Registered User
Posts: 432
Joined: Sun Jan 15, 2006 7:37 am
Location: Austria
Name: Wolfgang
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by WileCoyote »

Hi pertneer,
found some issues with language variables depending on version 1.0.4

{ARTICLES} - is completly missing

This language veriables are shown as they are in the administration log on install:

Code: Select all

{ACP_KB}
{ACP_KB_HEALTH_CHECK}
{ACP_KB_PERMISSIONS}
{ACP_KB_PLUGINS}
{ACP_KB_ROLES}
{ACP_KB_SETTINGS}
{ACP_MANAGE_CATS}
{ACP_MANAGE_KB_TYPES}
{MCP_KB}
{MCP_KB_ARTICLES}
{MCP_KB_QUEUE}
{UCP_KB}
{UCP_KB_ARTICLES}
{UCP_KB_BOOKMARKS}
{UCP_KB_FRONT}
{UCP_KB_SUBSCRIBED}
I think you must add an umil section with these entries to language/en/mods/kb.php that the entries are shown correctly in the right language while they are logged.

Another issue is that when resetting permissions on the mod maintenance page all roles are deleted. IMO the default roles from installation should only be resetted to their default settings (as the discription states) and only roles which are not installed by default should be deleted.
Regards
WileCoyote
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

I am not sure where you are referring to when you say {articles} is completely missing?

The installer missing language will be fixed in next release, thank you letting me know of these missing language items.

I have the resetting of permissions on my list to fix.
I intend to live forever. So far, so good.
Steven Wright
User avatar
wintstar
Registered User
Posts: 329
Joined: Sat Mar 07, 2009 12:39 pm

Re: [BETA] phpBB3-Knowledgebase

Post by wintstar »

He means the log entries as well as in root /language/en/acp/common.php at line 438.
Regards wintstar

There are people who say I have no idea what I'm writing about, and I don't understand anything. Let them write, because they look in the mirror and write about their own selves.
My board - My atelier - Css Hash Tool - Memories of phpBB 3.0.14
User avatar
WileCoyote
Registered User
Posts: 432
Joined: Sun Jan 15, 2006 7:37 am
Location: Austria
Name: Wolfgang
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by WileCoyote »

wintstar wrote:He means the log entries as well as in root /language/en/acp/common.php at line 438.
No, this entry is primary needed for the category view.

Sorry, i have some more suggestions for you. I think it is necessary to add an permission role for administrators. At the moment it is not possible to configure what other administrators can do with the knowledge base settings. This could be a little bit risky if some of them do not have the required knowledge to change the settings.

The plugins for latest and random article are showing the article discription as preview. Shouldn't they show a preview of the article itself?

For me it seems that when viewing articles only the language variable for {ARTICLES_VIEWS} is in use. The other one {ARTICLES_VIEW} is never shown to me while testing

The font size which is used when viewing articles fits not with the default settings for postings and is a little bit to small, which makes it hard to read without glasses

PS.: If i you feel that i have too much suggestions or error reports for you just say it to me and i will stop them ;)
Regards
WileCoyote
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

WileCoyote wrote: No, this entry is primary needed for the category view.
Is this the category view in ACP? If not is it using Classic or Modern layout?
WileCoyote wrote: Sorry, i have some more suggestions for you. I think it is necessary to add an permission role for administrators. At the moment it is not possible to configure what other administrators can do with the knowledge base settings. This could be a little bit risky if some of them do not have the required knowledge to change the settings.
I thought this myself and I will look into this. Do you have any suggestion as to what you would like to limit to admin only? I am open for suggestions.
WileCoyote wrote: The plugins for latest and random article are showing the article discription as preview. Shouldn't they show a preview of the article itself?

For me it seems that when viewing articles only the language variable for {ARTICLES_VIEWS} is in use. The other one {ARTICLES_VIEW} is never shown to me while testing
The reason for using the description is because of the length of some articles can be very long and the description has a limit of 300 characters.
WileCoyote wrote: The font size which is used when viewing articles fits not with the default settings for postings and is a little bit to small, which makes it hard to read without glasses
I have been messing with layout quite a bit and this is an area I just was looking at yesterday. If you would like to use now
open
styles/prosilver/theme/kb.css
find

Code: Select all

.inner hr{
	clear:none;
}
add-after

Code: Select all

.inner{
	font-size: 1.2em;
}
WileCoyote wrote: PS.: If i you feel that i have too much suggestions or error reports for you just say it to me and i will stop them ;)
Suggestion are always welcome!!
I intend to live forever. So far, so good.
Steven Wright
User avatar
WileCoyote
Registered User
Posts: 432
Joined: Sun Jan 15, 2006 7:37 am
Location: Austria
Name: Wolfgang
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by WileCoyote »

pertneer wrote:I thought this myself and I will look into this. Do you have any suggestion as to what you would like to limit to admin only? I am open for suggestions.
I think it should be something like that:
  • Can change general settings
  • Can use mod maintenance
  • Can manage categories
  • Can change permissions
  • Can change permission roles
  • Can manage article types
pertneer wrote:The reason for using the description is because of the length of some articles can be very long and the description has a limit of 300 characters.
As a reader of an article i'm more interested on the content of the article then it's description. So if a reader has a preview of 300 characters of the article it is easier to make a decision if he wants to read more of it. If an article has no description the reader has no preview at all. Maybe it would be a good idea to add settings for the preview to the plugins. So that it is possible to turn the preview on/off completly and it is possible to choose what is shown as preview.
pertneer wrote:I have been messing with layout quite a bit and this is an area I just was looking at yesterday. If you would like to use now
open
styles/prosilver/theme/kb.css
find

Code: Select all

.inner hr{
	clear:none;
}
add-after

Code: Select all

.inner{
	font-size: 1.2em;
}
If you add this like suggested the value is overwritten for the whole forum.
pertneer wrote:Suggestion are always welcome!!
Nice to hear :)
Regards
WileCoyote
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [BETA] phpBB3-Knowledgebase

Post by pertneer »

WileCoyote wrote: I think it should be something like that:
  • Can change general settings
  • Can use mod maintenance
  • Can manage categories
  • Can change permissions
  • Can change permission roles
  • Can manage article types
So you only want the founder to be able to adjust these or a specific type of admin?
WileCoyote wrote: If you add this like suggested the value is overwritten for the whole forum.
This will limit it to KB only

Code: Select all

#kb_postbody .inner{
	font-size: 1.2em;
}
I intend to live forever. So far, so good.
Steven Wright
Locked

Return to “[3.0.x] MODs in Development”