[ABD] Knowledge Base 0.2.14

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
the.ronin
Registered User
Posts: 184
Joined: Sun Oct 05, 2008 10:53 pm

Re: [BETA] Mini Knowledge Base

Post by the.ronin »

I know support for this mod is waning but I figured I’d throw these questions out anyway ...

I’ve been able to install the mini kb mod and also modify it quite a bit to suit my needs:

http://www.tribalsurf.net/articles/kb.php

First off, I wanted to have the latest article to show. You’ll also notice I did away with the category view. I just have 3 questions, each one getting increasingly complicated haha:

1) How do I increase the minimum number of articles to show? The max is 20. In my current setup, without the category view, users would never be able to see articles older than 20.

2) How difficult would it be to have collapsible categories in the right-side block? For example, if I clicked on a [-] icon next to “General”, it would hide the articles, the icon would turn to [+] and I clicked again, it would show the articles?

3) What are the variables that get triggerred when an article gets reported or needs to be approved? I was hoping to integrate that into the MCP Info on Index mod which shows a red (rules style) box on the index whenever a post is reported or needs approval.

Any guidance would be appreciated.
blitztrading
Registered User
Posts: 39
Joined: Mon Sep 01, 2008 6:58 pm
Contact:

Re: [BETA] Mini Knowledge Base

Post by blitztrading »

I followed all the steps, purged the cache, activated KB in ACP and then try to reach /forum/knowledge.

... I get an "Internal Server Error" ... what's wrong?

Permissions?

Another thing: after having activated the KB Permissions in ACP, I also activated the KB tab in ACp with Categories, Configuration and Article types.

BUT once activated, I can not see them in the ACP.

What to do ?

PS: I am running phpbb 3.0.2
blitztrading
Registered User
Posts: 39
Joined: Mon Sep 01, 2008 6:58 pm
Contact:

Re: [BETA] Mini Knowledge Base

Post by blitztrading »

I have the same issue. How did you solve it????

Thx
yossarian01 wrote:
yossarian01 wrote:Hi everybody. I'm using the0.2.9 version of this mod and like nre03 when i try to post something i've got an error message

mre03 wrote:i get this error when i try to post an article:

Enter a title and text for the article!



i filled in all the boxes, am i missing something here?



I've got the same problem.
I think i've done everything right.
What's the problem???
Thanks
Resolve it ... but i've got an another problem (putain comme on dit chez moi !!!)
I added all the mcp module but in my forum when i go to the mcp, only "overview" appears (which links to nothing)
Maybe a picture talks more ...

Image
Image



Problem solved!
the.ronin
Registered User
Posts: 184
Joined: Sun Oct 05, 2008 10:53 pm

Re: [BETA] Mini Knowledge Base

Post by the.ronin »

Can anyone provide some suggestions for these last remaining issues I have with this mod?
  • Remove limit of articles to show in the little box on the right-side.
  • Maybe come up with some way to click on the category title to collapse and expand the list of articles.
  • Investigate SEO - for whatever reason it seems to work (show html page) on my live server but not locally?!
Click here to see the mod in action.

[edit]

Question - will bots still spider through the articles even without the SEO mod? I am fine without the html title URLs so long as bots are still indexing it. Forum posts don't have html titles either I don't think.
User avatar
newsbee
Registered User
Posts: 279
Joined: Sat Mar 29, 2003 1:07 pm
Location: Moscow
Contact:

Re: [BETA] Mini Knowledge Base

Post by newsbee »

Any problem with board software update? I mean, will the KB function with 3.0.3?
User avatar
Jaymie1989
Registered User
Posts: 1991
Joined: Thu Aug 02, 2007 5:21 pm
Name: Jaymie

Re: [BETA] Mini Knowledge Base

Post by Jaymie1989 »

I also need help with the same issue as blitztrading has

Also how can i use the url BBCode? When i try

Code: Select all

[url=site]Text[/url]
It doesnt show as a link and if i click on praise BBCode or links it shows as

Code: Select all

[url=site]Text[/url7:xcfgfg]
Dear creators of Sesame Street,
Kids are still fat. Can I come back now?
Sincerely, Cookie Monster.

