[Phpbbkb-checkins] SF.net SVN: phpbbkb: [28] root
Status: Alpha
Brought to you by:
markthedaemon
From: <so...@us...> - 2006-12-12 22:17:59
|
Revision: 28 http://svn.sourceforge.net/phpbbkb/?rev=28&view=rev Author: softphp Date: 2006-12-12 14:17:54 -0800 (Tue, 12 Dec 2006) Log Message: ----------- - Just some small changes and the introduction of an acp file. I don't know if Prince of PhpBB already has begun his work? If so... commit away! Modified Paths: -------------- root/kb.php root/language/lang_english/lang_kb.php Added Paths: ----------- root/admin/ root/admin/admin_kb.php Added: root/admin/admin_kb.php =================================================================== --- root/admin/admin_kb.php (rev 0) +++ root/admin/admin_kb.php 2006-12-12 22:17:54 UTC (rev 28) @@ -0,0 +1,49 @@ +<?php +/*************************************************************************** + * admin_kb.php + * ------------------- + * + * copyright: phpBB KB Group + * site: http://www.phpbbknowledgebase.com + * SF Project Page: http://www.sourceforge.net/projects/phpbbkb + * + ***************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ***************************************************************************/ + +define('IN_PHPBB', 1); + +if( !empty($setmodules) ) +{ + $file = basename(__FILE__); + $module['KB']['Categories'] = "$file?mode=cats"; + return; +} + +$mode = $HTTP_GET_VARS['mode']; + +switch($mode) +{ + case "articles": + break; + + case "cats": + break; + + case "permissions": // For later use + break; + + case "files": // For later use + break; + + default: // General settings here + break; +} + Modified: root/kb.php =================================================================== --- root/kb.php 2006-12-12 03:04:25 UTC (rev 27) +++ root/kb.php 2006-12-12 22:17:54 UTC (rev 28) @@ -150,7 +150,7 @@ $cat_id = ( isset( $HTTP_GET_VARS['id'] ) ) ? $HTTP_GET_VARS['id'] : false; if(!$cat_id) { - message_die(GENERAL_MESSAGE, "The chosen category doesn't exist."); // this needs to be in a $lang entry + message_die(GENERAL_MESSAGE, $lang['kb_cat_noexist']); } // Store the main cat in a variable @@ -211,18 +211,6 @@ $sort = "ORDER BY a.article_edittime DESC"; } - // This has been removed due to probably not working - /* - $sql = "SELECT * - FROM " . KB_ARTICLES_TABLE . " - WHERE cat_id LIKE '$cat_id' - $sort"; - if( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not query articles list', '', __LINE__, __FILE__, $sql); - } - */ - $sql = "SELECT a.* FROM " . KB_ARTICLECATS_TABLE . " c, " . KB_ARTICLES_TABLE . " a WHERE c.cat_id = '$cat_id' @@ -314,7 +302,7 @@ { $authorname = $articles[$i]['article_authorname']; } - $author = "<a href=\"profile.php?mode=viewprofile&u=" . $articles[$i]['article_author'] . "\">$authorname</a>"; //hardcoded PHP extension. + $author = "<a href=\"profile." . $phpEx . "?mode=viewprofile&u=" . $articles[$i]['article_author'] . "\">$authorname</a>"; $sql = "SELECT username FROM " . USERS_TABLE . " @@ -325,7 +313,7 @@ } $user = $db->sql_fetchrow($result); - $last_action = sprintf($lang['kb_last_action_row'], "<a href=\"profile.php?mode=viewprofile&u=" . $articles[$i]['article_editby'] . "\">" . $user['username'] . "</a>", create_date($board_config['default_dateformat'], $articles[$i]['article_edittime'], $board_config['board_timezone'])); // hardcoded PHP extension. + $last_action = sprintf($lang['kb_last_action_row'], "<a href=\"profile." . $phpEx . "?mode=viewprofile&u=" . $articles[$i]['article_editby'] . "\">" . $user['username'] . "</a>", create_date($board_config['default_dateformat'], $articles[$i]['article_edittime'], $board_config['board_timezone'])); $template->assign_block_vars('switch_articles.articlerow', array( 'TOPIC_FOLDER_IMG' => $images['folder'], @@ -356,11 +344,6 @@ $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); - if(!$cid || !$id) - { - message_die(GENERAL_ERROR, 'Not enough arguments defined. Please make sure both id and cat id is defined.'); // Hmm, is this a error that is worthy of being a hardcoded one? - } - $sql = "SELECT a.*, u.* FROM " . KB_ARTICLES_TABLE . " a, " . USERS_TABLE . " u WHERE a.article_id = '$id' Modified: root/language/lang_english/lang_kb.php =================================================================== --- root/language/lang_english/lang_kb.php 2006-12-12 03:04:25 UTC (rev 27) +++ root/language/lang_english/lang_kb.php 2006-12-12 22:17:54 UTC (rev 28) @@ -32,6 +32,7 @@ $lang['kb_subcats'] = "Sub categories"; $lang['kb_remove_installfile'] = "Please ensure that you remove the kb_install.php file located in your phpBB root folder. Knowledge Base won't work before that has been done!"; $lang['No_kb_cats'] = "No knowledge base categories has been added."; +$lang['kb_cat_noexist'] = "The category you chose does not exist."; $lang['kb_viewcat_subcats'] = "Subcategories in %s"; $lang['kb_last_action'] = "Last action"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |