[Phpbbkb-checkins] SF.net SVN: phpbbkb: [20] root
Status: Alpha
Brought to you by:
markthedaemon
|
From: <so...@us...> - 2006-11-23 15:32:41
|
Revision: 20
http://svn.sourceforge.net/phpbbkb/?rev=20&view=rev
Author: softphp
Date: 2006-11-23 07:32:31 -0800 (Thu, 23 Nov 2006)
Log Message:
-----------
- Adding all sorts of stuff, generally navigation bar & the new ucp class... for adding an editing articles.
Modified Paths:
--------------
root/kb/functions.php
root/kb.php
root/language/lang_english/lang_kb.php
root/templates/subSilver/kb_main.tpl
root/templates/subSilver/kb_viewcat.tpl
Added Paths:
-----------
root/kb/ucp_class.php
root/templates/subSilver/kb_article_posting.tpl
Modified: root/kb/functions.php
===================================================================
--- root/kb/functions.php 2006-11-21 19:57:07 UTC (rev 19)
+++ root/kb/functions.php 2006-11-23 15:32:31 UTC (rev 20)
@@ -3,9 +3,9 @@
* functions.php
* -------------------
*
- * copyright: phpBB KB Group
- * site: http://www.phpbbknowledgebase.com
- * SF Project Page: http://www.sourceforge.net/projects/phpbbkb
+ * copyright: phpBB KB Group
+ * site: http://www.phpbbknowledgebase.com
+ * SF Project Page: http://www.sourceforge.net/projects/phpbbkb
*
***************************************************************************/
@@ -18,6 +18,55 @@
*
***************************************************************************/
-// Nothing yet!
-
+// This function creates the navigation line based on a few parameters
+function create_navigation($type = "main", $id_ary = array())
+{
+ global $db, $template, $lang, $board_config, $phpEx;
+
+ switch($type)
+ {
+ case "ucp":
+ // Different kind of subcategories
+ break;
+
+ case "viewcat":
+ // View category
+ // id = $cat_id::$cat_name
+ $navigation = '<span class="nav"> <a href="' . append_sid("kb.$phpEx") . '" class="nav">' . $lang['kb_main'] . '</a> -> <a class="nav" href="' . append_sid("kb.$phpEx?pid=view_cat&id=" . $id_ary[0]) . '">' . $id_ary[1] .'</a></span>';
+ break;
+
+ case "viewsubcat":
+ // View subcategory
+ // id = $cat_id::$cat_name::$maincat_id
+ $sql = "SELECT cat_title
+ FROM " . KB_CATEGORIES_TABLE . "
+ WHERE cat_id = '" . $id_ary[2] . "'";
+ if( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not query cat name.', '', __LINE__, __FILE__, $sql);
+ }
+ $maincat = $db->sql_fetchrow($result);
+ $navigation = '<span class="nav"> <a href="' . append_sid("kb.$phpEx") . '" class="nav">' . $lang['kb_main'] . '</a> -> <a class="nav" href="' . append_sid("kb.$phpEx?pid=view_cat&id=" . $id_ary[2]) . '">' . $maincat['cat_title'] .'</a> -> <a class="nav" href="' . append_sid("kb.$phpEx?pid=view_cat&id=" . $id_ary[0]) . '">' . $id_ary[1] .'</a></span>';
+ break;
+
+ case "viewarticle":
+ // Viewing an article
+ break;
+
+ case "search":
+ // viewing search results or page
+ break;
+
+ case "main":
+ default:
+ $navigation = '<span class="nav"> <a href="' . append_sid("kb.$phpEx") . '" class="nav">' . $lang['kb_main'] . '</a></span>';
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'NAVIGATION' => $navigation)
+ );
+
+ return;
+}
?>
\ No newline at end of file
Added: root/kb/ucp_class.php
===================================================================
--- root/kb/ucp_class.php (rev 0)
+++ root/kb/ucp_class.php 2006-11-23 15:32:31 UTC (rev 20)
@@ -0,0 +1,230 @@
+<?php
+/***************************************************************************
+ * ucp_class.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.
+ *
+ ***************************************************************************/
+
+// This contains the entire ucp class, so it's seperated from the rest of kb.php
+class ucp
+{
+ var $action = "";
+
+ function __construct($action, $id=0)
+ {
+ global $HTTP_POST_VARS['review'];
+
+ $this->action = $action;
+ switch($this->action)
+ {
+ case "articles":
+ break;
+
+ case "comments":
+ break;
+
+ case "post_article":
+ $this->article_form("post", false, $HTTP_POST_VARS['review']);
+ break;
+
+ case "edit_article":
+ $this->article_form("edit", $id, $HTTP_POST_VARS['review']);
+ break;
+
+ case "delete_article":
+ $this->article_delete();
+ break;
+
+ case "post_comment": // Only input
+ break;
+
+ case "edit_comment":
+ break;
+
+ case "delete_comment":
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // This is for posting articles, mostly cut out of the posting.php :)
+ function article_form($mode, $id, $review)
+ {
+ global $template, $board_config, $db, $userdata;
+
+ if($mode == "post")
+ {
+ $article_title = '';
+ $article_text = '';
+ $article_desc = '';
+ $authorname = $userdata['username'];
+ }
+ else
+ {
+ $sql = "SELECT *
+ FROM " . KB_ARTICLES_TABLE . "
+ WHERE id = '" . $id . "'";
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, 'Could not query article data.', '', __LINE__, __FILE__, $sql);
+ }
+ $article = $db->sql_fetchrow($result);
+
+ $article_title = $article['article_title'];
+ $article_text = $article['article_text'];
+ $article_desc = $article['article_desc'];
+ $authorname = $article['article_authorname'];
+
+ $attach_sig = ( $article['enable_sig'] && $post_info['user_sig'] != '' ) ? TRUE : 0;
+ $user_sig = $userdata['user_sig'];
+
+ $html_on = ( $article['enable_html'] ) ? true : false;
+ $bbcode_on = ( $article['enable_bbcode'] ) ? true : false;
+ $smilies_on = ( $article['enable_smilies'] ) ? true : false;
+ }
+
+ $article_text = str_replace('<', '<', $article_text);
+ $article_text = str_replace('>', '>', $article_text);
+ $article_text = str_replace('<br />', "\n", $article_text);
+
+ //
+ // Signature toggle selection
+ //
+ if( $user_sig != '' )
+ {
+ $template->assign_block_vars('switch_signature_checkbox', array());
+ }
+
+ //
+ // HTML toggle selection
+ //
+ if ( $board_config['allow_html'] )
+ {
+ $html_status = $lang['HTML_is_ON'];
+ $template->assign_block_vars('switch_html_checkbox', array());
+ }
+ else
+ {
+ $html_status = $lang['HTML_is_OFF'];
+ }
+
+ //
+ // BBCode toggle selection
+ //
+ if ( $board_config['allow_bbcode'] )
+ {
+ $bbcode_status = $lang['BBCode_is_ON'];
+ $template->assign_block_vars('switch_bbcode_checkbox', array());
+ }
+ else
+ {
+ $bbcode_status = $lang['BBCode_is_OFF'];
+ }
+
+ //
+ // Smilies toggle selection
+ //
+ if ( $board_config['allow_smilies'] )
+ {
+ $smilies_status = $lang['Smilies_are_ON'];
+ $template->assign_block_vars('switch_smilies_checkbox', array());
+ }
+ else
+ {
+ $smilies_status = $lang['Smilies_are_OFF'];
+ }
+
+ // This is the template stuff we need no matter what
+ $template->assign_vars(array(
+ 'AUTHORNAME' => $authorname,
+ 'ARTICLE_TITLE' => $article_title,
+ 'ARTICLE' => $article_text,
+ 'HTML_STATUS' => $html_status,
+ 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
+ 'SMILIES_STATUS' => $smilies_status,
+
+ 'L_SUBJECT' => $lang['Subject'],
+ 'L_MESSAGE_BODY' => $lang['Message_body'],
+ 'L_OPTIONS' => $lang['Options'],
+ 'L_PREVIEW' => $lang['Preview'],
+ 'L_SPELLCHECK' => $lang['Spellcheck'],
+ 'L_SUBMIT' => $lang['Submit'],
+ 'L_CANCEL' => $lang['Cancel'],
+ 'L_CONFIRM_DELETE' => $lang['Confirm_delete'],
+ 'L_DISABLE_HTML' => $lang['Disable_HTML_post'],
+ 'L_DISABLE_BBCODE' => $lang['Disable_BBCode_post'],
+ 'L_DISABLE_SMILIES' => $lang['Disable_Smilies_post'],
+ 'L_ATTACH_SIGNATURE' => $lang['Attach_signature'],
+
+ 'L_BBCODE_B_HELP' => $lang['bbcode_b_help'],
+ 'L_BBCODE_I_HELP' => $lang['bbcode_i_help'],
+ 'L_BBCODE_U_HELP' => $lang['bbcode_u_help'],
+ 'L_BBCODE_Q_HELP' => $lang['bbcode_q_help'],
+ 'L_BBCODE_C_HELP' => $lang['bbcode_c_help'],
+ 'L_BBCODE_L_HELP' => $lang['bbcode_l_help'],
+ 'L_BBCODE_O_HELP' => $lang['bbcode_o_help'],
+ 'L_BBCODE_P_HELP' => $lang['bbcode_p_help'],
+ 'L_BBCODE_W_HELP' => $lang['bbcode_w_help'],
+ 'L_BBCODE_A_HELP' => $lang['bbcode_a_help'],
+ 'L_BBCODE_S_HELP' => $lang['bbcode_s_help'],
+ 'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
+ 'L_EMPTY_MESSAGE' => $lang['Empty_message'],
+
+ 'L_FONT_COLOR' => $lang['Font_color'],
+ 'L_COLOR_DEFAULT' => $lang['color_default'],
+ 'L_COLOR_DARK_RED' => $lang['color_dark_red'],
+ 'L_COLOR_RED' => $lang['color_red'],
+ 'L_COLOR_ORANGE' => $lang['color_orange'],
+ 'L_COLOR_BROWN' => $lang['color_brown'],
+ 'L_COLOR_YELLOW' => $lang['color_yellow'],
+ 'L_COLOR_GREEN' => $lang['color_green'],
+ 'L_COLOR_OLIVE' => $lang['color_olive'],
+ 'L_COLOR_CYAN' => $lang['color_cyan'],
+ 'L_COLOR_BLUE' => $lang['color_blue'],
+ 'L_COLOR_DARK_BLUE' => $lang['color_dark_blue'],
+ 'L_COLOR_INDIGO' => $lang['color_indigo'],
+ 'L_COLOR_VIOLET' => $lang['color_violet'],
+ 'L_COLOR_WHITE' => $lang['color_white'],
+ 'L_COLOR_BLACK' => $lang['color_black'],
+
+ 'L_FONT_SIZE' => $lang['Font_size'],
+ 'L_FONT_TINY' => $lang['font_tiny'],
+ 'L_FONT_SMALL' => $lang['font_small'],
+ 'L_FONT_NORMAL' => $lang['font_normal'],
+ 'L_FONT_LARGE' => $lang['font_large'],
+ 'L_FONT_HUGE' => $lang['font_huge'],
+
+ 'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'],
+ 'L_STYLES_TIP' => $lang['Styles_tip'],
+
+ 'U_VIEWTOPIC' => ( $mode == 'reply' ) ? append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postorder=desc") : '',
+ 'U_REVIEW_TOPIC' => ( $mode == 'reply' ) ? append_sid("kb.$phpEx?preview=topicreview&" . POST_TOPIC_URL . "=$topic_id") : '',
+
+ 'S_HTML_CHECKED' => ( !$html_on ) ? 'checked="checked"' : '',
+ 'S_BBCODE_CHECKED' => ( !$bbcode_on ) ? 'checked="checked"' : '',
+ 'S_SMILIES_CHECKED' => ( !$smilies_on ) ? 'checked="checked"' : '',
+ 'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? 'checked="checked"' : '',
+ 'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
+ 'S_TYPE_TOGGLE' => $topic_type_toggle,
+ 'S_TOPIC_ID' => $topic_id,
+ 'S_POST_ACTION' => append_sid("posting.$phpEx"),
+ 'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields)
+ );
+ }
+}
+?>
\ No newline at end of file
Modified: root/kb.php
===================================================================
--- root/kb.php 2006-11-21 19:57:07 UTC (rev 19)
+++ root/kb.php 2006-11-23 15:32:31 UTC (rev 20)
@@ -72,6 +72,7 @@
// Start Page output
$page_title = $lang['kb_main'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
+ create_navigation();
$template->set_filenames(array(
'body' => 'kb_main.tpl')
@@ -227,7 +228,23 @@
// Start Page output
$page_title = $lang['kb_viewcat'] . ": " . $cat['cat_title'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
-
+
+ if($cat['cat_main'] == "0")
+ {
+ create_navigation("viewcat", array(
+ 0 => $cat['cat_id'],
+ 1 => $cat['cat_title'])
+ );
+ }
+ else
+ {
+ create_navigation("viewsubcat", array(
+ 0 => $cat_id,
+ 1 => $cat['cat_title'],
+ 2 => $cat['cat_main'])
+ );
+ }
+
$template->set_filenames(array(
'body' => 'kb_viewcat.tpl')
);
@@ -261,6 +278,8 @@
if( $total_articles = count($articles) )
{
+ $template->assign_block_vars('switch_articles', array());
+
// Contains articles
for($i = 0; $i < $total_articles; $i++)
{
@@ -294,14 +313,14 @@
$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']));
- $template->assign_block_vars('articlerow', array(
+ $template->assign_block_vars('switch_articles.articlerow', array(
'TOPIC_FOLDER_IMG' => $images['folder'],
'ARTICLE_TITLE' => $articles[$i]['article_title'],
'ARTICLE_DESC' => $articles[$i]['article_desc'],
'ARTICLE_AUTHOR' => $author,
'ARTICLE_HITS' => $articles[$i]['article_hits'],
'ARTICLE_LAST_ACTION' => $last_action,
- 'U_VIEW_ARTICLE' => append_sid("kb.$phpEx?pid=viewarticle&id=" . $articles[$i]['article_id']))
+ 'U_VIEW_ARTICLE' => append_sid("kb.$phpEx?pid=viewarticle&cid=" . $cat_id . "&id=" . $articles[$i]['article_id']))
);
}
}
@@ -318,6 +337,15 @@
break;
case "ucp":
+ $action = ( isset($HTTP_GET_VARS['action']) ) ? $HTTP_GET_VARS['action'] : "";
+ $ucp = new ucp($action);
+
+ //
+ // Generate the page
+ //
+ $template->pparse('body');
+
+ include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
break;
case "search":
Modified: root/language/lang_english/lang_kb.php
===================================================================
--- root/language/lang_english/lang_kb.php 2006-11-21 19:57:07 UTC (rev 19)
+++ root/language/lang_english/lang_kb.php 2006-11-23 15:32:31 UTC (rev 20)
@@ -20,6 +20,7 @@
// Page titles
$lang['kb_main'] = "KnowledgeBase Home";
+$lang['kb_viewcat'] = "Viewing Category";
$lang['kb_categories'] = "KnowledgeBase Categories";
$lang['kb_articles'] = "Articles";
Added: root/templates/subSilver/kb_article_posting.tpl
===================================================================
--- root/templates/subSilver/kb_article_posting.tpl (rev 0)
+++ root/templates/subSilver/kb_article_posting.tpl 2006-11-23 15:32:31 UTC (rev 20)
@@ -0,0 +1,430 @@
+<script language="JavaScript" type="text/javascript">
+<!--
+// bbCode control by
+// subBlue design
+// www.subBlue.com
+
+// Startup variables
+var imageTag = false;
+var theSelection = false;
+
+// Check for Browser & Platform for PC & IE specific bits
+// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var clientVer = parseInt(navigator.appVersion); // Get browser version
+
+var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
+var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
+ && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
+ && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
+var is_moz = 0;
+
+var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
+var is_mac = (clientPC.indexOf("mac")!=-1);
+
+// Helpline messages
+b_help = "{L_BBCODE_B_HELP}";
+i_help = "{L_BBCODE_I_HELP}";
+u_help = "{L_BBCODE_U_HELP}";
+q_help = "{L_BBCODE_Q_HELP}";
+c_help = "{L_BBCODE_C_HELP}";
+l_help = "{L_BBCODE_L_HELP}";
+o_help = "{L_BBCODE_O_HELP}";
+p_help = "{L_BBCODE_P_HELP}";
+w_help = "{L_BBCODE_W_HELP}";
+a_help = "{L_BBCODE_A_HELP}";
+s_help = "{L_BBCODE_S_HELP}";
+f_help = "{L_BBCODE_F_HELP}";
+
+// Define the bbCode tags
+bbcode = new Array();
+bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
+imageTag = false;
+
+// Shows the help messages in the helpline window
+function helpline(help) {
+ document.post.helpbox.value = eval(help + "_help");
+}
+
+
+// Replacement for arrayname.length property
+function getarraysize(thearray) {
+ for (i = 0; i < thearray.length; i++) {
+ if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
+ return i;
+ }
+ return thearray.length;
+}
+
+// Replacement for arrayname.push(value) not implemented in IE until version 5.5
+// Appends element to the array
+function arraypush(thearray,value) {
+ thearray[ getarraysize(thearray) ] = value;
+}
+
+// Replacement for arrayname.pop() not implemented in IE until version 5.5
+// Removes and returns the last element of an array
+function arraypop(thearray) {
+ thearraysize = getarraysize(thearray);
+ retval = thearray[thearraysize - 1];
+ delete thearray[thearraysize - 1];
+ return retval;
+}
+
+
+function checkForm() {
+
+ formErrors = false;
+
+ if (document.post.message.value.length < 2) {
+ formErrors = "{L_EMPTY_MESSAGE}";
+ }
+
+ if (formErrors) {
+ alert(formErrors);
+ return false;
+ } else {
+ bbstyle(-1);
+ //formObj.preview.disabled = true;
+ //formObj.submit.disabled = true;
+ return true;
+ }
+}
+
+function emoticon(text) {
+ var txtarea = document.post.message;
+ text = ' ' + text + ' ';
+ if (txtarea.createTextRange && txtarea.caretPos) {
+ var caretPos = txtarea.caretPos;
+ caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
+ txtarea.focus();
+ } else {
+ txtarea.value += text;
+ txtarea.focus();
+ }
+}
+
+function bbfontstyle(bbopen, bbclose) {
+ var txtarea = document.post.message;
+
+ if ((clientVer >= 4) && is_ie && is_win) {
+ theSelection = document.selection.createRange().text;
+ if (!theSelection) {
+ txtarea.value += bbopen + bbclose;
+ txtarea.focus();
+ return;
+ }
+ document.selection.createRange().text = bbopen + theSelection + bbclose;
+ txtarea.focus();
+ return;
+ }
+ else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
+ {
+ mozWrap(txtarea, bbopen, bbclose);
+ return;
+ }
+ else
+ {
+ txtarea.value += bbopen + bbclose;
+ txtarea.focus();
+ }
+ storeCaret(txtarea);
+}
+
+
+function bbstyle(bbnumber) {
+ var txtarea = document.post.message;
+
+ txtarea.focus();
+ donotinsert = false;
+ theSelection = false;
+ bblast = 0;
+
+ if (bbnumber == -1) { // Close all open tags & default button names
+ while (bbcode[0]) {
+ butnumber = arraypop(bbcode) - 1;
+ txtarea.value += bbtags[butnumber + 1];
+ buttext = eval('document.post.addbbcode' + butnumber + '.value');
+ eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
+ }
+ imageTag = false; // All tags are closed including image tags :D
+ txtarea.focus();
+ return;
+ }
+
+ if ((clientVer >= 4) && is_ie && is_win)
+ {
+ theSelection = document.selection.createRange().text; // Get text selection
+ if (theSelection) {
+ // Add tags around selection
+ document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
+ txtarea.focus();
+ theSelection = '';
+ return;
+ }
+ }
+ else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
+ {
+ mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]);
+ return;
+ }
+
+ // Find last occurance of an open tag the same as the one just clicked
+ for (i = 0; i < bbcode.length; i++) {
+ if (bbcode[i] == bbnumber+1) {
+ bblast = i;
+ donotinsert = true;
+ }
+ }
+
+ if (donotinsert) { // Close all open tags up to the one just clicked & default button names
+ while (bbcode[bblast]) {
+ butnumber = arraypop(bbcode) - 1;
+ txtarea.value += bbtags[butnumber + 1];
+ buttext = eval('document.post.addbbcode' + butnumber + '.value');
+ eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
+ imageTag = false;
+ }
+ txtarea.focus();
+ return;
+ } else { // Open tags
+
+ if (imageTag && (bbnumber != 14)) { // Close image tag before adding another
+ txtarea.value += bbtags[15];
+ lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list
+ document.post.addbbcode14.value = "Img"; // Return button back to normal state
+ imageTag = false;
+ }
+
+ // Open tag
+ txtarea.value += bbtags[bbnumber];
+ if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
+ arraypush(bbcode,bbnumber+1);
+ eval('document.post.addbbcode'+bbnumber+'.value += "*"');
+ txtarea.focus();
+ return;
+ }
+ storeCaret(txtarea);
+}
+
+// From http://www.massless.org/mozedit/
+function mozWrap(txtarea, open, close)
+{
+ var selLength = txtarea.textLength;
+ var selStart = txtarea.selectionStart;
+ var selEnd = txtarea.selectionEnd;
+ if (selEnd == 1 || selEnd == 2)
+ selEnd = selLength;
+
+ var s1 = (txtarea.value).substring(0,selStart);
+ var s2 = (txtarea.value).substring(selStart, selEnd)
+ var s3 = (txtarea.value).substring(selEnd, selLength);
+ txtarea.value = s1 + open + s2 + close + s3;
+ return;
+}
+
+// Insert at Claret position. Code from
+// http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
+function storeCaret(textEl) {
+ if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
+}
+
+//-->
+</script>
+<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
+
+{ARTICLE_PREVIEW_BOX}
+{ERROR_BOX}
+
+ <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
+ <tr>
+ <td align="left">{NAVIGATION}</td>
+ </tr>
+</table>
+
+<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
+ <tr>
+ <th class="thHead" colspan="2" height="25"><b>{L_POST_ARTICLE}</b></th>
+ </tr>
+ <tr>
+ <td class="row1"><span class="gen"><b>{L_AUTHORNAME}</b></span></td>
+ <td class="row2"><span class="genmed"><input type="text" class="post" tabindex="1" name="username" size="25" maxlength="25" value="{AUTHORNAME}" />
+ </span></td>
+ </tr>
+ <tr>
+ <td class="row1" width="22%"><span class="gen"><b>{L_ARTICLE_NAME}</b></span></td>
+ <td class="row2" width="78%"> <span class="gen">
+ <input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{ARTICLE_TITLE}" />
+ </span> </td>
+ </tr>
+ <tr>
+ <td class="row1" width="22%"><span class="gen"><b>{L_ARTICLE_DESC}</b></span></td>
+ <td class="row2" width="78%"> <span class="gen">
+ <textarea name="desc" cols="35" rows="5" wrap="virtual" class="post" id="desc" style="width:450px" tabindex="2">{DESC}</textarea>
+ </span> </td>
+ </tr>
+ <tr>
+ <td class="row1" width="22%"><span class="gen"><b>{L_ARTICLE_CATS}</b></span></td>
+ <td class="row2" width="78%"><select name="cats" size="4" multiple="multiple" id="cats">{CATS_HTML}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="row1" valign="top">
+ <table width="100%" border="0" cellspacing="0" cellpadding="1">
+ <tr>
+ <td><span class="gen"><b>{L_ARTICLE_BODY}</b></span> </td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center"> <br />
+ <table width="100" border="0" cellspacing="0" cellpadding="5">
+ <tr align="center">
+ <td colspan="{S_SMILIES_COLSPAN}" class="gensmall"><b>{L_EMOTICONS}</b></td>
+ </tr>
+ <!-- BEGIN smilies_row -->
+ <tr align="center" valign="middle">
+ <!-- BEGIN smilies_col -->
+ <td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td>
+ <!-- END smilies_col -->
+ </tr>
+ <!-- END smilies_row -->
+ <!-- BEGIN switch_smilies_extra -->
+ <tr align="center">
+ <td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies" class="nav">{L_MORE_SMILIES}</a></span></td>
+ </tr>
+ <!-- END switch_smilies_extra -->
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span>
+ <table width="450" border="0" cellspacing="0" cellpadding="2">
+ <tr align="center" valign="middle">
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="bbstyle(6)" onMouseOver="helpline('q')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onClick="bbstyle(8)" onMouseOver="helpline('c')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onClick="bbstyle(10)" onMouseOver="helpline('l')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onClick="bbstyle(12)" onMouseOver="helpline('o')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onClick="bbstyle(14)" onMouseOver="helpline('p')" />
+ </span></td>
+ <td><span class="genmed">
+ <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
+ </span></td>
+ </tr>
+ <tr>
+ <td colspan="9">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><span class="genmed"> {L_FONT_COLOR}:
+ <select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
+ <option style="color:black; background-color: {T_TD_COLOR1}" value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option>
+ <option style="color:darkred; background-color: {T_TD_COLOR1}" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option>
+ <option style="color:red; background-color: {T_TD_COLOR1}" value="red" class="genmed">{L_COLOR_RED}</option>
+ <option style="color:orange; background-color: {T_TD_COLOR1}" value="orange" class="genmed">{L_COLOR_ORANGE}</option>
+ <option style="color:brown; background-color: {T_TD_COLOR1}" value="brown" class="genmed">{L_COLOR_BROWN}</option>
+ <option style="color:yellow; background-color: {T_TD_COLOR1}" value="yellow" class="genmed">{L_COLOR_YELLOW}</option>
+ <option style="color:green; background-color: {T_TD_COLOR1}" value="green" class="genmed">{L_COLOR_GREEN}</option>
+ <option style="color:olive; background-color: {T_TD_COLOR1}" value="olive" class="genmed">{L_COLOR_OLIVE}</option>
+ <option style="color:cyan; background-color: {T_TD_COLOR1}" value="cyan" class="genmed">{L_COLOR_CYAN}</option>
+ <option style="color:blue; background-color: {T_TD_COLOR1}" value="blue" class="genmed">{L_COLOR_BLUE}</option>
+ <option style="color:darkblue; background-color: {T_TD_COLOR1}" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option>
+ <option style="color:indigo; background-color: {T_TD_COLOR1}" value="indigo" class="genmed">{L_COLOR_INDIGO}</option>
+ <option style="color:violet; background-color: {T_TD_COLOR1}" value="violet" class="genmed">{L_COLOR_VIOLET}</option>
+ <option style="color:white; background-color: {T_TD_COLOR1}" value="white" class="genmed">{L_COLOR_WHITE}</option>
+ <option style="color:black; background-color: {T_TD_COLOR1}" value="black" class="genmed">{L_COLOR_BLACK}</option>
+ </select> {L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
+ <option value="7" class="genmed">{L_FONT_TINY}</option>
+ <option value="9" class="genmed">{L_FONT_SMALL}</option>
+ <option value="12" selected class="genmed">{L_FONT_NORMAL}</option>
+ <option value="18" class="genmed">{L_FONT_LARGE}</option>
+ <option value="24" class="genmed">{L_FONT_HUGE}</option>
+ </select>
+ </span></td>
+ <td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="9"> <span class="gensmall">
+ <input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
+ </span></td>
+ </tr>
+ <tr>
+ <td colspan="9"><span class="gen">
+ <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{ARTICLE}</textarea>
+ </span></td>
+ </tr>
+ </table>
+ </span></td>
+ </tr>
+ <tr>
+ <td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
+ <td class="row2"><span class="gen"> </span>
+ <table cellspacing="0" cellpadding="1" border="0">
+ <!-- BEGIN switch_html_checkbox -->
+ <tr>
+ <td>
+ <input type="checkbox" name="disable_html" {S_HTML_CHECKED} />
+ </td>
+ <td><span class="gen">{L_DISABLE_HTML}</span></td>
+ </tr>
+ <!-- END switch_html_checkbox -->
+ <!-- BEGIN switch_bbcode_checkbox -->
+ <tr>
+ <td>
+ <input type="checkbox" name="disable_bbcode" {S_BBCODE_CHECKED} />
+ </td>
+ <td><span class="gen">{L_DISABLE_BBCODE}</span></td>
+ </tr>
+ <!-- END switch_bbcode_checkbox -->
+ <!-- BEGIN switch_smilies_checkbox -->
+ <tr>
+ <td>
+ <input type="checkbox" name="disable_smilies" {S_SMILIES_CHECKED} />
+ </td>
+ <td><span class="gen">{L_DISABLE_SMILIES}</span></td>
+ </tr>
+ <!-- END switch_smilies_checkbox -->
+ <!-- BEGIN switch_signature_checkbox -->
+ <tr>
+ <td>
+ <input type="checkbox" name="attach_sig" {S_SIGNATURE_CHECKED} />
+ </td>
+ <td><span class="gen">{L_ATTACH_SIGNATURE}</span></td>
+ </tr>
+ <!-- END switch_signature_checkbox -->
+ </table>
+ </td>
+ </tr>
+ {POLLBOX}
+ <tr>
+ <td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" /> <input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td>
+ </tr>
+ </table>
+
+ <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
+ <tr>
+ <td align="left" valign="top">{NAVIGATION}</td>
+ <td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
+ </tr>
+ </table>
+</form>
\ No newline at end of file
Modified: root/templates/subSilver/kb_main.tpl
===================================================================
--- root/templates/subSilver/kb_main.tpl 2006-11-21 19:57:07 UTC (rev 19)
+++ root/templates/subSilver/kb_main.tpl 2006-11-23 15:32:31 UTC (rev 20)
@@ -1,3 +1,10 @@
+<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
+ <tr>
+ <td align="left">{NAVIGATION}</td>
+ <td align="right"> </td>
+ </tr>
+</table>
+
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_CATEGORIES} </th>
@@ -30,7 +37,7 @@
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
<tr>
- <td align="left"> </td>
+ <td align="left">{NAVIGATION}</td>
<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
\ No newline at end of file
Modified: root/templates/subSilver/kb_viewcat.tpl
===================================================================
--- root/templates/subSilver/kb_viewcat.tpl 2006-11-21 19:57:07 UTC (rev 19)
+++ root/templates/subSilver/kb_viewcat.tpl 2006-11-23 15:32:31 UTC (rev 20)
@@ -1,3 +1,10 @@
+<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
+ <tr>
+ <td align="left">{NAVIGATION}</td>
+ <td align="right"> </td>
+ </tr>
+</table>
+
<!-- BEGIN switch_subcats -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
@@ -18,8 +25,9 @@
</tr>
</table>
<!-- END switch_subcats -->
+
+<!-- BEGIN switch_articles -->
<br />
-<!-- BEGIN switch_articles -->
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap"> {L_ARTICLES} </th>
@@ -29,12 +37,12 @@
</tr>
<!-- BEGIN articlerow -->
<tr>
- <td class="row1" align="center" valign="middle" width="20"><img src="{articlerow.TOPIC_FOLDER_IMG}" width="19" height="18" /></td>
- <td class="row1" width="100%"><span class="topictitle"><a href="{articlerow.U_VIEW_ARTICLE}" class="topictitle">{articlerow.ARTICLE_TITLE}</a></span><span class="gensmall"><br />
- {articlerow.ARTICLE_DESC}</span></td>
- <td class="row3" align="center" valign="middle"><span class="name">{articlerow.ARTICLE_AUTHOR}</span></td>
- <td class="row2" align="center" valign="middle"><span class="postdetails">{articlerow.ARTICLE_HITS}</span></td>
- <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{articlerow.ARTICLE_LAST_ACTION}</span></td>
+ <td class="row1" align="center" valign="middle" width="20"><img src="{switch_articles.articlerow.TOPIC_FOLDER_IMG}" width="19" height="18" /></td>
+ <td class="row1" width="100%"><span class="topictitle"><a href="{switch_articles.articlerow.U_VIEW_ARTICLE}" class="topictitle">{switch_articles.articlerow.ARTICLE_TITLE}</a></span><span class="gensmall"><br />
+ {switch_articles.articlerow.ARTICLE_DESC}</span></td>
+ <td class="row3" align="center" valign="middle"><span class="name">{switch_articles.articlerow.ARTICLE_AUTHOR}</span></td>
+ <td class="row2" align="center" valign="middle"><span class="postdetails">{switch_articles.articlerow.ARTICLE_HITS}</span></td>
+ <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{switch_articles.articlerow.ARTICLE_LAST_ACTION}</span></td>
</tr>
<!-- END articlerow -->
<tr>
@@ -45,7 +53,7 @@
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
<tr>
- <td align="left"> </td>
+ <td align="left">{NAVIGATION}</td>
<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|