View my MODs - Need phpBB help with MODs and Styles? Take a look at my phpBB3 services
User avatar
derkubi
Registered User
Posts: 79
Joined: Fri Feb 15, 2008 10:47 am
Contact:

Re: [BETA] Mini Knowledge Base

Post by derkubi »

Viewtopic HighSlide Attachment & IMG MOD 1.0.7
derkubi wrote:Hello

Highslide Attachment and Mini Knowledge Base

Picture in Mini Knowledge Base dont work with Highslide Attachment

click on attachment pictures = open the picture fullsize in a new window
click on [img ]picture-url[/ img] = open the picture fullsize same window
stokerpiller wrote:Sorry, I cant support either Gallery or Mini Knowledge Base.
I am not using any of them.
?HELP?
Last edited by derkubi on Wed Dec 10, 2008 6:19 pm, edited 1 time in total.
I am german , so sorry for my bad english !
ttuu
Registered User
Posts: 224
Joined: Wed Feb 13, 2008 6:28 pm

Re: [BETA] Mini Knowledge Base

Post by ttuu »

i set permissions in my username. i have all the Yes. And yet I can not upload files. And I can not edit existing articles.
the.ronin
Registered User
Posts: 184
Joined: Sun Oct 05, 2008 10:53 pm

Re: [BETA] Mini Knowledge Base

Post by the.ronin »

How do I remove the permission entries in the ACP? I'm trying to uninstall this mod. Thanks.
LiamWi
Registered User
Posts: 23
Joined: Tue Jan 29, 2008 12:52 pm

Re: [BETA] Mini Knowledge Base

Post by LiamWi »

I know this has been asked a million times, as I've gone through every page of this thread.

Installation went fine, installed modules in acp and mcp successfully.

No mods appearing in ACP, no knowledge base tab for user group permissions or any other permissions on moderation or anywhere else.

No tab at the top for the .MOD category.

No links on the side of anywhere to the KB.

No way of seeing it, using it. Emptied cache, purged cache, emptied style cache etc etc etc.

I have complete server access and mysql db access.

If someone could say what the solution was in the end for this, or send me to a link I would appreciate it.

Thank you.

Liam
LiamWi
Registered User
Posts: 23
Joined: Tue Jan 29, 2008 12:52 pm

Re: [BETA] Mini Knowledge Base

Post by LiamWi »

Irritatingly, I noticed that Knowledge Base appeared on permissions for registered users only. It was switched to Yes. I switched it to No as I want the KB to be restricted. The KB tab under permissions then entirely disappeared.

Woo.
the.ronin
Registered User
Posts: 184
Joined: Sun Oct 05, 2008 10:53 pm

Re: [BETA] Mini Knowledge Base

Post by the.ronin »

I have uninstalled this mod.

How do I get rid of these entries in the ACP under Group's Permissions?

Image

I've deleted all the sql entries in phpbb_acl_options and the entries were still there after purge cache, refresh, etc. I even deleted any entries with "_kb" everywhere. Entries still there.
smikkili
Registered User
Posts: 1
Joined: Thu Dec 18, 2008 5:55 am

Re: [BETA] Mini Knowledge Base

Post by smikkili »

Thanks Diana. This worked for me.

DianaRae wrote:
the.ronin wrote:OK ... so Diana, you've got the three kb modules under the "Moderation Queue" tab I suppose?
Yes, I do.
the.ronin wrote:Diana or others, in the configuration settings in the acp, who do you have as the "User ID"?
I have it set to 0 Did you make sure your name is added/listed under the "global moderators" in the "Permissions/Global Permissions/Global Moderators/Users" ?
the.ronin wrote:Also, do you have the "Post topic as" as "Normal"?
Yes.
the.ronin wrote:[edit] Another question - how can I check in phpmyadmin to see if the test topics I am posting are even making it to the database?
Image
the.ronin wrote:[edit 2] I do notice that the mcp is calling on "kb_main" when I click on the "Overview" tab. In mcp_kb.php, I noted the following code:
See Mine below:

Code: Select all

class mcp_kb_info
{
	function module()
	{
		return array(
			'filename'	=> 'mcp_kb',
			'title'		=> 'KB_NAME',
			'version'	=> '0.2.9',
			'modes'		=> array(
				'kb_activate'		=> array('title' => 'MCP_KB_ACTIVATE', 'auth' => 'acl_m_activate_kb', 'cat' => array('KB_NAME')),
				'kb_reports'		=> array('title' => 'MCP_KB_REPORTS', 'auth' => 'acl_m_report_kb', 'cat' => array('KB_NAME')),
				'kb_main'			=> array('title' => 'MCP_KB_MAIN', 'auth' => '', 'cat' => array('KB_NAME')),
			),
		);
	}
I did a test on my boards of adding a category & then a sub category. I will show you what I see step by step:

Image

Image

Image

Image
Zeronix
Registered User
Posts: 14
Joined: Fri Dec 26, 2008 11:03 am

Re: [BETA] Mini Knowledge Base 0.2.9

Post by Zeronix »

I installed everything correctly and followed your instructions carefully but still dont know how to create categories for the KB.
Could anyone help me out in this?
Jan Christensen
Registered User
Posts: 140
Joined: Sun May 16, 2004 10:42 am
Location: Denmark

Re: [BETA] Mini Knowledge Base 0.2.9

Post by Jan Christensen »

Hi

I like the MOD very much but I am having trouble with it.

When I have posted an article and want to see it, I get this error:

Code: Select all

Fatal error: Call to undefined function generate_seourl_topic() in /home/www/tamrotten.com/phpBB3/knowledge/kb_show.php on line 187
Any suggestions?

I have recently been using phpBB portal XL 4.0 but I did not want it anymore as it is full off bugs. So I now use a normal phpBB3 without the portal mods.

Thx.

My kbshow.php file:

Code: Select all

<?php
/** 
*
* @author Tobi Schaefer http://www.tas2580.de/
*
* @package Knowledge_Base
* @version $Id: kb_show.php, v 0.2.9 2008/08/25 15:31:33 tas2580 Exp $
* @copyright (c) 2007 SEO phpBB http://www.phpbb-seo.de
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include($phpbb_root_path . 'includes/functions_kb.' . $phpEx);
include('kb_common.' . $phpEx);


$config['allow_pm_attach'] = $config['allow_attachments'];

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(array('viewforum', 'mods/kb'));

$id = request_var('id', 0);
$filename = request_var('filename', '');
$mode = request_var('mode', '');
$filename = str_replace('/' . KB_FOLDER . '/', '', $filename);

// Select article data
$where = ($filename != '') ? "a.page_uri = '" . $db->sql_escape($filename). "'" : "a.article_id = '$id'";
$sql_array = array(
	'SELECT'	=> 'c.cat_title, c.show_edits, t.name, a.article_id, a.page_uri, a.titel, a.post_id, a.description, a.hits, a.article, a.post_time, a.bbcode_bitfield, a.bbcode_uid, a.activ, a.enable_bbcode, a.enable_smilies, a.enable_magic_url, a.cat_id, a.type_id, a.user_id, a.last_edit_user, a.last_change, a.has_attachment, u.username, u.user_colour, u.user_id, p.topic_id, p.forum_id',

	'FROM'		=> array(
		KB_ARTICLE_TABLE	=> 'a',
	),
	'LEFT_JOIN'	=> array(
		array(
			'FROM'	=>	array(USERS_TABLE	=> 'u'),
			'ON'	=> 'a.user_id = u.user_id'
		),
		array(
			'FROM'	=>	array(POSTS_TABLE	=> 'p'),
			'ON'	=> 'p.post_id = a.post_id'
		),
		array(
			'FROM'	=>	array(KB_TYPES_TABLE	=> 't'),
			'ON'	=> 't.type_id = a.type_id'
		),

		array(
			'FROM'	=>	array(KB_CATEGORIE_TABLE	=> 'c'),
			'ON'	=> 'c.cat_id = a.cat_id'
		),
	),
	'WHERE'		=> $where,
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql, $kb_config['cache_time']);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

// URL check if SEO
if (KB_SEO == true && !empty($row['page_uri']) && !isset($_GET['explain']) && !isset($_GET['highlight']) && $mode != 'print')
{
	$script_path = ( $config['script_path'] != '/' ) ? $config['script_path'] . '/' : '/';
	$needed_url = $script_path . KB_FOLDER . '/'. $row['page_uri'] . '.html';
	if($needed_url != $_SERVER['REQUEST_URI'])
	{
		header("HTTP/1.1 301 Moved Permanently");
		header("Location: " . generate_board_url() . $needed_url);
	}
}

// Article activ?
if(!$row || ($row['activ'] == '0' && !$auth->acl_get('u_edit_kb')))
{	
	trigger_error($user->lang['NO_ARTICLE'] . '<br /><br />' . sprintf($user->lang['BACK_TO_KB'], '<a href="' . append_sid("{$kb_root_path}") . '">', '</a>'));
}

// last change user
if (($row['last_change'] != $row['post_time']) && $row['show_edits'] == '1')
{
	$sql = 'SELECT username, user_colour, user_id
		FROM ' . USERS_TABLE . '
		WHERE user_id = ' . (int) $row['last_edit_user'];
	$result = $db->sql_query($sql, $kb_config['cache_time']);
	$last_user = $db->sql_fetchrow($result);
	$db->sql_freeresult($result);
	$last_change_user = get_username_string('full', $last_user['user_id'], $last_user['username'], $last_user['user_colour']);
}
else
{
	$last_change_user = '';
}

// Update views, but not for bots
if (!$user->data['is_bot'])
{
	$sql = 'UPDATE ' . KB_ARTICLE_TABLE . '
		SET hits = hits + 1
		WHERE article_id = ' . (int) $row['article_id'];
	$db->sql_query($sql);
}

// Get attachements
if ($auth->acl_get('u_download') && $row['has_attachment'] && $config['allow_attachments'])
{
	$sql = 'SELECT *
		FROM ' . ATTACHMENTS_TABLE . '
		WHERE post_msg_id = ' . (int) $row['article_id'] . '
				AND in_message = 2
				AND topic_id = 0
				AND is_orphan = 0
		ORDER BY filetime DESC';
	$result = $db->sql_query($sql);

	while ($arow = $db->sql_fetchrow($result))
	{
		$attachments[] = $arow;
	}
	$db->sql_freeresult($result);
}

$row['bbcode_options'] = (($row['enable_bbcode']) ? OPTION_FLAG_BBCODE : 0) +
    (($row['enable_smilies']) ? OPTION_FLAG_SMILIES : 0) + 
    (($row['enable_magic_url']) ? OPTION_FLAG_LINKS : 0);
$message = generate_text_for_display($row['article'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']);

if (!empty($attachments) && $config['allow_attachments'])
{
	parse_attachments(0, $message, $attachments, $update_count);
	foreach ($attachments as $attachment)
	{
		$template->assign_block_vars('attachment', array(
			'DISPLAY_ATTACHMENT'	=> $attachment)
		);
	}
}

// highlight search words
$hilit_words = request_var('highlight', '');
$highlight_match = $highlight = '';
if ($hilit_words)
{
	foreach (explode(' ', trim($hilit_words)) as $word)
	{
		if (trim($word))
		{
			$word = str_replace('\*', '\w+?', preg_quote($word, '#'));
			$word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word);
			$highlight_match .= (($highlight_match != '') ? '|' : '') . $word;
		}
	}
}
if ($highlight_match)
{
	$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $message);
}

if($auth->acl_get('m_report_kb'))
{
	$sql = 'SELECT  report_id
		FROM ' . KB_REPORTS_TABLE . ' 
		WHERE article_id = ' . (int) $row['article_id'] . '
			AND report_closed = 0';
	$result = $db->sql_query($sql);
	$report = $db->sql_fetchrow($result);
	$report_id = $report['report_id'];
	$s_reported = ($report_id) ? true : false;
}


// Assign index specific vars
$template->assign_vars(array(
	'HITS'					=> $row['hits']+1,
	'TYPE'					=> ($row['name'] !='0') ? $row['name'] : '',
	'POST_URI'    			=> ($row['post_id'] != 0 && $row['topic_id']) ? generate_seourl_topic($row['topic_id'], false, $row['forum_id']) : '',
	//'POST_URI'				=> ($row['post_id'] != 0) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']) : '',
	'LAST_CHANGE'			=> ($row['last_change'] != $row['post_time'] && $row['show_edits'] == '1') ? $user->format_date($row['last_change']) : '',
	'USER'					=> get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
	'CHANGE_USER'			=> $last_change_user,
	'ARTICLE_TIME'			=> $user->format_date($row['post_time']),
	'ARTICLE'				=> $message,
	'ID'					=> $id,
	'EDIT_IMG' 				=> $user->img('icon_post_edit', 'EDIT_POST'),
	'DELETE_IMG' 			=> $user->img('icon_post_delete', 'DELETE_POST'),
	'INFO_IMG' 				=> $user->img('icon_post_info', 'VIEW_INFO'),
	'REPORT_IMG'			=> $user->img('icon_post_report', 'REPORT_POST'),
	'U_MCP'					=> ($auth->acl_get('m_activate_kb') || $auth->acl_get('m_report_kb') || $auth->acl_get('m_log_kb')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=kb&mode=kb_main') : '',
	'U_ARTICLE_HISTORY'		=> append_sid("{$phpbb_root_path}mcp.$phpEx?i=kb&mode=kb_main&a=" . $row['article_id']),
	'U_ADD_ARTICLE'			=> append_sid("{$kb_root_path}kbposting.$phpEx"),
	'U_EDIT_ARTICLE'		=> append_sid("{$kb_root_path}kbposting.$phpEx", 'mode=edit&id=' . $row['article_id']),
	'U_REPORT'				=> append_sid("{$kb_root_path}kbreport.$phpEx", 'id=' . $row['article_id']),
	'U_DELETE_ARTICLE'		=> append_sid("{$kb_root_path}index.$phpEx", 'mode=delete&id=' . $row['article_id']),
	'TITEL'					=> $row['titel'],
	'NOFORUMNAV'			=> true,
	'DESCRIPTION'			=> str_replace('\n', '<br />', $row['description']),
	'S_ADD_ARTICLE'			=> $auth->acl_get('u_add_kb'),
	'S_EDIT_ARTICLE'		=> (($auth->acl_get('u_edit_kb') && $row['user_id'] == $user->data['user_id']) || $auth->acl_get('m_edit_kb')),
	'S_ARTICLE_LOG'			=> $auth->acl_get('m_log_kb'),
	'S_ARTICLE_REPORT'		=> $auth->acl_get('u_report_kb'),
	'S_DELETE_ARTICLE'		=> (($auth->acl_get('u_del_kb') && $row['user_id'] == $user->data['user_id']) || $auth->acl_get('m_del_kb')),
	'U_PRINT_TOPIC'			=> $auth->acl_get('u_print_kb') ? append_sid("{$kb_root_path}kb_show.$phpEx", 'mode=print&id=' . $row['article_id']) : '',
	'S_POST_REPORTED'		=> $s_reported,
	'REPORTED_IMG'			=> $user->img('icon_topic_reported', 'POST_REPORTED'),
	'U_MCP_REPORT'			=> isset($report_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx?i=kb&mode=kb_reports&part=view&r=$report_id") : '',
	)
);

$template->assign_block_vars('navlinks', array(
	'U_VIEW_FORUM'	=> append_sid("{$kb_root_path}"),
	'FORUM_NAME'	=> $user->lang['KBASE'])
);

$categorie_nav = get_categorie_branch($row['cat_id'], 'parents', 'descending', true);
foreach ($categorie_nav as $row1)
{
	$template->assign_block_vars('navlinks', array(
		'U_VIEW_FORUM'	=> (KB_SEO == true) ? append_sid("{$kb_root_path}categorie-" . $row1['cat_id'] . '.html') : append_sid("{$kb_root_path}kb_categorie.php", 'id=' . $row1['cat_id']),
		'FORUM_NAME'	=> $row1['cat_title'])
	);
}

// Output page
page_header($row['titel']);

$template->set_filenames(array(
	'body' => $mode == 'print' ? 'kb/kb_print.html' : 'kb/kb_show.html')
);

page_footer();

?>
Line 187:

Code: Select all

	'POST_URI'    			=> ($row['post_id'] != 0 && $row['topic_id']) ? generate_seourl_topic($row['topic_id'], false, $row['forum_id']) : '',
Locked

Return to “[3.0.x] Abandoned MODs”