You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2005-12-08 15:15:28
|
Update of /cvsroot/mxbb/mx_pafiledb/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5653/modules/mx_pafiledb/templates/subSilver Modified Files: pa_comment_posting.tpl pa_file_body.tpl pa_footer.tpl pa_search_body.tpl pa_search_result.tpl Log Message: in progress commit for mx_pafiledb Index: pa_comment_posting.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_comment_posting.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pa_comment_posting.tpl 9 Jan 2005 21:44:14 -0000 1.2 --- pa_comment_posting.tpl 8 Dec 2005 15:15:13 -0000 1.3 *************** *** 16,26 **** 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_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); ! var is_mac = (clientPC.indexOf("mac")!=-1); ! // Helpline messages --- 16,26 ---- 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 *************** *** 94,130 **** function emoticon(text) { text = ' ' + text + ' '; ! if (document.post.message.createTextRange && document.post.message.caretPos) { ! var caretPos = document.post.message.caretPos; ! caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; ! document.post.message.focus(); } else { ! document.post.message.value += text; ! document.post.message.focus(); } } function bbfontstyle(bbopen, bbclose) { if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { ! document.post.message.value += bbopen + bbclose; ! document.post.message.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; ! document.post.message.focus(); return; ! } else { ! document.post.message.value += bbopen + bbclose; ! document.post.message.focus(); return; } ! storeCaret(document.post.message); } function bbstyle(bbnumber) { donotinsert = false; theSelection = false; --- 94,141 ---- 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; *************** *** 134,154 **** while (bbcode[0]) { butnumber = arraypop(bbcode) - 1; ! document.post.message.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 ! document.post.message.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]; ! document.post.message.focus(); ! theSelection = ''; return; } --- 145,171 ---- 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; } *************** *** 165,179 **** while (bbcode[bblast]) { butnumber = arraypop(bbcode) - 1; ! document.post.message.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; } ! document.post.message.focus(); return; } else { // Open tags if (imageTag && (bbnumber != 14)) { // Close image tag before adding another ! document.post.message.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 --- 182,196 ---- 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 *************** *** 182,193 **** // Open tag ! document.post.message.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 += "*"'); ! document.post.message.focus(); return; } ! storeCaret(document.post.message); } --- 199,226 ---- // 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; } *************** *** 245,249 **** <tr> <td class="row1" ><span class="gen"><b>{L_COMMENT_TITLE}</b></span></td> ! <td class="row2"><input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" /></span></td> </tr> <tr> --- 278,282 ---- <tr> <td class="row1" ><span class="gen"><b>{L_COMMENT_TITLE}</b></span></td> ! <td class="row2"><input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{TITLE}" /></span></td> </tr> <tr> Index: pa_file_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_file_body.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pa_file_body.tpl 11 Apr 2005 17:55:43 -0000 1.5 --- pa_file_body.tpl 8 Dec 2005 15:15:13 -0000 1.6 *************** *** 72,81 **** <td class="row1" valign="middle" colspan="2"><span class="genmed">{FILE_SIZE}</span></td> </tr> ! <!-- BEGIN show_ratings --> <tr> ! <td class="row2" valign="middle"><span class="genmed">{L_RATING}:</span></td> ! <td class="row1" valign="middle" colspan="2"><span class="genmed">{RATING} ({FILE_VOTES} {L_VOTES})</span></td> </tr> ! <!-- END show_ratings --> <tr> <td class="row2" valign="middle"><span class="genmed">{L_DLS}:</span></td> --- 72,81 ---- <td class="row1" valign="middle" colspan="2"><span class="genmed">{FILE_SIZE}</span></td> </tr> ! <!-- BEGIN use_ratings --> <tr> ! <td class="row2" valign="middle"><span class="genmed">{use_ratings.L_RATING}:</span></td> ! <td class="row1" valign="middle" colspan="2"><span class="genmed">{use_ratings.RATING} ({use_ratings.FILE_VOTES} {use_ratings.L_VOTES})</span></td> </tr> ! <!-- END use_ratings --> <tr> <td class="row2" valign="middle"><span class="genmed">{L_DLS}:</span></td> *************** *** 98,104 **** <td width="33%" align="center"><a href="{U_DOWNLOAD}"><img src="{DOWNLOAD_IMG}" border="0" alt="{L_DOWNLOAD}" /></a></td> <!-- ENDIF --> ! <!-- IF AUTH_RATE --> ! <td width="34%" align="center"><a href="{U_RATE}"><img src="{RATE_IMG}" border="0" alt="{L_RATE}" /></a></td> ! <!-- ENDIF --> <!-- IF AUTH_EMAIL --> <td width="33%" align="center"><a href="{U_EMAIL}"><img src="{EMAIL_IMG}" border="0" alt="{L_EMAIL}" /></a></td> --- 98,106 ---- <td width="33%" align="center"><a href="{U_DOWNLOAD}"><img src="{DOWNLOAD_IMG}" border="0" alt="{L_DOWNLOAD}" /></a></td> <!-- ENDIF --> ! ! <!-- BEGIN use_ratings --> ! <td width="34%" align="center"><a href="{use_ratings.U_RATE}"><img src="{use_ratings.RATE_IMG}" border="0" alt="{use_ratings.L_RATE}" /></a></td> ! <!-- END use_ratings --> ! <!-- IF AUTH_EMAIL --> <td width="33%" align="center"><a href="{U_EMAIL}"><img src="{EMAIL_IMG}" border="0" alt="{L_EMAIL}" /></a></td> *************** *** 107,112 **** </table> <br /> ! <!-- IF INCLUDE_COMMENTS --> ! <!-- INCLUDE pa_comment_body.tpl --> ! <!-- ENDIF --> <!-- INCLUDE pa_footer.tpl --> --- 109,177 ---- </table> <br /> ! ! <!-- BEGIN use_comments --> ! <table width="100%" cellpadding="4" cellspacing="0" class="forumline"> ! <tr> ! <th class="thCornerL" colspan="2">{use_comments.L_COMMENTS}</th> ! </tr> ! <!-- BEGIN no_comments --> ! <tr> ! <td colspan="2" class="row1" align="center"><span class="genmed">{use_comments.no_comments.L_NO_COMMENTS}</span></td> ! </tr> ! <!-- END no_comments --> ! ! <!-- BEGIN text --> ! <tr> ! <td width="100" align="left" valign="top" class="row1"><span class="name"> ! <b>{use_comments.text.POSTER}</b></span><hr /><br /> ! <span class="postdetails">{use_comments.text.POSTER_RANK}<br /> ! {use_comments.text.RANK_IMAGE}{use_comments.text.POSTER_AVATAR}</span><br /> ! </td> ! <td class="row1" height="28" valign="top"> ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td width="80%" valign="middle"><span class="genmed"><img src="{use_comments.text.ICON_MINIPOST_IMG}" width="12" height="9" border="0" /> <b>{use_comments.text.TITLE}</b> </span><span class="genmed">({use_comments.text.TIME})</span></td> ! <td align="right"> ! <!-- BEGIN auth_edit --> ! <a href="{use_comments.text.auth_edit.U_COMMENT_EDIT}"><img src="{use_comments.text.auth_edit.EDIT_IMG}" alt="{use_comments.text.auth_edit.L_COMMENT_EDIT}" title="{use_comments.text.auth_edit.L_COMMENT_EDIT}" border="0"></a> ! <!-- END auth_edit --> ! <!-- BEGIN auth_delete --> ! <a href="{use_comments.text.auth_delete.U_COMMENT_DELETE}"><img src="{use_comments.text.auth_delete.DELETE_IMG}" alt="{use_comments.text.auth_delete.L_COMMENT_DELETE}" title="{use_comments.text.auth_delete.L_COMMENT_DELETE}" border="0"></a> ! <!-- END auth_delete --> ! </td> ! </tr> ! <tr> ! <td colspan="2"><hr /></td> ! </tr> ! <tr> ! <td colspan="2"valign="top"><span class="postbody">{use_comments.text.TEXT}</span></td> ! </tr> ! </table> ! </td> ! </tr> ! <tr> ! <td class="spaceRow" colspan="2" height="1"><img src="{use_comments.text.ICON_SPACER}" alt="" width="1" height="1" /></td> ! </tr> ! <!-- END text --> ! </table> ! ! <!-- BEGIN comments_pag --> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> ! <tr> ! <td><span class="nav">{use_comments.comments_pag.PAGE_NUMBER}</span></td> ! <td align="right"><span class="nav">{use_comments.comments_pag.PAGINATION}</span></td> ! </tr> ! </table> ! <!-- END comments_pag --> ! ! <!-- BEGIN auth_post --> ! <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> ! <tr> ! <td><a href="{use_comments.auth_post.U_COMMENT_POST}"><img src="{use_comments.auth_post.REPLY_IMG}" border="0" alt="{use_comments.auth_post.L_COMMENT_ADD}" align="middle" /></a></td> ! </tr> ! </table> ! <br clear="all" /> ! <!-- END auth_post --> ! <!-- END use_comments --> ! <!-- INCLUDE pa_footer.tpl --> Index: pa_search_result.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_search_result.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pa_search_result.tpl 9 Jan 2005 21:44:14 -0000 1.2 --- pa_search_result.tpl 8 Dec 2005 15:15:14 -0000 1.3 *************** *** 2,6 **** <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> ! <td align="left" valign="bottom"><span class="maintitle">{L_SEARCH_MATCHES}</span><br /></td> </tr> </table> --- 2,6 ---- <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> ! <td align="left" valign="bottom"><span class="cattitle">{L_SEARCH_MATCHES}</span><br /></td> </tr> </table> *************** *** 9,13 **** <tr> <td valign="bottom"> ! <span class="nav"><a href="{U_DOWNLOAD}" class="nav">{DOWNLOAD}</a> » {L_SEARCH}</span> </td> </tr> --- 9,13 ---- <tr> <td valign="bottom"> ! <span class="nav"><a href="{U_DOWNLOAD}" class="nav">{L_MODULE}</a> » {L_SEARCH}</span> </td> </tr> Index: pa_search_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_search_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pa_search_body.tpl 9 Jan 2005 21:44:14 -0000 1.2 --- pa_search_body.tpl 8 Dec 2005 15:15:14 -0000 1.3 *************** *** 4,8 **** <tr> <td valign="bottom"> ! <span class="nav"><a href="{U_DOWNLOAD}" class="nav">{DOWNLOAD}</a> » {L_SEARCH}</span> </td> </tr> --- 4,8 ---- <tr> <td valign="bottom"> ! <span class="nav"><a href="{U_DOWNLOAD}" class="nav">{L_MODULE}</a> » {L_SEARCH}</span> </td> </tr> Index: pa_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_footer.tpl,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pa_footer.tpl 1 May 2005 16:41:29 -0000 1.14 --- pa_footer.tpl 8 Dec 2005 15:15:14 -0000 1.15 *************** *** 3,17 **** <tr> <td align="left" valign="top" > ! <form method="get" name="jumpbox" action="{S_JUMPBOX_ACTION}" onSubmit="if(document.jumpbox.cat_id.value == -1){return false;}"> ! <input type="hidden" name="action" value="category" /> ! <input type="hidden" name="page" value="{MX_PAGE}" /> ! <span class="gensmall">{L_JUMP} ! <select name="cat_id" onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"> ! <option value="-1">{L_JUMP}</option> ! {JUMPMENU} ! </select> ! <input type="submit" value="{L_GO}" class="liteoption" /> ! </span> ! </form> </td> <td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td> --- 3,17 ---- <tr> <td align="left" valign="top" > ! <form method="get" name="jumpbox" action="{S_JUMPBOX_ACTION}" onSubmit="if(document.jumpbox.cat_id.value == -1){return false;}"> ! <input type="hidden" name="action" value="category" /> ! <input type="hidden" name="page" value="{MX_PAGE}" /> ! <span class="gensmall">{L_QUICK_NAV}<br /> ! <select name="cat_id" onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"> ! <option value="-1">{L_QUICK_JUMP}</option> ! {JUMPMENU} ! </select> ! <input type="submit" value="{L_QUICK_GO}" class="liteoption" /> ! </span> ! </form> </td> <td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td> |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:07:00
|
Update of /cvsroot/mxbb/mx_kb/kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4009/modules/mx_kb/kb Added Files: index.htm kb_common.php Log Message: in progress commit for mx_kb --- NEW FILE: kb_common.php --- (This appears to be a binary file; contents omitted.) --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4009/modules/mx_kb/kb/modules Added Files: kb_article.php kb_cat.php kb_main.php kb_moderator.php kb_post.php kb_post_comment.php kb_rate.php kb_search.php kb_stats.php Log Message: in progress commit for mx_kb --- NEW FILE: kb_stats.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_stats.php,v 1.1 2005/12/08 15:06:47 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } class mx_kb_stats extends mx_kb_public { function main( $action ) { global $template, $lang, $db, $phpEx, $kb_config, $mx_request_vars, $userdata; global $mx_root_path, $module_root_path, $is_block, $phpEx; // // Request vars // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); $stats = $mx_request_vars->request('stats', MX_TYPE_NO_TAGS, ''); $this->generate_jumpbox( 'auth_view', 0, 0, true ); $template->set_filenames( array( 'body' => 'kb_stats_body.tpl' ) ); if ( $stats == 'toprated' ) { $path_kb = $lang['Top_toprated']; } elseif ( $stats == 'latest' ) { $path_kb = $lang['Top_latest']; } elseif ( $stats == 'mostpopular' ) { $path_kb = $lang['Top_most_popular']; } $template->assign_vars( array( 'L_CATEGORY_NAME' => $category_name, 'L_ARTICLE' => $lang['Article'], 'L_CAT' => $lang['Category'], 'L_ARTICLE_TYPE' => $lang['Article_type'], 'L_ARTICLE_CATEGORY' => $lang['Category'], 'L_ARTICLE_DATE' => $lang['Date'], 'L_ARTICLE_AUTHOR' => $lang['Author'], 'L_VIEWS' => $lang['Views'], 'L_VOTES' => $lang['Votes'], 'L_CATEGORY' => $lang['Category_sub'], 'L_ARTICLES' => $lang['Articles'], 'PATH' => '» ' . $path_kb, 'U_CAT' => append_sid( this_kb_mxurl( 'mode=cat&cat=' . $category_id ) ) )); $this->display_stats( $stats, '1', 'articlerow', $start, $kb_config['pagination'] ); // // Stats pagination is inactivated for now ;) // if ( $total_articles > 0 ) { // $pagination = generate_pagination( this_kb_mxurl( "mode=cat&cat=$category_id" ), $total_articles, $kb_config['pagination'], $start ) . ' '; } if ( $total_articles > 0 ) { // $template->assign_block_vars( 'pagination', array() ); } // // Get footer quick dropdown jumpbox // $this->generate_jumpbox( 'auth_view', 0, 0, true ); } } ?> --- NEW FILE: kb_post.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_post.php,v 1.1 2005/12/08 15:06:47 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } class mx_kb_post extends mx_kb_public { function main( $action ) { global $template, $mx_kb_functions, $lang, $board_config, $phpEx, $kb_config, $db, $images, $userdata, $_POST; global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; global $HTTP_POST_VARS; // // Includes // include_once( $phpbb_root_path . 'includes/bbcode.'.$phpEx); include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); // // Request vars // $article_id = $mx_request_vars->request('k', MX_TYPE_INT, ''); $kb_post_mode = empty( $article_id ) ? 'add' : 'edit'; $this->page_title = $kb_post_mode == 'add' ? $lang['Add_article'] : $lang['Edit_article']; if ( $mx_request_vars->is_request('cat') ) { $category_id = $mx_request_vars->request('cat', MX_TYPE_INT, 0); } else if( $kb_post_mode == 'edit') { $category_id = $this->get_cat_id($article_id); } else { mx_message_die( GENERAL_MESSAGE, $lang['Category_not_exsist'] ); } $delete = $mx_request_vars->request('delete', MX_TYPE_NO_TAGS, ''); $submit = $mx_request_vars->is_request('article_submit'); $preview = $mx_request_vars->is_request('preview'); $cancel = $mx_request_vars->is_request('cancel'); // // Instatiate custom fields (only used in kb_article) // include_once( $module_root_path . 'kb/includes/functions_field.' . $phpEx ); $mx_kb_custom_field = new mx_kb_custom_field(); $mx_kb_custom_field->init(); // // wysiwyg // if ( $kb_config['allow_wysiwyg'] && file_exists( $mx_root_path . 'modules/tinymce/jscripts/tiny_mce/blank.htm' )) { $bbcode_on = false; $html_on = true; $smilies_on = false; $links_on = false; $images_on = false; $html_entities_match = array( ); $html_entities_replace = array( ); $template->assign_block_vars( "tinyMCE", array() ); } else { $bbcode_on = $kb_config['allow_bbcode'] ? true : false; $html_on = $kb_config['allow_html'] ? true : false; $smilies_on = $kb_config['allow_smilies'] ? true : false; $links_on = $kb_config['allow_links'] ? true : false; $images_on = $kb_config['allow_images'] ? true : false; $board_config['allow_html_tags'] = $kb_config['allowed_html_tags']; $template->assign_block_vars( 'formatting', array() ); } // // post article ----------------------------------------------------------------------------ADD/EDIT // if ( $submit ) { if ( !$mx_request_vars->is_request('article_name') || !$mx_request_vars->is_request('article_desc') || !$mx_request_vars->is_request('message') ) { $message = $lang['Empty_fields'] . '<br /><br />' . sprintf( $lang['Empty_fields_return'], '<a href="' . append_sid( this_kb_mxurl( 'mode=add' ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } $article_title = ( !empty( $_POST['article_name'] ) ) ? htmlspecialchars( trim ( $_POST['article_name'] ) ) : ''; $article_description = ( !empty( $_POST['article_desc'] ) ) ? htmlspecialchars( trim ( $_POST['article_desc'] ) ) : ''; $bbcode_uid = $mx_request_vars->request('bbcode_uid', MX_TYPE_NO_TAGS, ''); if ( empty( $bbcode_uid ) ) { $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : ''; } $article_text = str_replace( '<br />', "\n", $_POST['message'] ); $article_text = prepare_message( trim($article_text), $html_on, $bbcode_on, $smilies_on, $bbcode_uid ); $article_text = bbencode_first_pass( $article_text, $bbcode_uid ); /* $article_title = ( !empty( $HTTP_POST_VARS['article_name'] ) ) ? htmlspecialchars( trim ( $HTTP_POST_VARS['article_name'] ) ) : ''; $article_description = ( !empty( $HTTP_POST_VARS['article_desc'] ) ) ? htmlspecialchars( trim ( $HTTP_POST_VARS['article_desc'] ) ) : ''; $article_text = ( !empty( $HTTP_POST_VARS['message'] ) ) ? $HTTP_POST_VARS['message'] : ''; // // Check message // if ( !empty( $article_text ) ) { if ( empty( $bbcode_uid ) ) { $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : ''; } $article_text = prepare_message( trim( $article_text ), $html_on, $bbcode_on, $smilies_on, $bbcode_uid ); } */ $date = time(); $author_id = $userdata['user_id'] > 0 ? intval( $userdata['user_id'] ) : '-1'; $type_id = $mx_request_vars->request('type_id', MX_TYPE_INT, ''); $username = $HTTP_POST_VARS['username']; // // Check username // if (!empty($username)) { $username = phpbb_clean_username($username); if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username'])) { include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); $result = validate_username($username); if ($result['error']) { $error_msg = (!empty($error_msg)) ? '<br />' . $result['error_msg'] : $result['error_msg']; mx_message_die(GENERAL_MESSAGE, $error_msg ); } } else { $username = ''; } } switch ( $kb_post_mode ) { case 'edit': // UPDATE Article ------------------------------------------- if ( !($this->auth_user[$category_id]['auth_edit'] || $this->auth_user[$category_id]['auth_mod']) ) { $message = $lang['No_edit'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } // // Approve // if ( $this->auth_user[$category_id]['auth_mod'] || $this->auth_user[$category_id]['auth_approval_edit'] ) // approval auth { $approve = 1; // approved } else { $approve = 2; // edited unapproved } $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET article_category_id = '$category_id', article_title = '" . str_replace( "\'", "''", $article_title ) . "', article_description = '" . str_replace( "\'", "''", $article_description ) . "', article_body = '" . str_replace( "\'", "''", $article_text ) . "', article_type = '" . $approve . "', article_date = '" . $date . "', approved = '" . $type_id . "', bbcode_uid = '" . $bbcode_uid . "' WHERE article_id = ". $article_id; if ( !( $results = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not edit article", '', __LINE__, __FILE__, $sql ); } $this->modified( true ); break; case 'add': // ADD NEW --------------------------------------------------------------------------------- if ( !($this->auth_user[$category_id]['auth_post'] || $this->auth_user[$category_id]['auth_mod']) ) { $message = $lang['No_add'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } if ( $this->auth_user[$category_id]['auth_approval'] || $this->auth_user[$category_id]['auth_mod'] ) { $approve = 1; // approved } else { $approve = 0; // unapproved } $sql = "INSERT INTO " . KB_ARTICLES_TABLE . " ( article_category_id , article_title , article_description , article_date , article_author_id , username , bbcode_uid , article_body , article_type , approved, views ) VALUES ( '$category_id', '" . str_replace( "\'", "''", $article_title ) . "', '" . str_replace( "\'", "''", $article_description ) . "', '$date', '$author_id', '$username', '$bbcode_uid', '" . str_replace( "\'", "''", $article_text ) . "', '$type_id', '$approve', '0')"; if ( !( $results = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not submit aritcle", '', __LINE__, __FILE__, $sql ); } // // Get new article id // $sql = "SELECT MAX(article_id) AS new_id FROM " . KB_ARTICLES_TABLE; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, "Couldn't find max article_id", "", __LINE__, __FILE__, $sql); } $temp_row = $db->sql_fetchrow($result); $article_id = $temp_row['new_id']; $this->modified( true ); break; } // // Update custom fields // $mx_kb_custom_field->file_update_data( $article_id ); $this->_kb(); // // Notification // if ( $kb_config['notify'] > 0 ) { // // Instatiate notification // $mx_kb_notification = new mx_kb_notification(); $mx_notification_mode = $kb_config['notify'] == 1 ? MX_PM_MODE : MX_MAIL_MODE; $mx_kb_notification->init( $mx_notification_mode, $article_id ); // // Now send notification // $mx_notification_action = $kb_post_mode == 'add' ? MX_NEW_NOTIFICATION : MX_EDITED_NOTIFICATION; $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action ); if ( $kb_config['notify_group'] > 0 ) { $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($kb_config['notify_group']) ); } } /* // // Autocomment // if ( $kb_config['autogenerate_comments'] ) { $title = ( !empty( $_POST['subject'] ) ) ? htmlspecialchars( trim ( $_POST['subject'] ) ) : ''; $comment_bbcode_uid = make_bbcode_uid(); $comments_text = str_replace( '<br />', "\n", $_POST['message'] ); $comments_text = prepare_message( trim($comments_text), $html_on, $bbcode_on, $smilies_on, $comment_bbcode_uid ); $comments_text = bbencode_first_pass( $comments_text, $comment_bbcode_uid ); if ( $length > $kb_config['max_comment_chars'] ) { mx_message_die( GENERAL_ERROR, 'Your comment is too long!<br/>The maximum length allowed in characters is ' . $kb_config['max_comment_chars'] . '' ); } if ( $mx_request_vars->is_request('cid') ) { if ( $this->comments[$article_data['article_category_id']]['internal_comments'] ) { $sql = "UPDATE " . KB_COMMENTS_TABLE . " SET comments_text = '" . str_replace( "\'", "''", $comments_text ) . "', comments_title = '" . str_replace( "\'", "''", $title ) . "', comment_bbcode_uid = '" . $comment_bbcode_uid . "' WHERE comments_id = " . $mx_request_vars->request('cid', MX_TYPE_INT, 0) . " AND article_id = ". $item_id; } else { include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); $mx_kb_comments = new mx_kb_comments(); $mx_kb_comments->init( $item_id ); $mx_kb_comments->post( 'update', $cid, $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); } } else { if ( $this->comments[$article_data['article_category_id']]['internal_comments'] ) { $time = time(); $poster_id = intval( $userdata['user_id'] ); $sql = "INSERT INTO " . KB_COMMENTS_TABLE . "(article_id, comments_text, comments_title, comments_time, comment_bbcode_uid, poster_id) VALUES('$item_id','" . str_replace( "\'", "''", $comments_text ) . "','" . str_replace( "\'", "''", $title ) . "','$time', '$comment_bbcode_uid','$poster_id')"; } else { include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); $mx_kb_comments = new mx_kb_comments(); $mx_kb_comments->init( $item_id ); $mx_kb_comments->post( 'insert', '', $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); } } } */ /* $kb_comment = array(); // Populate the kb_comment variable $kb_comment = kb_get_data($kb_row, $userdata, $kb_post_mode); // Compose post header $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; $message_temp = kb_compose_comment( $kb_comment ); $kb_message = $message_temp['message']; $kb_update_message = $message_temp['update_message']; // Insert phpBB post if using kb commenting if ( $approve == 1 && $kb_config['use_comments'] && $this->auth_user[$category_id]['auth_comment']) { $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET topic_id = " . $topic_data['topic_id'] . " WHERE article_id = " . $kb_comment['article_id']; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } } $kb_notify_info = $kb_post_mode == 'add' ? 'new' : 'edited'; kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], $kb_notify_info ); */ if ( $approve == 1 ) { $message = $lang['Article_submitted'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf($lang['Click_return_article'], '<a href="' . append_sid(this_kb_mxurl("mode=article&k=" . $article_id)). '">', '</a>') . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); } else { $message = $lang['Article_submitted_Approve'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); } mx_message_die( GENERAL_MESSAGE, $message ); } // ---------------------------------------------------------------------------------------------------------- MAIN FORM // ---------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------- // // Instatiate text tools // $mx_kb_text_tools = new mx_kb_text_tools(); // // PreText HIDE/SHOW // if ( $kb_config['show_pretext'] ) { // Pull Header/Body info. $pt_header = $kb_config['pt_header']; $pt_body = $kb_config['pt_body']; $template->set_filenames( array( 'pretext' => 'kb_post_pretext.tpl' ) ); $template->assign_vars( array( 'PRETEXT_HEADER' => $pt_header, 'PRETEXT_BODY' => $pt_body ) ); $template->assign_var_from_handle( 'KB_PRETEXT_BOX', 'pretext' ); } // // Security // if ( !$this->auth_user[$category_id]['auth_mod'] ) { if ( $kb_post_mode == 'edit' && !$this->auth_user[$category_id]['auth_edit'] ) { $message = $lang['No_edit'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } if ( $kb_post_mode == 'add' && ( !$this->auth_user[$category_id]['auth_post'] || $kb_config['enable_module'] == 0 ) ) { $message = $lang['No_add'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } // // First (re)declare basic variables // if ( $kb_post_mode == 'edit' ) { $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = '" . $article_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } $kb_row = $db->sql_fetchrow( $result ); } $kb_title = ( isset( $HTTP_POST_VARS['article_name'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['article_name'] ) ) ) : $kb_row['article_title']; $kb_desc = ( isset( $HTTP_POST_VARS['article_desc'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['article_desc'] ) ) ): $kb_row['article_description']; $kb_text = ( isset( $HTTP_POST_VARS['message'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['message'] ) ) ) : $kb_row['article_body']; $type_id = ( isset( $HTTP_POST_VARS['type_id'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['type_id'] ) ) ) : $kb_row['article_type']; $bbcode_uid = ( isset( $HTTP_POST_VARS['bbcode_uid'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['bbcode_uid'] ) ) ) : $kb_row['bbcode_uid']; $username = ( isset( $HTTP_POST_VARS['username'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['username'] ) ) ) : $kb_row['username']; if ( $preview ) { $preview_title = $kb_title; $preview_desc = $kb_desc; $preview_text = $kb_text; $orig_word = array(); $replacement_word = array(); obtain_word_list( $orig_word, $replacement_word ); $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : ''; $preview_text = stripslashes(prepare_message(addslashes(unprepare_message($preview_text)), $html_on, $bbcode_on, $smilies_on, $bbcode_uid)); // Now we run comment suite before checking for smilies // so admins can add them in messages if they like // and so smilies are not counted as images in sigs. // this is done here again incase above conditions are // not met. if (!$kb_config['allow_images'] || !$kb_config['allow_links']) { $preview_text = $mx_kb_text_tools->remove_images_links( $preview_text, $kb_config['allow_images'], $kb_config['no_image_message'], $kb_config['allow_links'], $kb_config['no_link_message'] ); } if ( $bbcode_on ) { $preview_text = bbencode_second_pass( $preview_text, $bbcode_uid ); } if ( count( $orig_word ) ) { $preview_title = preg_replace( $orig_word, $replacement_word, $preview_title ); $preview_desc = preg_replace( $orig_word, $replacement_word, $preview_desc ); $preview_text = preg_replace( $orig_word, $replacement_word, $preview_text ); } if ( $smilies_on ) { $preview_text = mx_smilies_pass( $preview_text ); } $preview_text = make_clickable( $preview_text ); $preview_text = str_replace( "\n", '<br />', $preview_text ); $template->set_filenames( array( 'preview' => 'kb_post_preview.tpl' ) ); $template->assign_vars( array( 'L_PREVIEW' => $lang['Preview'], 'ARTICLE_TITLE' => $preview_title, 'ARTICLE_DESC' => $preview_desc, 'ARTICLE_BODY' => $preview_text, 'PREVIEW_MESSAGE' => $preview_text ) ); $template->assign_var_from_handle( 'KB_PREVIEW_BOX', 'preview' ); } // // show article form - MAIN // if ( $kb_post_mode == 'edit' ) { $s_hidden_vars = '<input type="hidden" name="k" value="' . $article_id . '"><input type="hidden" name="bbcode_uid" value="' . $bbcode_uid . '"><input type="hidden" name="author_id" value="' . $author_id . '">'; } else { $s_hidden_vars = '<input type="hidden" name="cat" value="' . $category_id . '">'; } if ( $bbcode_uid != '' ) { $kb_text = preg_replace('/\:(([a-z0-9]:)?)' . $bbcode_uid . '/s', '', $kb_text); } $kb_text = str_replace('<', '<', $kb_text); $kb_text = str_replace('>', '>', $kb_text); $kb_text = str_replace('<br />', "\n", $kb_text); // // Toggle selection // $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; $bbcode_status = ( $bbcode_on ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF']; $links_status = ( $links_on ) ? $lang['Links_are_ON'] : $lang['Links_are_OFF']; $images_status = ( $images_on ) ? $lang['Images_are_ON'] : $lang['Images_are_OFF']; // // Smilies toggle selection // if ( $smilies_on ) { $smilies_status = $lang['Smilies_are_ON']; mx_generate_smilies( 'inline', PAGE_POSTING ); } else { $smilies_status = $lang['Smilies_are_OFF']; } // // set up page // $template->set_filenames( array( 'body' => 'kb_post_body.tpl' ) ); if ( !$userdata['session_logged_in'] ) { $template->assign_block_vars( 'switch_name', array() ); } $kb_action_url = $kb_post_mode == 'add' ? this_kb_mxurl( 'mode=add' ) : this_kb_mxurl( 'mode=edit' ); $custom_data = $kb_post_mode == 'add' ? $mx_kb_custom_field->display_edit() : $mx_kb_custom_field->display_edit( $article_id ); if ( $custom_data ) { $template->assign_block_vars( 'custom_data_fields', array( 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'] )); } $template->assign_vars( array( 'S_ACTION' => $kb_action_url, 'S_HIDDEN_FIELDS' => $s_hidden_vars, 'ARTICLE_TITLE' => $kb_title, 'ARTICLE_DESC' => $kb_desc, 'ARTICLE_BODY' => $kb_text, 'USERNAME' => $username, 'L_ADD_ARTICLE' => $lang['Add_article'], 'L_ARTICLE_TITLE' => $lang['Article_title'], 'L_ARTICLE_DESCRIPTION' => $lang['Article_description'], 'L_ARTICLE_TEXT' => $lang['Article_text'], 'L_ARTICLE_CATEGORY' => $lang['Category'], 'L_ARTICLE_TYPE' => $lang['Article_type'], 'L_SUBMIT' => $lang['Submit'], 'L_PREVIEW' => $lang['Preview'], 'L_SELECT_TYPE' => $lang['Select'], 'L_NAME' => $lang['Username'], 'HTML_STATUS' => $html_status, 'BBCODE_STATUS' => sprintf( $bbcode_status, '<a href="' . append_sid( "faq.$phpEx?mode=bbcode" ) . '" target="_phpbbcode">', '</a>' ), 'SMILIES_STATUS' => $smilies_status, 'LINKS_STATUS' => $links_status, 'IMAGES_STATUS' => $images_status, '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_EMPTY_ARTICLE_NAME' => $lang['Empty_article_name'], 'L_EMPTY_ARTICLE_DESC' => $lang['Empty_article_desc'], 'L_EMPTY_CAT' => $lang['Empty_category'], 'L_EMPTY_TYPE' => $lang['Empty_type'], '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_PAGES' => $lang['L_Pages'], 'L_PAGES_EXPLAIN' => $lang['L_Pages_explain'], 'L_TOC' => $lang['L_Toc'], 'L_TOC_EXPLAIN' => $lang['L_Toc_explain'], 'L_ABSTRACT' => $lang['L_Abstract'], 'L_ABSTRACT_EXPLAIN' => $lang['L_Abstract_explain'], 'L_TITLE_FORMAT' => $lang['L_Title_Format'], 'L_TITLE_FORMAT_EXPLAIN' => $lang['L_Title_Format_explain'], 'L_SUBTITLE_FORMAT' => $lang['L_Subtitle_Format'], 'L_SUBTITLE_FORMAT_EXPLAIN' => $lang['L_Subtitle_Format_explain'], 'L_SUBSUBTITLE_FORMAT' => $lang['L_Subsubtitle_Format'], 'L_SUBSUBTITLE_FORMAT_EXPLAIN' => $lang['L_Subsubtitle_Format_explain'], 'L_OPTIONS' => $lang['L_Options'], 'L_FORMATTING' => $lang['L_Formatting'], 'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'], 'L_STYLES_TIP' => $lang['Styles_tip'] ) ); $this->get_kb_type_list( $type_id ); if ( $kb_post_mode == 'edit' ) { $template->assign_block_vars( 'switch_edit', array( 'CAT_LIST' => $this->generate_jumpbox( 'auth_edit', $category_id, $category_id, true ) )); } // =================================================== // assign var for top navigation // =================================================== $this->generate_navigation( $category_id ); // // User authorisation levels output // $this->auth_can($category_id); // // Get footer quick dropdown jumpbox // $this->generate_jumpbox( 'auth_view', $category_id, $category_id, true ); } } ?> --- NEW FILE: kb_moderator.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_moderator.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } class mx_kb_moderator extends mx_kb_public { function main( $action ) { global $template, $lang, $db, $phpEx, $kb_config, $board_config, $mx_request_vars, $userdata; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx; // // Include admin functions // include( $phpbb_root_path . 'includes/functions_admin.' . $phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } // // Request vars // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); $category_id = $mx_request_vars->request('cat', MX_TYPE_INT, 0); $article_id = $mx_request_vars->request('a', MX_TYPE_INT, 0); $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 0); $ref_stats = $mx_request_vars->is_request('ref'); if ( !( ($this->auth_user[$category_id]['auth_delete'] || $this->auth_user[$category_id]['auth_mod']) && $userdata['session_logged_in'] ) ) { $message = $lang['No_add'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } if ( $mx_request_vars->is_request('action') ) { $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, ''); } else { if ( $approve && $this->auth_user[$category_id]['auth_mod']) { $action = 'approve'; } else if ( $unapprove && $this->auth_user[$category_id]['auth_mod']) { $action = 'unapprove'; } else if ( $delete && ( $this->auth_user[$category_id]['auth_mod'] || $this->auth_user[$category_id]['auth_delete']) ) { $action = 'delete'; } else { $action = ''; } } switch ( $action ) { case 'approve': $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; if ( !( $results = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } $kb_row = $db->sql_fetchrow( $results ); $topic_sql = ''; /* $kb_comment = array(); // Populate the kb_comment variable $kb_comment = $this->kb_get_data($kb_row, $userdata ); // Compose post header $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; $message_temp = $this->kb_compose_comment( $kb_comment ); $kb_message = $message_temp['message']; $kb_update_message = $message_temp['update_message']; if ( $kb_config['use_comments'] ) { if ( !$kb_row['topic_id'] ) { // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); $topic_sql = ", topic_id = " . $topic_data['topic_id']; } } */ $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 1 " . $topic_sql . " WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } /* $this->kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); */ $this->modified( true ); $this->_kb(); $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); break; case 'unapprove': $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 0 WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } $this->modified( true ); $this->_kb(); $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); break; case 'delete': if ( $mx_request_vars->get('c') == "yes" ) { $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain article category", '', __LINE__, __FILE__, $sql ); } $article_info = $db->sql_fetchrow( $result ); if ( $this->comments[$article_info['article_category_id']]['activated'] && !$this->comments[$article_info['article_category_id']]['internal_comments'] && $kb_config['del_topic'] && $article_info['topic_id'] ) { include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); $mx_kb_comments = new mx_kb_comments(); $mx_kb_comments->init( $article_info, 'phpbb' ); $mx_kb_comments->post('delete', $article_info['topic_id']); } $sql = "DELETE FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not delete article data", '', __LINE__, __FILE__, $sql ); } $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; $this->modified( true ); $this->_kb(); mx_message_die( GENERAL_MESSAGE, $message ); } else { $category_id = ( $ref_stats ? 1 : $category_id ); $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( this_kb_mxurl( "mode=moderate&action=delete&page=$page_id&cat=$category_id&c=yes&a=$article_id&start=$start" ) ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx?page=$page_id&mode=cat&cat=$category_id&start=$start" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } break; } // =================================================== // assign var for top navigation // =================================================== $this->generate_navigation( $category_id ); // // User authorisation levels output // $this->auth_can($category_id); // // Get footer quick dropdown jumpbox // $this->generate_jumpbox( 'auth_view', $category_id, $category_id, true ); } } ?> --- NEW FILE: kb_main.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_main.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ class mx_kb_main extends mx_kb_public { function main( $action ) { global $template, $lang, $db, $board_config, $phpEx, $kb_config, $debug; $page_title = $category_name; $template->set_filenames( array( 'body' => 'kb_index_body.tpl' )); $template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], 'L_ARTICLES' => $lang['Articles'] ) ); // =================================================== // Show the Category for the download database index // =================================================== $this->display_categories(); // // Get footer quick dropdown jumpbox // $this->generate_jumpbox( 'auth_view', 0, 0, true ); } } ?> --- NEW FILE: kb_search.php --- (This appears to be a binary file; contents omitted.) --- NEW FILE: kb_rate.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_rate.php,v 1.1 2005/12/08 15:06:47 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } class mx_kb_rate extends mx_kb_public { function main( $action ) { global $template, $lang, $db, $phpEx, $kb_config, $mx_request_vars, $userdata; global $mx_root_path, $module_root_path, $is_block, $phpEx; // // Request vars // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); $article_id = $mx_request_vars->request('k', MX_TYPE_INT, 0); $rating = $mx_request_vars->request('rating', MX_TYPE_INT, 0); $rate = $mx_request_vars->request('rate', MX_TYPE_NO_TAGS, ''); if ( empty( $article_id ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); } $template->set_filenames( array( 'body' => 'kb_rate_body.tpl' ) ); $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = '" . $article_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Query Article info', '', __LINE__, __FILE__, $sql ); } if ( !$article = $db->sql_fetchrow( $result ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); } $db->sql_freeresult( $result ); $category_id = $article['article_category_id']; if ( !$this->auth_user[$category_id]['auth_rate'] || !$kb_config['use_ratings'] ) { // // The user is not authed to read this cat ... // $message = $lang['Not_authorized']; mx_message_die(GENERAL_MESSAGE, $message); } $ipaddy = getenv ( "REMOTE_ADDR" ); if ( $kb_config['votes_check_ip'] == 1 ) { $sql = "SELECT * FROM " . KB_VOTES_TABLE . " WHERE votes_ip = '" . $ipaddy . "' AND votes_file = '" . $article_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Query rate ip', '', __LINE__, __FILE__, $sql ); } if ( $db->sql_numrows( $result ) > 0 ) { $template->assign_vars( array( "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_kb_mxurl( "action=url&k=" . $article_id ) ) . '">' ) ); $message = $lang['Rerror'] . "<br /><br />" . sprintf( $lang['Click_return_rate'], "<a href=\"" . append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } } if ( $kb_config['votes_check_userid'] == 1 ) { $sql = "SELECT * FROM " . KB_VOTES_TABLE . " WHERE votes_userid = '" . $userdata['user_id'] . "' AND votes_file = '" . $article_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Query rate ip', '', __LINE__, __FILE__, $sql ); } if ( $db->sql_numrows( $result ) > 0 ) { $template->assign_vars( array( "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_kb_mxurl( "action=url&k=" . $article_id ) ) . '">' ) ); $message = $lang['Rerror'] . "<br /><br />" . sprintf( $lang['Click_return_rate'], "<a href=\"" . append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } } if ( $rate == 'dorate' ) { $conf = str_replace( "{filename}", $article['article_title'], $lang['Rconf'] ); $conf = str_replace( "{rate}", $rating, $conf ); if ( $article['article_totalvotes'] == 1 ) { $add = 0; } else { $add = 1; } $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET article_rating=article_rating+" . $rating . ", article_totalvotes=article_totalvotes+1 WHERE article_id = '" . $article_id . "'"; if ( !( $update = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Update rating table', '', __LINE__, __FILE__, $sql ); } $ipaddy = getenv ( "REMOTE_ADDR" ); $sql = "INSERT INTO " . KB_VOTES_TABLE . " VALUES('" . $ipaddy . "', '" . $userdata['user_id'] . "', '" . $article_id . "')"; if ( !( $insert = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Update rating table', '', __LINE__, __FILE__, $sql ); } $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = '" . $article_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Update rating table', '', __LINE__, __FILE__, $sql ); } $article = $db->sql_fetchrow( $result ); if ( $article['article_rating'] == 0 or $article['article_totalvotes'] == 0 ) { $nrating = 0; } else { $nrating = round( $article['article_rating'] / ( $article['article_totalvotes'] ), 3 ); } $conf = str_replace( "{newrating}", $nrating, $conf ); $template->assign_vars( array( "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid( this_kb_mxurl( "action=url&k=" . $article_id ) ) . '">' ) ); if ( !$reader_mode ) { $message = $conf . "<br /><br />" . sprintf( $lang['Click_return_rate'], "<a href=\"" . append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_forum'], "<a href=\"" . append_sid( "index.$phpEx?page=$page_id&mode=cat&cat=$category_id" ) . "\">", "</a>" ); } else { $message = $conf . "<br /><br />" . sprintf( $lang['Click_return_rate'], "<a href=\"" . append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ) . "\">", "</a>" ); } mx_message_die( GENERAL_MESSAGE, $message ); } else { $rateinfo = str_replace( "{filename}", $article['article_title'], $lang['Rateinfo'] ); $template->assign_block_vars( "rate", array() ); // // Send variables to template (the associated *.tpl file) // /* $template->assign_vars( array( 'PATH' => $path_kb )); */ $template->assign_vars( array( 'S_RATE_ACTION' => append_sid( this_kb_mxurl( ) ), 'L_RATE' => $lang['Rate'], 'L_RERROR' => $lang['Rerror'], 'L_R1' => $lang['R1'], 'L_R2' => $lang['R2'], 'L_R3' => $lang['R3'], 'L_R4' => $lang['R4'], 'L_R5' => $lang['R5'], 'L_R6' => $lang['R6'], 'L_R7' => $lang['R7'], 'L_R8' => $lang['R8'], 'L_R9' => $lang['R9'], 'L_R10' => $lang['R10'], 'RATEINFO' => $rateinfo, 'ID' => $article_id ) ); } // =================================================== // assign var for top navigation // =================================================== $this->generate_navigation( $category_id ); // // User authorisation levels output // $this->auth_can($category_id); // // Get footer quick dropdown jumpbox // $this->generate_jumpbox( 'auth_view', $category_id, $category_id, true ); } } ?> --- NEW FILE: kb_cat.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_cat.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } class mx_kb_cat extends mx_kb_public { function main( $action ) { global $template, $lang, $db, $phpEx, $kb_config, $mx_request_vars, $userdata; global $mx_root_path, $module_root_path, $is_block, $phpEx; // // Request vars // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); $category_id = $mx_request_vars->request('cat', MX_TYPE_INT, ''); if ( empty( $category_id ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Category_not_exsist'] ); } // ======================================================= // If user not allowed to view article listing (read) and there is no sub Category // or the user is not allowed to view these category we gave him a nice message. // ======================================================= $show_category = false; if ( isset( $this->subcat_rowset[$category_id] ) ) { foreach( $this->subcat_rowset[$category_id] as $sub_cat_id => $sub_cat_row ) { if ( $this->auth_user[$sub_cat_id]['auth_view'] ) { $show_category = true; break; } } } if ( ( !$this->auth_user[$category_id]['auth_mod'] ) && ( !$show_category ) ) { if ( !$userdata['session_logged_in'] ) { // mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=". pa_this_mxurl("action=category&cat_id=" . $cat_id, true), true)); } $message = $lang['Not_authorized']; mx_message_die( GENERAL_MESSAGE, $message ); } if ( !isset( $this->cat_rowset[$category_id] ) ) { $message = $lang['Category_not_exsist'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } // // Validate Comments Setup // if ( $this->comments[$category_id]['activated'] && !$this->comments[$category_id]['internal_comments'] && $this->cat_rowset[$category_id]['comments_forum_id'] < 1 ) { // // Commenting is enabled but no category forum id specified // $message = $lang['No_cat_comments_forum_id']; mx_message_die(GENERAL_MESSAGE, $message); } // // Vars // $category_name = $this->cat_rowset['category_name']; $this->page_title = $category_name; $template->set_filenames( array( 'body' => 'kb_cat_body.tpl' ) ); // // Pagination // $sql_pag = "SELECT count(article_id) AS total FROM " . KB_ARTICLES_TABLE . " WHERE "; $sql_pag .= " article_category_id = '$category_id'"; if ( !( $result = $db->sql_query( $sql_pag ) ) ) { mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); } if ( $total = $db->sql_fetchrow( $result ) ) { $total_articles = $total['total']; $pagination = generate_pagination( this_kb_mxurl( "mode=cat&cat=$category_id" ), $total_articles, $kb_config['pagination'], $start ) . ' '; } if ( $total_articles > 0 ) { $template->assign_block_vars( 'pagination', array() ); } $template->assign_vars( array( 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['pagination'] ) + 1 ), ceil( $total_articles / $kb_config['pagination'] ) ), 'L_GOTO_PAGE' => $lang['Goto_page'], 'L_CATEGORY_NAME' => $category_name, 'L_ARTICLE' => $lang['Article'], 'L_ARTICLE_TYPE' => $lang['Article_type'], 'L_ARTICLE_CATEGORY' => $lang['Category'], 'L_ARTICLE_DATE' => $lang['Date'], 'L_ARTICLE_AUTHOR' => $lang['Author'], 'L_VIEWS' => $lang['Views'], 'L_VOTES' => $lang['Votes'], 'L_CATEGORY' => $lang['Category_sub'], 'L_ARTICLES' => $lang['Articles'], 'U_CAT' => append_sid( this_kb_mxurl( 'mode=cat&cat=' . $category_id ) ) ) ); // =================================================== // assign var for top navigation // =================================================== $this->generate_navigation( $category_id ); // // User authorisation levels output // $this->auth_can($category_id); // // get sub-cats // if ( isset( $this->subcat_rowset[$category_id] ) ) { $this->display_categories( $category_id ); } // // Get articles // $this->display_articles( $category_id, '1', 'articlerow', $start, $kb_config['pagination'] ); // // Get footer quick dropdown jumpbox // $this->generate_jumpbox( 'auth_view', $category_id, $category_id, true ); } } ?> --- NEW FILE: kb_article.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_article.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } class mx_kb_article extends mx_kb_public { function main( $action ) { global $template, $lang, $db, $phpEx, $kb_config, $mx_request_vars, $userdata; global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx, $images; global $mx_kb_custom_field, $print_version, $reader_mode; // // Request vars // $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); $article_id = $mx_request_vars->request('k', MX_TYPE_INT, ''); $page_num = $mx_request_vars->request('page_num', MX_TYPE_INT, 1) - 1; if ( empty( $article_id ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); } // // Instatiate text tools // $mx_kb_text_tools = new mx_kb_text_tools(); $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = $article_id"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } // =================================================== // article doesn't exist' // =================================================== if ( !$kb_row = $db->sql_fetchrow( $result ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); } $db->sql_freeresult( $result ); // =================================================== // KB auth for viewing article // =================================================== if ( ( !$this->auth_user[$kb_row['article_category_id']]['auth_view'] ) ) { /* if ( !$userdata['session_logged_in'] ) { mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".pa_this_mxurl("action=file&file_id=" . $file_id), true)); } */ $message = $lang['Article_not_exsist'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $phpbb_root_path . "index.$phpEx" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } // =================================================== // Prepare article info to display them // =================================================== $article_title = $kb_row['article_title']; $article_description = $kb_row['article_description']; $article_category_id = $kb_row['article_category_id']; $article_category_name = $this->cat_rowset[$article_category_id]['category_name']; $author_id = $kb_row['article_author_id']; $approved = $kb_row['approved']; $date = create_date( $board_config['default_dateformat'], $kb_row['article_date'], $board_config['board_timezone'] ); // // wysiwyg // if ( $kb_config['allow_wysiwyg'] && file_exists( $mx_root_path . 'modules/tinymce/jscripts/tiny_mce/blank.htm' )) { $bbcode_on = false; $html_on = true; $smilies_on = false; $html_entities_match = array( ); $html_entities_replace = array( ); } else { $bbcode_on = $kb_config['allow_bbcode'] ? true : false; $html_on = $kb_config['allow_html'] ? true : false; $smilies_on = $kb_config['allow_smilies'] ? true : false; $board_config['allow_html_tags'] = $kb_config['allowed_html_tags']; } // // Define censored word matches // $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); // // Get vars // $temp_url = append_sid( this_kb_mxurl( "mode=cat&cat=$article_category_id" ) ); $category = '<a href="' . $temp_url . '" class="gensmall">' . $article_category_name . '</a>'; if ( $author_id == -1 ) { $author_kb_art = ( $kb_row['username'] == '' ) ? $lang['Guest'] : $kb_row['username']; } else { $author_name = $this->get_kb_author( $author_id ); $temp_url = append_sid( $phpbb_root_path . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$author_id" ); $author_kb_art = '<a href="' . $temp_url . '" class="gensmall">' . $author_name . '</a>'; } $art_pages = explode( '[page]', stripslashes( $kb_row['article_body'] ) ); $article = trim( $art_pages[$page_num] ); $article = str_replace( '[toc]', '', $article ); $article = $this->article_formatting( $article ); $type_id = $kb_row['article_type']; $type = $this->get_kb_type( $type_id ); $new_views = $kb_row['views'] + 1; $views = '<b>' . $lang['Views'] . '</b> ' . $new_views; if ( $kb_row['article_rating'] == 0 || $kb_row['article_totalvotes'] == 0 ) { $rating = 0; $rating_votes = 0; $rating_message = $lang['No_votes'] ; $rate_message = '<b>' . $lang['Votes_label'] . '</b> ' . $rating_message; } else { $rating = round( $kb_row['article_rating'] / $kb_row['article_totalvotes'], 2 ); $rating_votes = $kb_row['article_totalvotes']; $rating_message = $rating . '/10, ' . $rating_votes . ' ' . $lang['Votes'] ; $rate_message = '<b>' . $lang['Votes_label'] . '</b> ' . $rating_message; } if ( $page_num == 0 ) { $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET views = '" . $new_views . "' WHERE article_id = " . $article_id; } if ( !( $result2 = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article's views", '', __LINE__, __FILE__, $sql ); } // // Was a highlight request part of the URI? // $original_highlight = ''; $highlight_match = $highlight = ''; if (isset($HTTP_GET_VARS['highlight'])) { // // Split words and phrases // $original_highlight = '&highlight='.trim(htmlspecialchars($HTTP_GET_VARS['highlight'])); $words = explode(' ', trim(htmlspecialchars($HTTP_GET_VARS['highlight']))); for($i = 0; $i < sizeof($words); $i++) { if (trim($words[$i]) != '') { $highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*', phpbb_preg_quote($words[$i], '#')); } } unset($words); $highlight = urlencode($HTTP_GET_VARS['highlight']); $highlight_match = phpbb_rtrim($highlight_match, "\\"); } if ( !$html_on ) { $article = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $article ); } // // Remove Images and/or links // if (!$kb_config['allow_images'] || !$kb_config['allow_inks']) { $article = $mx_kb_text_tools->remove_images_links( $article, $kb_config['allow_images'], $kb_config['no_image_message'], $kb_config['allow_links'], $kb_config['no_link_message'] ); } // // Parse message // $bbcode_uid = $kb_row['bbcode_uid']; if ( $bbcode_on ) { if ( $bbcode_uid != '' ) { $article = ( $bbcode_on ) ? bbencode_second_pass( $article, $bbcode_uid ) : preg_replace( '/\:[0-9a-z\:]+\]/si', ']', $article ); } } $article = make_clickable( $article ); // // Parse smilies // if ( $smilies_on ) { $article = mx_smilies_pass( $article ); } // // Highlight active words (primarily for search) // if ($highlight_match) { // // This was shamelessly 'borrowed' from volker at multiartstudio dot de // via php.net's annotated manual // $article = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . $highlight_match . ")\b#i', '<span ... [truncated message content] |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:06:55
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4009/modules/mx_kb/kb/includes Added Files: functions.php functions_auth.php functions_cache.php functions_comment.php functions_field.php functions_kb.php functions_mx.php kb_constants.php kb_defs.php kb_pages.php Log Message: in progress commit for mx_kb --- NEW FILE: functions.php --- (This appears to be a binary file; contents omitted.) --- NEW FILE: kb_constants.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_constants.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( !MXBB_MODULE ) { $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); $script_name = ($script_name == '') ? $script_name : '/' . $script_name; define( 'PORTAL_URL', $server_protocol . $server_name . $server_port . $script_name . '/' ); define( 'PHPBB_URL', PORTAL_URL ); $reader_mode = false; $kb_config['news_operate_mode'] = false; $mx_table_prefix = $table_prefix; $is_block = false; } // ---------------------------------------------------------------------START // This file defines specific constants for the module // ------------------------------------------------------------------------- define( 'PAGE_KB', -501 ); define( 'KB_ARTICLES_TABLE', $mx_table_prefix . 'kb_articles' ); define( 'KB_CATEGORIES_TABLE', $mx_table_prefix . 'kb_categories' ); define( 'KB_CONFIG_TABLE', $mx_table_prefix . 'kb_config' ); define( 'KB_TYPES_TABLE', $mx_table_prefix . 'kb_types' ); define( 'KB_WORD_TABLE', $mx_table_prefix . 'kb_wordlist' ); define( 'KB_SEARCH_TABLE', $mx_table_prefix . 'kb_results' ); define( 'KB_MATCH_TABLE', $mx_table_prefix . 'kb_wordmatch' ); define( 'KB_VOTES_TABLE', $mx_table_prefix . 'kb_votes' ); define( 'KB_COMMENTS_TABLE', $mx_table_prefix . 'kb_comments' ); define( 'KB_CUSTOM_TABLE', $mx_table_prefix . 'kb_custom' ); define( 'KB_CUSTOM_DATA_TABLE', $mx_table_prefix . 'kb_customdata' ); // Field Types define( 'INPUT', 0 ); define( 'TEXTAREA', 1 ); define( 'RADIO', 2 ); define( 'SELECT', 3 ); define( 'SELECT_MULTIPLE', 4 ); define( 'CHECKBOX', 5 ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); $link_language = 'lang_english'; } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); $link_language = 'lang_' . $board_config['default_lang']; } // ********************************************************************** // Read theme definition // ********************************************************************** if ( file_exists( $module_root_path . "templates/" . $theme['template_name'] . "/images" ) ) { // ---------- $current_template_images = $module_root_path . "templates/" . $theme['template_name'] . "/images" ; // ---------- } else { // ---------- $current_template_images = $module_root_path . "templates/" . "subSilver" . "/images" ; // ---------- } // ********************************************************************** // Read image language in theme definition // ********************************************************************** $link_language = file_exists( "$current_template_images/$link_language/kb.gif" ) ? $link_language : 'lang_english'; $images['icon_approve'] = "$current_template_images/icon_approve.gif"; $images['icon_unapprove'] = "$current_template_images/icon_unapprove.gif"; $images['kb_title'] = "$current_template_images/$link_language/kb.gif"; $images['kb_search'] = "$current_template_images/" . $link_language . "/icon_kb_search.gif"; $images['kb_stats'] = "$current_template_images/" . $link_language . "/icon_kb_stats.gif"; $images['kb_toplist'] = "$current_template_images/" . $link_language . "/icon_kb_toplist.gif"; $images['kb_upload'] = "$current_template_images/" . $link_language . "/icon_kb_post.gif"; $images['kb_rate'] = "$current_template_images/" . $link_language . "/icon_kb_rate.gif"; $images['kb_comment_post'] = "$current_template_images/" . $link_language . "/icon_kb_post_comment.gif"; if ( !MXBB_MODULE || MXBB_27x ) { $kb_module_version = "Knowledge Base MOD v. 2.0.x"; $kb_module_author = "Haplo/Jon"; $kb_module_orig_author = "wGEric"; } else { $mxbb_footer_addup[] = 'mxBB Knowledge Base Module'; } ?> --- NEW FILE: functions_cache.php --- (This appears to be a binary file; contents omitted.) --- NEW FILE: functions_mx.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: functions_mx.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( !function_exists( mx_smilies_pass ) ) { function mx_smilies_pass($message) { global $board_config; $smilies_path = $board_config['smilies_path']; $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; $message = smilies_pass($message); $board_config['smilies_path'] = $smilies_path; return $message; } } if ( !function_exists( mx_generate_smilies ) ) { function mx_generate_smilies($mode, $page_id) { global $board_config, $template, $phpEx; $smilies_path = $board_config['smilies_path']; $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; generate_smilies($mode, $page_id); $board_config['smilies_path'] = $smilies_path; $template->assign_vars(array( 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ); } } if ( !function_exists( mx_message_die ) ) { function mx_message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') { global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; global $userdata, $user_ip, $session_length; global $starttime; message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); } } if ( !function_exists( mx_is_group_member ) ) { // Validates if user belongs to group included in group_ids list // Also, adds all usergroups to userdata array function mx_is_group_member( $group_ids = '', $group_mod_mode = false ) { global $userdata, $db; if ( $group_ids == '' ) { return false; } $group_ids_array = explode(",", $group_ids); // Try to reuse usergroups result. if ( $group_mod_mode ) { $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; if ( empty( $userdata[$userdata_key] ) ) { // Check if user is group moderator.. $sql = "SELECT gr.group_id FROM " . GROUPS_TABLE . " gr, " . USER_GROUP_TABLE . " ugr WHERE gr.group_id = ugr.group_id AND gr.group_moderator = '" . $userdata['user_id'] . "' AND ugr.user_pending = '0' "; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); } $group_row = $db->sql_fetchrowset( $result ); $userdata[$userdata_key_mod] = $group_row; } } else { $userdata_key = 'mx_usergroups' . $userdata['user_id']; if ( empty( $userdata[$userdata_key] ) ) { // Check if user is member of the proper group.. $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); } $group_row = $db->sql_fetchrowset( $result ); $userdata[$userdata_key] = $group_row; } } for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) { if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) { $is_member = true; return $is_member; } } return false; } } if ( !function_exists( mx_add_search_words ) ) { // Add search words for blocks function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') { global $db, $phpbb_root_path, $board_config, $lang; // $search_match_table = SEARCH_MATCH_TABLE; // $search_word_table = SEARCH_WORD_TABLE; switch ( $mx_mode ) { case 'mx': $search_match_table = MX_MATCH_TABLE; $search_word_table = MX_WORD_TABLE; $db_key = 'block_id'; break; case 'kb': $search_match_table = KB_MATCH_TABLE; $search_word_table = KB_WORD_TABLE; $db_key = 'article_id'; break; } $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); $search_raw_words = array(); $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); @set_time_limit(0); $word = array(); $word_insert_sql = array(); while ( list($word_in, $search_matches) = @each($search_raw_words) ) { $word_insert_sql[$word_in] = ''; if ( !empty($search_matches) ) { for ($i = 0; $i < count($search_matches); $i++) { $search_matches[$i] = trim($search_matches[$i]); if( $search_matches[$i] != '' ) { $word[] = $search_matches[$i]; if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") ) { $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; } } } } } if ( count($word) ) { sort($word); $prev_word = ''; $word_text_sql = ''; $temp_word = array(); for($i = 0; $i < count($word); $i++) { if ( $word[$i] != $prev_word ) { $temp_word[] = $word[$i]; $word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'"; } $prev_word = $word[$i]; } $word = $temp_word; $check_words = array(); switch( SQL_LAYER ) { case 'postgresql': case 'msaccess': case 'mssql-odbc': case 'oracle': case 'db2': $sql = "SELECT word_id, word_text FROM " . $search_word_table . " WHERE word_text IN ($word_text_sql)"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) { $check_words[$row['word_text']] = $row['word_id']; } break; } $value_sql = ''; $match_word = array(); for ($i = 0; $i < count($word); $i++) { $new_match = true; if ( isset($check_words[$word[$i]]) ) { $new_match = false; } if ( $new_match ) { switch( SQL_LAYER ) { case 'mysql': case 'mysql4': $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)'; break; case 'mssql': case 'mssql-odbc': $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0"; break; default: $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) VALUES ('" . $word[$i] . "', 0)"; if( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } break; } } } if ( $value_sql != '' ) { switch ( SQL_LAYER ) { case 'mysql': case 'mysql4': $sql = "INSERT IGNORE INTO " . $search_word_table . " (word_text, word_common) VALUES $value_sql"; break; case 'mssql': case 'mssql-odbc': $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) $value_sql"; break; } if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } } } while( list($word_in, $match_sql) = @each($word_insert_sql) ) { $title_match = ( $word_in == 'title' ) ? 1 : 0; if ( $match_sql != '' ) { $sql = "INSERT INTO " . $search_match_table . " ($db_key, word_id, title_match) SELECT $post_id, word_id, $title_match FROM " . $search_word_table . " WHERE word_text IN ($match_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); } } } if ($mode == 'single') { // remove_common('single', 4/10, $word); } return; } function mx_remove_search_post($post_id_sql, $mx_mode = 'mx') { global $db; // $search_match_table = SEARCH_MATCH_TABLE; // $search_word_table = SEARCH_WORD_TABLE; switch ( $mx_mode ) { case 'mx': $search_match_table = MX_MATCH_TABLE; $search_word_table = MX_WORD_TABLE; $db_key = 'block_id'; break; case 'kb': $search_match_table = KB_MATCH_TABLE; $search_word_table = KB_WORD_TABLE; $db_key = 'article_id'; break; } $words_removed = false; switch ( SQL_LAYER ) { case 'mysql': case 'mysql4': $sql = "SELECT word_id FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql) GROUP BY word_id"; if ( $result = $db->sql_query($sql) ) { $word_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; } $sql = "SELECT word_id FROM " . $search_match_table . " WHERE word_id IN ($word_id_sql) GROUP BY word_id HAVING COUNT(word_id) = 1"; if ( $result = $db->sql_query($sql) ) { $word_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; } if ( $word_id_sql != '' ) { $sql = "DELETE FROM " . $search_word_table . " WHERE word_id IN ($word_id_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); } $words_removed = $db->sql_affectedrows(); } } } break; default: $sql = "DELETE FROM " . $search_word_table . " WHERE word_id IN ( SELECT word_id FROM " . $search_match_table . " WHERE word_id IN ( SELECT word_id FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql) GROUP BY word_id ) GROUP BY word_id HAVING COUNT(word_id) = 1 )"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); } $words_removed = $db->sql_affectedrows(); break; } $sql = "DELETE FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } return $words_removed; } } if ( !function_exists(mx_do_install_upgrade) ) { // Generating output function mx_do_install_upgrade( $sql = '', $main_install = false ) { global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; $inst_error = false; $n = 0; $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; while ( $sql[$n] ) { if ( !$result = $db->sql_query( $sql[$n] ) ) { $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; $inst_error = true; } else { $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; } $n++; } $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; if ( $main_install ) { if ( !$inst_error ) { $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; } else { $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; } } return $message; } } ?> --- NEW FILE: functions_comment.php --- (This appears to be a binary file; contents omitted.) --- NEW FILE: functions_auth.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: functions_auth.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( 'Hacking attempt' ); } class mx_kb_auth { var $auth_user = array(); function auth( $type, $cat_id, $userdata, $f_access = '', $f_access_group = '' ) { global $db, $lang; switch ( $type ) { case AUTH_ALL: $a_sql = 'a.auth_view, a.auth_post, a.auth_rate, a.auth_comment, a.auth_edit, a.auth_delete, a.auth_approval, a.auth_approval_edit'; $a_sql_groups = 'a.auth_view_groups, a.auth_post_groups, a.auth_rate_groups, a.auth_comment_groups, a.auth_edit_groups, a.auth_delete_groups, a.auth_approval_groups, a.auth_approval_edit_groups'; $auth_fields = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); $auth_fields_groups = array( 'auth_view_groups', 'auth_post_groups', 'auth_rate_groups', 'auth_comment_groups', 'auth_edit_groups', 'auth_delete_groups', 'auth_approval_groups', 'auth_approval_edit_groups' ); break; case AUTH_VIEW: $a_sql = 'a.auth_view'; $a_sql_groups = 'a.auth_view_groups'; $auth_fields = array( 'auth_view' ); $auth_fields_groups = array( 'auth_view_groups' ); break; case AUTH_POST: $a_sql = 'a.auth_post'; $a_sql_groups = 'a.auth_post_groups'; $auth_fields = array( 'auth_post' ); $auth_fields_groups = array( 'auth_post_groups' ); break; case AUTH_RATE: $a_sql = 'a.auth_rate'; $a_sql_groups = 'a.auth_rate_groups'; $auth_fields = array( 'auth_rate' ); $auth_fields_groups = array( 'auth_rate_groups' ); break; case AUTH_COMMENT: $a_sql = 'a.auth_comment'; $a_sql_groups = 'a.auth_comment_groups'; $auth_fields = array( 'auth_comment' ); $auth_fields_groups = array( 'auth_comment_groups' ); break; case AUTH_EDIT: $a_sql = 'a.auth_edit'; $a_sql_groups = 'a.auth_edit_groups'; $auth_fields = array( 'auth_edit' ); $auth_fields_groups = array( 'auth_edit_groups' ); break; case AUTH_DELETE: $a_sql = 'a.auth_delete'; $a_sql_groups = 'a.auth_delete_groups'; $auth_fields = array( 'auth_delete' ); $auth_fields_groups = array( 'auth_delete_groups' ); break; case AUTH_APPROVAL: $a_sql = 'a.auth_approval'; $a_sql_groups = 'a.auth_approval_groups'; $auth_fields = array( 'auth_approval' ); $auth_fields_groups = array( 'auth_approval_groups' ); break; case AUTH_APPROVAL_EDIT: $a_sql = 'a.auth_approval_edit'; $a_sql_groups = 'a.auth_approval_edit_groups'; $auth_fields = array( 'auth_approval_edit' ); $auth_fields_groups = array( 'auth_approval_edit_groups' ); break; default: break; } $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0; // // If f_access has not been passed, or auth is needed to return an array of forums // then we need to pull the auth information on the given forum (or all forums) // if ( empty($f_access) ) { $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; $sql = "SELECT a.category_id, $a_sql FROM " . KB_CATEGORIES_TABLE . " a $forum_match_sql"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); } $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; if ( !($f_access = $db->$sql_fetchrow($result)) ) { $db->sql_freeresult($result); return array(); } $db->sql_freeresult($result); } // // If f_access_group has not been passed, or auth is needed to return an array of forums // then we need to pull the auth information on the given forum (or all forums) // if ( empty($f_access_group) ) { $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; $sql = "SELECT a.category_id, $a_sql_groups, a.auth_moderator_groups FROM " . KB_CATEGORIES_TABLE . " a $forum_match_sql"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); } $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; if ( !($f_access_group = $db->$sql_fetchrow($result)) ) { $db->sql_freeresult($result); return array(); } $db->sql_freeresult($result); } $auth_user = array(); for( $i = 0; $i < count( $auth_fields ); $i++ ) { $key = $auth_fields[$i]; $key_groups = $auth_fields_groups[$i]; // If the user is logged on and the module type is either ALL or REG then the user has access // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions // to do whatever it is they want to do ... to do this we pull relevant information for the // user (and any groups they belong to) // Now we compare the users access level against the modules. We assume here that a moderator // and admin automatically have access to an ACL module, similarly we assume admins meet an // auth requirement of MOD if ( $cat_id != AUTH_LIST_ALL ) { $value = $f_access[$key]; $value_groups = $f_access_group[$key_groups]; switch ( $value ) { case AUTH_ALL: $this->auth_user[$key] = true; $this->auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_REG: $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? true : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Registered_Users']; break; case AUTH_ANONYMOUS: $this->auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_ACL: // PRIVATE $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; case AUTH_ADMIN: $this->auth_user[$key] = $is_admin; $this->auth_user[$key . '_type'] = $lang['Auth_Administrators']; break; default: $this->auth_user[$key] = 0; break; } } else { for($k = 0; $k < count($f_access); $k++) { $value = $f_access[$k][$key]; $value_groups = $f_access_group[$k][$key_groups]; $f_cat_id = $f_access[$k]['category_id']; switch ( $value ) { case AUTH_ALL: $this->auth_user[$f_cat_id][$key] = true; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_REG: $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? true : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Registered_Users']; break; case AUTH_ANONYMOUS: $this->auth_user[$f_cat_id][$key] = ( ! $userdata['session_logged_in'] ) ? true : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_ACL: // PRIVATE $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Moderators']; break; case AUTH_ADMIN: $this->auth_user[$f_cat_id][$key] = $is_admin; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Administrators']; break; default: $this->auth_user[$f_cat_id][$key] = 0; break; } } } } // // Is user a moderator? // if ( $cat_id != AUTH_LIST_ALL ) { $this->auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; } else { for($k = 0; $k < count($f_access); $k++) { $f_cat_id = $f_access[$k]['category_id']; $this->auth_user[$f_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; } } return $this->auth_user; } // =================================================== // // =================================================== function ns_auth_cat( $cat_id ) { global $kb_type_select_data, $kb_config; if ( !MXBB_MODULE || MXBB_27x ) { return true; } $tmp_kb = $kb_type_select_data[$cat_id] == 1; return $tmp_kb; } } ?> --- NEW FILE: kb_defs.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_defs.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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( 'NEWS_CAT_TABLE', $mx_table_prefix . 'kb_categories' ); define( 'KB_ARTICLES_TABLE', $mx_table_prefix . 'kb_articles' ); define( 'KB_CATEGORIES_TABLE', $mx_table_prefix . 'kb_categories' ); define( 'KB_TYPES_TABLE', $mx_table_prefix . 'kb_types' ); $sql = "SELECT * FROM " . KB_TYPES_TABLE; if ( !( $type_result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain types information", '', __LINE__, __FILE__, $sql ); } $item_types_array = array(); $item_types_id_array = array(); $item_types_name_array = array(); while ( $type = $db->sql_fetchrow( $type_result ) ) { $item_types_array[] = 'type_' . $type['id']; $item_types_id_array[] = $type['id']; $item_types_name_array[] = $type['type']; } $cat_extract_order = 'parent, cat_order'; $cool_array_category_id = 'category_id'; $cat_table_category_id = 'f.category_id'; $item_table_category_id = 't.article_category_id'; $item_table_item_id = 't.article_id'; $item_table_item_type = 't.article_type'; $item_table_item_time = 't.article_date'; $item_table_item_last_time = 'tt.topic_last_post_id'; $item_table_item_title = 't.article_title'; $item_id = 'article_id'; $item_type = 'article_type'; $item_cat_id = 'article_category_id'; $item_text = 'article_body'; $item_bbcode_uid = 'bbcode_uid'; $item_time = 'article_date'; $item_views = 'views'; $item_title = 'article_title'; $catt_id = 'category_id'; $catt_name = 'category_name'; $catt_desc = 'category_details'; $item_types_all = 'forum_news'; ?> --- NEW FILE: kb_pages.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: kb_pages.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( MXBB_27x ) { $page_id = get_page_id( 'kb_article_reader.php', true ); if ( !$page_id ) { $page_id = get_page_id( 'kb.php', true ); } if ( !empty( $page_id ) ) { $kb_pages = $page_id; $kb_error = false; } else { $kb_error = true; } // Start initial var setup $cat_id = $article_id = ''; if ( isset( $HTTP_GET_VARS['cat'] ) || isset( $HTTP_POST_VARS['cat'] ) ) { $cat_id = ( isset( $HTTP_GET_VARS['cat'] ) ) ? intval( $HTTP_GET_VARS['cat'] ) : intval( $HTTP_POST_VARS['cat'] ); } else if ( isset( $HTTP_GET_VARS['k'] ) || isset( $HTTP_POST_VARS['k'] ) ) { $article_id = ( isset( $HTTP_GET_VARS['k'] ) ) ? intval( $HTTP_GET_VARS['k'] ) : intval( $HTTP_POST_VARS['k'] ); } } else { // Note: This piece of code snippet is somewhat ugly and needs cleaning up...still it works... // What it does? // Well if given a direct kb article link, it finds on what portal page the kb block is located. // Since we can have different kb blocks on different portal pages displaying different kb categories/articles, this check is needed ;) // Oh, do not blame markus for this code ;) if ( empty( $_SESSION['kb_setup'] ) ) { $news_setup = array(); $sql = "SELECT col.page_id, blk.block_id, sys.parameter_value, fnc.function_file FROM " . COLUMN_BLOCK_TABLE . " bct, " . COLUMN_TABLE . " col, " . BLOCK_TABLE . " blk, " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, " . FUNCTION_TABLE . " fnc, " . PARAMETER_TABLE . " par WHERE col.column_id = bct.column_id AND blk.function_id = fnc.function_id AND par.function_id = fnc.function_id AND blk.block_id = bct.block_id AND blk.block_id = sys.block_id AND par.parameter_name = 'kb_type_select' ORDER BY page_id, block_id"; if ( !$kb_result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query modules information", "", __LINE__, __FILE__, $sql ); } while ( $kb_rows = $db->sql_fetchrow( $kb_result ) ) { $page_id = $kb_rows['page_id']; $block_id = $kb_rows['block_id']; $kb_select_par = $kb_rows['parameter_value']; // Extract 'what posts to view info', the cool Array ;) $kb_type_select_data = ( !empty( $kb_select_par ) ) ? unserialize($kb_select_par) : array(); $kb_config['news_mode_operate'] = true; if ( is_array($kb_type_select_data) ) { $news_setup[$page_id] = $kb_type_select_data; $news_mode[$page_id] = $kb_rows['function_file']; } } $page_to_kb = array(); while ( list( $page_idd, $news_setup_roww ) = each( $news_setup ) ) { while ( list( $cat_idd, $news_forum_roww ) = each( $news_setup_roww ) ) { if ( $news_forum_roww['forum_news'] == 1 ) { $page_to_kb[$cat_idd] = ( empty( $page_to_kb[$cat_idd] ) || $news_mode[$page_idd] == 'kb_article_reader.php' ) ? $page_idd : $page_to_kb[$cat_idd]; } } } $_SESSION['kb_setup'] = $page_to_kb; } // Start initial var setup $cat_id = $article_id = $sql = ''; if ( isset( $HTTP_GET_VARS['cat'] ) || isset( $HTTP_POST_VARS['cat'] ) ) { $cat_id = ( isset( $HTTP_GET_VARS['cat'] ) ) ? intval( $HTTP_GET_VARS['cat'] ) : intval( $HTTP_POST_VARS['cat'] ); } else if ( isset( $HTTP_GET_VARS['k'] ) || isset( $HTTP_POST_VARS['k'] ) ) { $article_id = ( isset( $HTTP_GET_VARS['k'] ) ) ? intval( $HTTP_GET_VARS['k'] ) : intval( $HTTP_POST_VARS['k'] ); $sql = "SELECT article_category_id FROM " . KB_ARTICLES_TABLE . " WHERE article_id = $article_id"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "no info - error", '', __LINE__, __FILE__, $sql ); } if ( !( $row = $db->sql_fetchrow( $result ) ) ) { //mx_message_die( GENERAL_MESSAGE, 'article_not_exist' ); } $cat_id = $row['article_category_id']; } if ( !empty($cat_id) ) { $kb_pages = $_SESSION['kb_setup'][$cat_id]; $kb_error = false; } else { $kb_error = true; } } ?> --- NEW FILE: functions_kb.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: functions_kb.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ [...1227 lines suppressed...] if ( !( $opt &2 ) ) { // Not translating double quotes // Remove double quote from translation table unset( $trans_tbl["""] ); } return strtr ( $string, $trans_tbl ); } } // // Just to be safe ;o) // if ( !defined( "ENT_COMPAT" ) ) define( "ENT_COMPAT", 2 ); if ( !defined( "ENT_NOQUOTES" ) ) define( "ENT_NOQUOTES", 0 ); if ( !defined( "ENT_QUOTES" ) ) define( "ENT_QUOTES", 3 ); ?> --- NEW FILE: functions_field.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: functions_field.php,v 1.1 2005/12/08 15:06:46 jonohlsson Exp $ */ /** * 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. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } class mx_kb_custom_field { var $field_rowset = array(); var $field_data_rowset = array(); // =================================================== // prepare data // =================================================== function init() { global $db; $sql = "SELECT * FROM " . KB_CUSTOM_TABLE . " ORDER BY field_order ASC"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Query Custom field', '', __LINE__, __FILE__, $sql ); } while ( $row = $db->sql_fetchrow( $result ) ) { $this->field_rowset[$row['custom_id']] = $row; } unset( $row ); $db->sql_freeresult( $result ); $sql = "SELECT * FROM " . KB_CUSTOM_DATA_TABLE; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Query Custom field', '', __LINE__, __FILE__, $sql ); } while ( $row = $db->sql_fetchrow( $result ) ) { $this->field_data_rowset[$row['customdata_file']][$row['customdata_custom']] = $row; } unset( $row ); $db->sql_freeresult( $result ); } // =================================================== // check if there is a data in the database // =================================================== function field_data_exist() { if ( !empty( $this->field_data_rowset ) ) { return true; } return false; } function field_exist() { if ( !empty( $this->field_rowset ) ) { return true; } return false; } // =================================================== // display data in the comment // =================================================== function add_comment( $file_id ) { global $template; if ( $this->field_data_exist() ) { if ( isset( $this->field_data_rowset[$file_id] ) ) { $message = ''; foreach( $this->field_data_rowset[$file_id] as $field_id => $data ) { if ( !empty( $data['data'] ) ) { switch ( $this->field_rowset[$field_id]['field_type'] ) { case INPUT: case TEXTAREA: case RADIO: case SELECT: $field_data = $data['data']; break; case SELECT_MULTIPLE: case CHECKBOX: $field_data = @implode( ', ', unserialize( $data['data'] ) ); break; } $message .= "\n" . "[b]" . $this->field_rowset[$field_id]['custom_name'] . ":[/b] " . $field_data . "\n"; } else { global $db; $sql = "DELETE FROM " . KB_CUSTOM_DATA_TABLE . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); } } } return $message; } else { return false; } } else { return false; } } // =================================================== // display data in the file page // =================================================== function display_data( $file_id ) { global $template; if ( $this->field_data_exist() ) { if ( isset( $this->field_data_rowset[$file_id] ) ) { foreach( $this->field_data_rowset[$file_id] as $field_id => $data ) { if ( !empty( $data['data'] ) ) { switch ( $this->field_rowset[$field_id]['field_type'] ) { case INPUT: case TEXTAREA: case RADIO: case SELECT: $field_data = $data['data']; break; case SELECT_MULTIPLE: case CHECKBOX: $field_data = @implode( ', ', unserialize( $data['data'] ) ); break; } $template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], 'DATA' => $field_data ) ); } else { global $db; $sql = "DELETE FROM " . KB_CUSTOM_DATA_TABLE . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); } } } } else { return false; } } else { return false; } } // =================================================== // display custom field and data in the add/edit page // =================================================== function display_edit( $file_id = false ) { global $template; $return = false; if ( $this->field_exist() ) { foreach( $this->field_rowset as $field_id => $field_data ) { switch ( $field_data['field_type'] ) { case INPUT: $this->display_edit_input( $file_id, $field_id, $field_data ); break; case TEXTAREA: $this->display_edit_textarea( $file_id, $field_id, $field_data ); break; case RADIO: $this->display_edit_radio( $file_id, $field_id, $field_data ); break; case SELECT: $this->display_edit_select( $file_id, $field_id, $field_data ); break; case SELECT_MULTIPLE: $this->display_edit_select_multiple( $file_id, $field_id, $field_data ); break; case CHECKBOX: $this->display_edit_checkbox( $file_id, $field_id, $field_data ); break; } $return = true; } } return $return; } function display_edit_input( $file_id, $field_id, $field_data ) { global $template, $_POST; $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; $template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'], 'FIELD_VALUE' => $field_value ) ); } function display_edit_textarea( $file_id, $field_id, $field_data ) { global $template; $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; $template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'], 'FIELD_VALUE' => $field_value ) ); } function display_edit_radio( $file_id, $field_id, $field_data ) { global $template; $template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); if ( !empty( $field_datas ) ) { foreach( $field_datas as $key => $value ) { $template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ); } } } function display_edit_select( $file_id, $field_id, $field_data ) { global $template; $template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); if ( !empty( $field_datas ) ) { foreach( $field_datas as $key => $value ) { $template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ); } } } function display_edit_select_multiple( $file_id, $field_id, $field_data ) { global $template; $template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); if ( !empty( $field_datas ) ) { foreach( $field_datas as $key => $value ) { $selected = ''; foreach( $data as $field_value ) { if ( $field_value == $value ) { $selected = ' selected="selected"'; break; } } $template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => $selected ) ); } } } function display_edit_checkbox( $file_id, $field_id, $field_data ) { global $template; $template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); if ( !empty( $field_datas ) ) { foreach( $field_datas as $key => $value ) { $checked = ''; foreach( $data as $field_value ) { if ( $field_value == $value ) { $checked = ' checked'; break; } } $template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, 'FIELD_CHECKED' => $checked ) ); } } } function update_add_field( $field_type, $field_id = false ) { global $db, $db, $_POST, $lang; $field_name = ( isset( $_POST['field_name'] ) ) ? htmlspecialchars( $_POST['field_name'] ) : ''; $field_desc = ( isset( $_POST['field_desc'] ) ) ? htmlspecialchars( $_POST['field_desc'] ) : ''; $regex = ( isset( $_POST['regex'] ) ) ? $_POST['regex'] : ''; $data = ( isset( $_POST['data'] ) ) ? $_POST['data'] : ''; $field_order = ( isset( $_POST['field_order'] ) ) ? $_POST['field_order'] : ''; if ( $field_id ) { $field_order = ( isset( $_POST['field_order'] ) ) ? intval( $_POST['field_order'] ) : ''; } if ( !empty( $data ) ) { $data = explode( "\n", htmlspecialchars( trim( $data ) ) ); foreach( $data as $key => $value ) { $data[$key] = trim( $value ); } $data = addslashes( serialize( $data ) ); } if ( empty( $field_name ) ) { mx_message_die( GENERAL_ERROR, $lang['Missing_field'] ); } if ( ( ( $field_type != INPUT && $field_type != TEXTAREA ) && empty( $data ) ) ) { mx_message_die( GENERAL_ERROR, $lang['Missing_field'] ); } if ( !$field_id ) { $sql = "INSERT INTO " . KB_CUSTOM_TABLE . " (custom_name, custom_description, data, regex, field_type) VALUES('" . $field_name . "', '" . $field_desc . "', '" . $data . "', '" . $regex . "', '" . $field_type . "')"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not add the new fields', '', __LINE__, __FILE__, $sql ); } $field_id = $db->sql_nextid(); $sql = "UPDATE " . KB_CUSTOM_TABLE . " SET field_order = '$field_id' WHERE custom_id = $field_id"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not set the order for the giving field', '', __LINE__, __FILE__, $sql ); } } else { $sql = "UPDATE " . KB_CUSTOM_TABLE . " SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' WHERE custom_id = $field_id"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not update information for the giving field', '', __LINE__, __FILE__, $sql ); } } } function delete_field( $field_id ) { global $db; $sql = "DELETE FROM " . KB_CUSTOM_DATA_TABLE . " WHERE customdata_custom = '$field_id'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); } $sql = "DELETE FROM " . KB_CUSTOM_TABLE . " WHERE custom_id = '$field_id'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not delete the selected field', '', __LINE__, __FILE__, $sql ); } } function get_field_data( $field_id ) { $return_array = $this->field_rowset[$field_id]; $return_array['data'] = !empty( $return_array['data'] ) ? implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ) : ''; return $return_array; } // =================================================== // file data in custom field operations // =================================================== function file_update_data( $file_id ) { global $_POST, $db; $field = ( isset( $_POST['field'] ) ) ? $_POST['field'] : ''; if ( !empty( $field ) ) { foreach( $field as $field_id => $field_data ) { if ( !empty( $this->field_rowset[$field_id]['regex'] ) ) { if ( !preg_match( '#' . $this->field_rowset[$field_id]['regex'] . '#siU', $field_data ) ) { $field_data = ''; } } switch ( $this->field_rowset[$field_id]['field_type'] ) { case INPUT: case TEXTAREA: case RADIO: case SELECT: $data = htmlspecialchars( $field_data ); break; case SELECT_MULTIPLE: case CHECKBOX: $data = addslashes( serialize( $field_data ) ); break; } $sql = "DELETE FROM " . KB_CUSTOM_DATA_TABLE . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; if ( !$db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not delete data from custom data table', '', __LINE__, __FILE__, $sql ); } if ( !empty( $data ) ) { $sql = "INSERT INTO " . KB_CUSTOM_DATA_TABLE . " (customdata_file, customdata_custom, data) VALUES('$file_id', '$field_id', '$data')"; if ( !$db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not add additional data', '', __LINE__, __FILE__, $sql ); } } } } } } ?> |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:06:54
|
Update of /cvsroot/mxbb/mx_kb/kb/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4009/modules/mx_kb/kb/cache Added Files: index.htm Log Message: in progress commit for mx_kb --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:05:37
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3872/includes Log Message: Directory /cvsroot/mxbb/mx_kb/kb/includes added to the repository |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:05:37
|
Update of /cvsroot/mxbb/mx_kb/kb/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3872/cache Log Message: Directory /cvsroot/mxbb/mx_kb/kb/cache added to the repository |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:05:36
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3872/modules Log Message: Directory /cvsroot/mxbb/mx_kb/kb/modules added to the repository |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:04:40
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3524/modules/mx_kb/templates/subSilver Modified Files: kb_article_body.tpl kb_cat_body.tpl kb_footer.tpl kb_header.tpl kb_index_body.tpl kb_post_body.tpl kb_search_body.tpl Added Files: kb_comment_posting.tpl kb_search_result.tpl Log Message: in progress commit for mx_kb Index: kb_header.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_header.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_header.tpl 9 Jan 2005 21:40:39 -0000 1.6 --- kb_header.tpl 8 Dec 2005 15:04:27 -0000 1.7 *************** *** 1,40 **** <table width="100%" cellspacing="0" cellpadding="2" border="0"> ! <tr> {L_KB_TITLE} ! </tr> ! <tr> ! <td align="center" class="nav"> ! <!-- BEGIN switch_add_article --> ! <span class="nav">{L_ADD_ARTICLE}</span> ! <!-- END switch_add_article --> ! <span class="nav">{L_SEARCH}</span></td> ! </tr> </table> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <!-- BEGIN switch_quick_stats --> ! <tr valign="top"> ! <td width="100%"> ! <table width="100%" cellspacing="0" cellpadding="4" border="0" class="forumline" > ! <tr> ! <th class="thTop" colspan="2"> {switch_quick_stats.L_QUICK_STATS} </td> ! </tr> ! <tr><td class="row2" width = "100%" align="center"><span class="gen"> ! <!-- BEGIN quick_stats --> ! {switch_quick_stats.quick_stats.Q_TYPE_NAME} {switch_quick_stats.quick_stats.Q_TYPE_AMOUNT} ! <!-- END quick_stats --> ! </span></td></tr> ! ! <tr><td class="row2" width = "100%" align="center"><span class="gen">:: ! <a href="{U_MOST_POPULAR}" class="nav">{L_MOST_POPULAR}</a> :: ! <a href="{U_TOPRATED}" class="nav">{L_TOPRATED}</a> :: ! <a href="{U_LATEST}" class="nav">{L_LATEST}</a> :: ! </span></td></tr> ! </table> ! </td> ! </tr> <!-- END switch_quick_stats --> ! ! <tr valign="top"> <td> --- 1,45 ---- <table width="100%" cellspacing="0" cellpadding="2" border="0"> ! <tr> {L_KB_TITLE} ! </tr> ! <tr> ! <td align="center" class="row2"> ! <!-- BEGIN switch_add_article --> ! <span class="nav">{L_ADD_ARTICLE}</span> ! <!-- END switch_add_article --> ! <span class="nav">{L_SEARCH_MODULE}</span></td> ! </tr> ! <tr> ! <td align="center" class="row2"> ! <span class="nav">:: ! <a href="{U_MOST_POPULAR}" class="nav">{L_MOST_POPULAR}</a> :: ! <a href="{U_TOPRATED}" class="nav">{L_TOPRATED}</a> :: ! <a href="{U_LATEST}" class="nav">{L_LATEST}</a> :: ! </span> ! </td> ! </tr> </table> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <!-- BEGIN switch_quick_stats --> ! <tr valign="top"> ! <td width="100%"> ! <table width="100%" cellspacing="0" cellpadding="2" border="0" class="forumline" > ! <tr> ! <th class="thTop" colspan="2"> {switch_quick_stats.L_QUICK_STATS} </td> ! </tr> ! <tr> ! <td class="row2" width = "100%" align="center"> ! <span class="gensmall"> ! {switch_quick_stats.STATS} ! </span> ! </td> ! </tr> ! ! </table> ! </td> ! </tr> <!-- END switch_quick_stats --> ! <tr valign="top"> <td> Index: kb_index_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_index_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_index_body.tpl 1 Feb 2005 20:46:00 -0000 1.4 --- kb_index_body.tpl 8 Dec 2005 15:04:27 -0000 1.5 *************** *** 4,20 **** </tr> </table> ! <table width="100%" cellpadding="4" cellspacing="0" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" nowrap="nowrap"> {L_CATEGORY} </th> ! <th width="50" class="thCornerR" nowrap="nowrap"> {L_ARTICLES} </th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td class="row1" height="50"><span class="forumlink">{catrow.CATEGORY}</span><br /><span class="genmed">{catrow.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{catrow.CAT_ARTICLES}</span></td> ! </tr> ! <!-- END catrow --> <tr> ! <td class="catBottom" colspan="2"> </td> </tr> </table> --- 4,30 ---- </tr> </table> ! ! <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> ! <th class="thCornerR" width="50" nowrap="nowrap"> {L_ARTICLES} </th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td class="row1" align="center" valign="middle"><img src="{catrow.CAT_IMAGE}" border="0" alt="{catrow.CAT_DESCRIPTION}"></td> ! <td class="row1"><span class="forumlink">{catrow.CATEGORY}</span><br /><span class="genmed">{catrow.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{catrow.CAT_ARTICLES}</span></td> ! </tr> ! <!-- BEGIN sub --> ! <tr> ! <th class="row1" width="6%"> </th> ! <td class="row1" ><span class="genmed"><b>{catrow.L_SUB_CAT}:</b> {catrow.sub.SUB_CAT_LIST}</span></td> ! <td class="row2" align="center" valign="middle"> </td> ! </tr> ! <!-- END sub --> ! <!-- END catrow --> <tr> ! <td class="catBottom" colspan="3"> </td> </tr> </table> Index: kb_search_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_search_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_search_body.tpl 1 Feb 2005 20:46:01 -0000 1.4 --- kb_search_body.tpl 8 Dec 2005 15:04:27 -0000 1.5 *************** *** 1,27 **** ! ! <form action="{S_SEARCH_ACTION}" method="POST"><table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> ! <tr> ! <td align="left"><span class="nav"><a href="{U_KB}" class="nav">{L_KB}</a></span></td> ! </tr> </table> ! ! <table class="forumline" width="100%" cellpadding="4" cellspacing="1" border="0"> ! <tr> ! <th class="thHead" colspan="4" height="25">{L_SEARCH_QUERY}</th> ! </tr> <tr> ! <td class="row1" colspan="2" width="50%"><span class="gen">{L_SEARCH_KEYWORDS}:</span><br /><span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td> ! <td class="row2" colspan="2" valign="top"><span class="genmed"><input type="text" style="width: 300px" class="post" name="search_keywords" size="30" /><br /><input type="radio" name="search_terms" value="any" checked="checked" /> {L_SEARCH_ANY_TERMS}<br /><input type="radio" name="search_terms" value="all" /> {L_SEARCH_ALL_TERMS}</span></td> </tr> <tr> ! <td class="catBottom" colspan="4" align="center" height="28">{S_HIDDEN_FIELDS}<input class="liteoption" type="submit" value="{S_SEARCH}" /></td> </tr> - </table> - - <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> ! <td align="right" valign="middle"><span class="gensmall">{S_TIMEZONE}</span></td> </tr> ! </table></form> ! ! --- 1,51 ---- ! <form action="{S_SEARCH_ACTION}" method="post"> ! <table width="100%" cellpadding="2" cellspacing="2"> ! <tr> ! <td valign="bottom"> ! <span class="nav"><a href="{U_KB}" class="nav">{L_KB}</a> » {L_SEARCH}</span> ! </td> ! </tr> </table> ! <table width="100%" cellpadding="4" cellspacing="0" class="forumline"> ! <tr> ! <th class="thHead" colspan="2"> {L_SEARCH}</th> ! </tr> <tr> ! <td class="row1" width="50%"><span class="gen">{L_SEARCH_KEYWORDS}:</span><br /><span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td> ! <td class="row2" valign="top"><span class="genmed"><input type="text" style="width: 300px" class="post" name="search_keywords" size="30" /><br /><input type="radio" name="search_terms" value="any" checked="checked" /> {L_SEARCH_ANY_TERMS}<br /><input type="radio" name="search_terms" value="all" /> {L_SEARCH_ALL_TERMS}</span></td> </tr> <tr> ! <td class="row1"><span class="gen">{L_SEARCH_AUTHOR}:</span><br /><span class="gensmall">{L_SEARCH_AUTHOR_EXPLAIN}</span></td> ! <td class="row2" valign="middle"><span class="genmed"><input type="text" style="width: 300px" class="post" name="search_author" size="30" /></span></td> </tr> <tr> ! <th class="thHead" colspan="2" height="25"> {L_SEARCH_OPTIONS}</th> </tr> ! <tr> ! <td class="row1" width="50%"><span class="genmed">{L_CHOOSE_CAT} </span></td> ! <td class="row2"><select name="cat_id" class="forminput"><option value="0" selected>{L_ALL}</option>{S_CAT_MENU}</select></td> ! </tr> ! <tr> ! <td class="row1" width="50%"><span class="genmed">{L_INCLUDE_COMMENTS}: </span></td> ! <td class="row2"><span class="genmed"><input type="radio" name="comments_search" value="YES" checked="checked" /> {L_YES} <input type="radio" name="comments_search" value="NO" /> {L_NO}</span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed">{L_SORT_BY}: </span></td> ! <td class="row2" valign="middle" nowrap="nowrap"><span class="genmed"> ! <select class="post" name="sort_method"> ! <option value='article_title'>{L_NAME}</option> ! <option selected="selected" value='article_date'>{L_DATE}</option> ! <option value='article_rating'>{L_RATING}</option> ! <option value='views'>{L_VIEWS}</option> ! <!--<option value='file_update_time'>{L_UPDATE_TIME}</option>--> ! </select></span> </td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed">{L_SORT_DIR}: </span></td> ! <td class="row2" valign="middle" nowrap="nowrap"><span class="genmed"><input type="radio" name="sort_order" value="ASC" /> {L_SORT_ASCENDING} <input type="radio" name="sort_order" value="DESC" checked /> {L_SORT_DESCENDING}</span> </td> ! </tr> ! <tr> ! <td class="cat" align="center" colspan="2"><input type="hidden" name="mode" value="search"><input class="liteoption" type="submit" name="submit" value="{L_SEARCH}"></td> ! </tr> ! </form> ! </table> \ No newline at end of file Index: kb_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_footer.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_footer.tpl 1 May 2005 16:39:23 -0000 1.8 --- kb_footer.tpl 8 Dec 2005 15:04:27 -0000 1.9 *************** *** 1,3 **** - <tr> <td> --- 1,2 ---- *************** *** 5,13 **** <tr> <td align="left" valign="top"> ! <!-- BEGIN quick_nav --> <form method="get" name="jumpbox" action="{QUICK_JUMP_ACTION}" onSubmit="if(document.jumpbox.cat.value == -1){return false;}"> <table cellspacing="0" cellpadding="0" border="0"> <tr> ! <td nowrap="nowrap"><span class="gensmall">{L_QUICK_NAV} <select name="cat" onchange="if(this.options[this.selectedIndex].value != 0){ forms['jumpbox'].submit() }"> <option value="0">{L_QUICK_JUMP}</otpion> --- 4,12 ---- <tr> <td align="left" valign="top"> ! <!-- BEGIN jumpbox --> <form method="get" name="jumpbox" action="{QUICK_JUMP_ACTION}" onSubmit="if(document.jumpbox.cat.value == -1){return false;}"> <table cellspacing="0" cellpadding="0" border="0"> <tr> ! <td nowrap="nowrap"><span class="gensmall">{L_QUICK_NAV}<br /> <select name="cat" onchange="if(this.options[this.selectedIndex].value != 0){ forms['jumpbox'].submit() }"> <option value="0">{L_QUICK_JUMP}</otpion> *************** *** 15,29 **** </select> {S_HIDDEN_VARS} ! <input type="submit" value="{L_QUICK_JUMP}" class="liteoption" /></span> </td> </tr> </table> </form> ! <!-- END quick_nav --> </td> <td align="right"> ! <!-- BEGIN auth_can --> <span class="gensmall">{S_AUTH_LIST}</span> ! <!-- END auth_can --> </td> </tr> --- 14,28 ---- </select> {S_HIDDEN_VARS} ! <input type="submit" value="{L_QUICK_GO}" class="liteoption" /></span> </td> </tr> </table> </form> ! <!-- END jumpbox --> </td> <td align="right"> ! <!-- BEGIN auth_can_list --> <span class="gensmall">{S_AUTH_LIST}</span> ! <!-- END auth_can_list --> </td> </tr> *************** *** 31,39 **** </td> </tr> - - - </table> ! <!-- BEGIN copy_footer --> <div align="center"><span class="copyright"><br /> --- 30,35 ---- </td> </tr> </table> ! {DEBUG} <!-- BEGIN copy_footer --> <div align="center"><span class="copyright"><br /> Index: kb_article_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** kb_article_body.tpl 2 Apr 2005 20:37:03 -0000 1.14 --- kb_article_body.tpl 8 Dec 2005 15:04:26 -0000 1.15 *************** *** 18,27 **** <tr> <td class="row2"><hr> ! <span class="gensmall"><b>{L_ARTICLE_AUTHOR}</b></span> <span class="gen">{ARTICLE_AUTHOR}</span> ! <span class="gensmall"><b>{L_ARTICLE_DATE}</b></span> <span class="gen">{ARTICLE_DATE}</span> <span class="gensmall">{VIEWS}<br /></span> ! <span class="gensmall"><b>{L_ARTICLE_DESCRIPTION}</b></span> <span class="gen">{ARTICLE_DESCRIPTION}<br /></span> ! <span class="gensmall"><b>{L_ARTICLE_CATEGORY}</b></span> <span class="gen">{ARTICLE_CATEGORY}</span> ! <span class="gensmall"><b>{L_ARTICLE_TYPE}</b></span> <span class="gen">{ARTICLE_TYPE}</span> <!-- BEGIN custom_field --> --- 18,27 ---- <tr> <td class="row2"><hr> ! <span class="gensmall"><b>{L_ARTICLE_AUTHOR}</b></span> <span class="gensmall">{ARTICLE_AUTHOR}</span> ! <span class="gensmall"><b>{L_ARTICLE_DATE}</b></span> <span class="gensmall">{ARTICLE_DATE}</span> <span class="gensmall">{VIEWS}<br /></span> ! <span class="gensmall"><b>{L_ARTICLE_DESCRIPTION}</b></span> <span class="gensmall">{ARTICLE_DESCRIPTION}<br /></span> ! <span class="gensmall"><b>{L_ARTICLE_CATEGORY}</b></span> <span class="gensmall">{ARTICLE_CATEGORY}</span> ! <span class="gensmall"><b>{L_ARTICLE_TYPE}</b></span> <span class="gensmall">{ARTICLE_TYPE}</span> <!-- BEGIN custom_field --> *************** *** 72,113 **** </table> ! <!-- BEGIN switch_comments_show --> ! <br /> ! <table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="forumline"> ! <tr> ! <th class="thTop"> {L_COMMENTS} </th> ! </tr> ! <!-- END switch_comments_show --> ! <!-- BEGIN postrow --> ! <tr> ! <td class="row1" width="100%" height="28" valign="top"> ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td width="100%"><span class="genmed"><b>{postrow.POSTER_NAME}</b></span><span class="postdetails"> {L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT} {postrow.POST_SUBJECT}</span></td> ! </tr> ! <tr> ! <td ><hr /></td> ! </tr> ! <tr> ! <td ><span class="postbody">{postrow.MESSAGE}</span></td> ! </tr> ! </table></td> ! </tr> ! <tr> ! <td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td> ! </tr> ! <!-- END postrow --> ! <!-- BEGIN switch_comments_show --> ! </table> ! <!-- BEGIN comments_pag --> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> ! <td><span class="nav">{PAGE_NUMBER}</span></td> ! <td align="right"><span class="nav">{PAGINATION}</span></td> </tr> </table> ! <!-- END comments_pag --> ! <!-- END switch_comments_show --> <table width="100%" cellspacing="2" border="0" align="center"> --- 72,139 ---- </table> ! <!-- BEGIN use_comments --> ! <table width="100%" cellpadding="4" cellspacing="0" class="forumline"> ! <tr> ! <th class="thCornerL" colspan="2">{use_comments.L_COMMENTS}</th> ! </tr> ! <!-- BEGIN no_comments --> ! <tr> ! <td colspan="2" class="row1" align="center"><span class="genmed">{use_comments.no_comments.L_NO_COMMENTS}</span></td> ! </tr> ! <!-- END no_comments --> ! <!-- BEGIN text --> ! <tr> ! <td width="100" align="left" valign="top" class="row1"><span class="name"> ! <b>{use_comments.text.POSTER}</b></span><hr /><br /> ! <span class="postdetails">{use_comments.text.POSTER_RANK}<br /> ! {use_comments.text.RANK_IMAGE}{use_comments.text.POSTER_AVATAR}</span><br /> ! </td> ! <td class="row1" height="28" valign="top"> ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td width="80%" valign="middle"><span class="genmed"><img src="{use_comments.text.ICON_MINIPOST_IMG}" width="12" height="9" border="0" /> <b>{use_comments.text.TITLE}</b> </span><span class="genmed">({use_comments.text.TIME})</span></td> ! <td align="right"> ! <!-- BEGIN auth_edit --> ! <a href="{use_comments.text.auth_edit.U_COMMENT_EDIT}"><img src="{use_comments.text.auth_edit.EDIT_IMG}" alt="{use_comments.text.auth_edit.L_COMMENT_EDIT}" title="{use_comments.text.auth_edit.L_COMMENT_EDIT}" border="0"></a> ! <!-- END auth_edit --> ! <!-- BEGIN auth_delete --> ! <a href="{use_comments.text.auth_delete.U_COMMENT_DELETE}"><img src="{use_comments.text.auth_delete.DELETE_IMG}" alt="{use_comments.text.auth_delete.L_COMMENT_DELETE}" title="{use_comments.text.auth_delete.L_COMMENT_DELETE}" border="0"></a> ! <!-- END auth_delete --> ! </td> ! </tr> ! <tr> ! <td colspan="2"><hr /></td> ! </tr> ! <tr> ! <td colspan="2"valign="top"><span class="postbody">{use_comments.text.TEXT}</span></td> ! </tr> ! </table> ! </td> ! </tr> ! <tr> ! <td class="spaceRow" colspan="2" height="1"><img src="{use_comments.text.ICON_SPACER}" alt="" width="1" height="1" /></td> ! </tr> ! <!-- END text --> ! </table> ! ! <!-- BEGIN comments_pag --> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> ! <td><span class="nav">{use_comments.comments_pag.PAGE_NUMBER}</span></td> ! <td align="right"><span class="nav">{use_comments.comments_pag.PAGINATION}</span></td> </tr> </table> ! <!-- END comments_pag --> ! ! <!-- BEGIN auth_post --> ! <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> ! <tr> ! <td><a href="{use_comments.auth_post.U_COMMENT_POST}"><img src="{use_comments.auth_post.REPLY_IMG}" border="0" alt="{use_comments.auth_post.L_COMMENT_ADD}" align="middle" /></a></td> ! </tr> ! </table> ! <br clear="all" /> ! <!-- END auth_post --> ! <!-- END use_comments --> <table width="100%" cellspacing="2" border="0" align="center"> --- NEW FILE: kb_search_result.tpl --- <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <td align="left" valign="bottom"><span class="cattitle">{L_SEARCH_MATCHES}</span><br /></td> </tr> </table> <table width="100%" cellpadding="2" cellspacing="2"> <tr> <td valign="bottom"> <span class="nav"><a href="{U_KB}" class="nav">{L_KB}</a> » {L_SEARCH_RESULTS}</span> </td> </tr> </table> <table width="100%" cellpadding="4" cellspacing="0" class="forumline"> <tr> <th width="4%" height="25" class="thCornerL" nowrap="nowrap"> </th> <th class="thTop" nowrap="nowrap"> {L_CATEGORY} / {L_ARTICLE} </th> <th class="thTop" nowrap="nowrap"> {L_SUBMITER} </th> <th class="thTop" nowrap="nowrap"> {L_VIEWS} </th> <th class="thCornerR" nowrap="nowrap"> {L_RATE} </th> </tr> <!-- BEGIN searchresults --> <tr> <td class="row1" align="center" valign="middle"><a href="{searchresults.U_FILE}" class="topictitle">{searchresults.PIN_IMAGE}</a></td> <td class="row1" valign="middle"><span class="forumlink"><a href="{searchresults.U_CAT}" class="forumlink">{searchresults.CAT_NAME}</a></span><br /><a href="{searchresults.U_FILE}" class="topictitle">{searchresults.FILE_NAME}</a> <span class="postdetails">({searchresults.DATE})</span><br /><span class="genmed">{searchresults.FILE_DESC}</span></td> <td class="row1" align="center" valign="middle"><span class="name">{searchresults.FILE_SUBMITER}</span></td> <td class="row1" align="center" valign="middle"><span class="postdetails">{searchresults.DOWNLOADS}</span></td> <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{searchresults.RATING}</span></td> </tr> <!-- END searchresults --> <tr> <td class="cat" colspan="5"> </td> </tr> </table> <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> <tr> <td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td> <td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span></td> </tr> </table> --- NEW FILE: kb_comment_posting.tpl --- <!-- INCLUDE pa_header.tpl --> <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> <script language="javascript"> <!-- var postmaxchars = {MESSAGE_LENGTH}; function checklength(theform) { if (postmaxchars != 0) { message = ""; } else { message = ""; } alert("{L_MSG_LENGTH_1}"+theform.message.value.length+"{L_MSG_LENGTH_2}\n\r\n\r{L_MSG_LENGTH_3}"+postmaxchars+"{L_MSG_LENGTH_4}\n\r\n\r{L_MSG_LENGTH_5}"+(postmaxchars-theform.message.value.length)+"{L_MSG_LENGTH_6}"); } //--> </script> <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> <!-- IF PREVIEW --> <table border="0" cellpadding="4" cellspacing="0" width="100%" class="forumline"> <tr> <th class="thHead" colspan="2" height="25">{L_PREVIEW}</th> </tr> <tr> <td class="row1" valign="top"><span class="postbody">{PRE_COMMENT}</span></td> </tr> </table> <br /> <!-- ENDIF --> <table width="100%" cellpadding="2" cellspacing="2"> <tr> <td valign="bottom"> <span class="nav"><a href="{U_DOWNLOAD_HOME}" class="nav">{DOWNLOAD}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a><!-- END navlinks --> -> <a href="{U_FILE_NAME}" class="nav">{FILE_NAME}</a> » {L_COMMENT_ADD}</span> </td> </tr> </table> <table border="0" cellpadding="4" cellspacing="0" width="100%" class="forumline"> <tr> <th class="thHead" colspan="2" height="25"><b>{L_COMMENT_ADD}</b></th> </tr> <tr> <td class="row1" ><span class="gen"><b>{L_COMMENT_TITLE}</b></span></td> <td class="row2"><input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{TITLE}" /></span></td> </tr> <tr> <td class="row1" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr> <td><span class="gen"><b>{L_COMMENT}</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="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_EMOTICONS}</a></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 --> </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]')" onMouseOver="helpline('s')"> <option style="color:black; background-color: #FFFFFF " value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option> <option style="color:darkred; background-color: #DEE3E7" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option> <option style="color:red; background-color: #DEE3E7" value="red" class="genmed">{L_COLOR_RED}</option> <option style="color:orange; background-color: #DEE3E7" value="orange" class="genmed">{L_COLOR_ORANGE}</option> <option style="color:brown; background-color: #DEE3E7" value="brown" class="genmed">{L_COLOR_BROWN}</option> <option style="color:yellow; background-color: #DEE3E7" value="yellow" class="genmed">{L_COLOR_YELLOW}</option> <option style="color:green; background-color: #DEE3E7" value="green" class="genmed">{L_COLOR_GREEN}</option> <option style="color:olive; background-color: #DEE3E7" value="olive" class="genmed">{L_COLOR_OLIVE}</option> <option style="color:cyan; background-color: #DEE3E7" value="cyan" class="genmed">{L_COLOR_CYAN}</option> <option style="color:blue; background-color: #DEE3E7" value="blue" class="genmed">{L_COLOR_BLUE}</option> <option style="color:darkblue; background-color: #DEE3E7" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option> <option style="color:indigo; background-color: #DEE3E7" value="indigo" class="genmed">{L_COLOR_INDIGO}</option> <option style="color:violet; background-color: #DEE3E7" value="violet" class="genmed">{L_COLOR_VIOLET}</option> <option style="color:white; background-color: #DEE3E7" value="white" class="genmed">{L_COLOR_WHITE}</option> <option style="color:black; background-color: #DEE3E7" 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" class="row2"><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);">{COMMENT}</textarea> </td> </tr> </table> </td> </tr> <tr> <td class="row1"><span class="gen"><B>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}<br />{LINKS_STATUS}<br />{IMAGES_STATUS}</span></td> <td class="row2"><span class="gen">{L_COMMENT_EXPLAIN}<br /><a href="javascript:checklength(document.post);">{L_CHECK_MSG_LENGTH}</a></span></td> </tr> <tr> <td class="cat" 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="submit" class="mainoption" value="{L_SUBMIT}" /></td> </form> </tr> </table> <!-- INCLUDE pa_footer.tpl --> Index: kb_cat_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_cat_body.tpl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** kb_cat_body.tpl 2 Apr 2005 20:37:03 -0000 1.11 --- kb_cat_body.tpl 8 Dec 2005 15:04:27 -0000 1.12 *************** *** 7,29 **** </table> ! <!-- BEGIN switch_sub_cats --> ! <table width="100%" cellpadding="4" cellspacing="0" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" nowrap="nowrap"> {L_CATEGORY} </th> ! <th width="50" class="thCornerR" nowrap="nowrap"> {L_ARTICLES} </th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td class="row1" height="50"><span class="forumlink">{switch_sub_cats.catrow.CATEGORY}</span><br /><span class="genmed">{switch_sub_cats.catrow.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{switch_sub_cats.catrow.CAT_ARTICLES}</span></td> ! </tr> ! <!-- END catrow --> ! <tr> ! <td class="catBottom" colspan="2"> </td> ! </tr> </table> ! <br /> ! <!-- END switch_sub_cats --> ! <table width="100%" cellpadding="4" cellspacing="0" border="0" class="forumline"> <tr> <th class="thCornerL" nowrap="nowrap"> {L_ARTICLE} </th> --- 7,40 ---- </table> ! <!-- BEGIN show_subs --> ! <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> ! <th class="thCornerR" width="50" nowrap="nowrap"> {L_ARTICLES} </th> ! </tr> ! <!-- END show_subs --> ! <!-- BEGIN catrow --> ! <tr> ! <td class="row1" align="center" valign="middle"><img src="{catrow.CAT_IMAGE}" border="0" alt="{catrow.CAT_DESCRIPTION}"></td> ! <td class="row1"><span class="forumlink">{catrow.CATEGORY}</span><br /><span class="genmed">{catrow.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{catrow.CAT_ARTICLES}</span></td> ! </tr> ! <!-- BEGIN sub --> ! <tr> ! <th class="row1" width="6%"> </th> ! <td class="row1" ><span class="genmed"><b>{catrow.L_SUB_CAT}:</b> {catrow.sub.SUB_CAT_LIST}</span></td> ! <td class="row2" align="center" valign="middle"> </td> ! </tr> ! <!-- END sub --> ! <!-- END catrow --> ! <!-- BEGIN show_subs --> ! <tr> ! <td class="catBottom" colspan="3"> </td> ! </tr> </table> ! <!-- END show_subs --> ! ! <table width="100%" cellpadding="3" cellspacing="0" border="0" class="forumline"> <tr> <th class="thCornerL" nowrap="nowrap"> {L_ARTICLE} </th> Index: kb_post_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_post_body.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_post_body.tpl 2 Apr 2005 20:37:03 -0000 1.5 --- kb_post_body.tpl 8 Dec 2005 15:04:27 -0000 1.6 *************** *** 374,378 **** <!-- END switch_smilies_extra --> </table> ! <br /><br /><span class="gen"><b><nobr>{L_OPTIONS}</nobr></b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span><br /><br /> </td> <td class="row2" valign="top"><span class="gen"> --- 374,378 ---- <!-- END switch_smilies_extra --> </table> ! <br /><br /><span class="gen"><b><nobr>{L_OPTIONS}</nobr></b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}<br />{LINKS_STATUS}<br />{IMAGES_STATUS}</span><br /><br /> </td> <td class="row2" valign="top"><span class="gen"> |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:04:36
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3524/modules/mx_kb/templates/subSilver/admin Modified Files: kb_art_body.tpl kb_cat_admin_body.tpl kb_cat_edit_body.tpl kb_config.tpl kb_config_body.tpl Removed Files: kb_rebuild_search.tpl kb_rebuild_search_progress.tpl Log Message: in progress commit for mx_kb --- kb_rebuild_search_progress.tpl DELETED --- Index: kb_art_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_art_body.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_art_body.tpl 3 Nov 2005 12:13:34 -0000 1.5 --- kb_art_body.tpl 8 Dec 2005 15:04:26 -0000 1.6 *************** *** 1,5 **** ! <h1>{L_KB_ART_TITLE}</h1> ! <p>{L_KB_ART_DESCRIPTION}</p> <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline"> --- 1,5 ---- ! <h1>{L_ART_TITLE}</h1> ! <p>{L_ART_EXPLAIN}</p> <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline"> Index: kb_cat_edit_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_cat_edit_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_cat_edit_body.tpl 3 Nov 2005 12:13:34 -0000 1.4 --- kb_cat_edit_body.tpl 8 Dec 2005 15:04:26 -0000 1.5 *************** *** 25,32 **** </select> </tr> - <tr> - <td class="row1" width="50%">{L_FORUM_ID}<br /><span class="gensmall">{L_FORUM_ID_EXPLAIN}</span></td> - <td class="row2" width="50%">{FORUM_LIST}</td> - </tr> <!-- BEGIN switch_edit_category --> <tr> --- 25,28 ---- *************** *** 36,40 **** <!-- END switch_edit_category --> <!-- END switch_cat --> ! <tr> <th class="thHead" height="25" nowrap="nowrap" colspan="2">{L_CAT_PERMISSIONS}</th> --- 32,85 ---- <!-- END switch_edit_category --> <!-- END switch_cat --> ! ! <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_COMMENTS_TITLE}</th> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_USE_COMMENTS}<br /><span class="gensmall">{L_USE_COMMENTS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="cat_allow_comments" value="-1" {S_USE_COMMENTS_DEFAULT} /> {L_DEFAULT} <input type="radio" name="cat_allow_comments" value="1" {S_USE_COMMENTS_YES} /> {L_YES} <input type="radio" name="cat_allow_comments" value="0" {S_USE_COMMENTS_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_INTERNAL_COMMENTS}<br /><span class="gensmall">{L_INTERNAL_COMMENTS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="internal_comments" value="-1" {S_INTERNAL_COMMENTS_DEFAULT} /> {L_DEFAULT} <input type="radio" name="internal_comments" value="1" {S_INTERNAL_COMMENTS_INTERNAL} /> {L_INTERNAL_COMMENTS_INTERNAL} <input type="radio" name="internal_comments" value="0" {S_INTERNAL_COMMENTS_PHPBB} /> {L_INTERNAL_COMMENTS_PHPBB}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_FORUM_ID}<br /><span class="gensmall">{L_FORUM_ID_EXPLAIN}</span></td> ! <td class="row2" width="50%">{FORUM_LIST}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_AUTOGENERATE_COMMENTS}<br /><span class="gensmall">{L_AUTOGENERATE_COMMENTS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="autogenerate_comments" value="-1" {S_AUTOGENERATE_COMMENTS_DEFAULT} /> {L_DEFAULT} <input type="radio" name="autogenerate_comments" value="1" {S_AUTOGENERATE_COMMENTS_YES} /> {L_YES} <input type="radio" name="autogenerate_comments" value="0" {S_AUTOGENERATE_COMMENTS_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_RATINGS_TITLE}</th> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_USE_RATINGS}<br /><span class="gensmall">{L_USE_RATINGS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="cat_allow_ratings" value="-1" {S_USE_RATINGS_DEFAULT} /> {L_DEFAULT} <input type="radio" name="cat_allow_ratings" value="1" {S_USE_RATINGS_YES} /> {L_YES} <input type="radio" name="cat_allow_ratings" value="0" {S_USE_RATINGS_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_INSTRUCTIONS_TITLE}</th> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_PRE_TEXT_NAME}<br /><span class="gensmall">{L_PRE_TEXT_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="show_pretext" value="-1" {S_DEFAULT_PRETEXT} /> {L_DEFAULT} <input type="radio" name="show_pretext" value="1" {S_SHOW_PRETEXT} /> {L_SHOW} <input type="radio" name="show_pretext" value="0" {S_HIDE_PRETEXT} /> {L_HIDE}</td> ! </tr> ! <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_NOTIFICATIONS_TITLE}</th> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_NOTIFY}<br /><span class="gensmall">{L_NOTIFY_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="notify" value="-1" {S_NOTIFY_DEFAULT} />{L_DEFAULT} <input type="radio" name="notify" value="0" {S_NOTIFY_NONE} />{L_NONE} <input type="radio" name="notify" value="2" {S_NOTIFY_EMAIL} />{L_EMAIL} <input type="radio" name="notify" value="1" {S_NOTIFY_PM} />{L_PM}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_NOTIFY_GROUP}<br /><span class="gensmall">{L_NOTIFY_GROUP_EXPLAIN}</span></td> ! <td class="row2" width="50%">{NOTIFY_GROUP}</td> ! </tr> ! <tr> <th class="thHead" height="25" nowrap="nowrap" colspan="2">{L_CAT_PERMISSIONS}</th> Index: kb_config_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_config_body.tpl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** kb_config_body.tpl 3 Nov 2005 12:13:34 -0000 1.11 --- kb_config_body.tpl 8 Dec 2005 15:04:26 -0000 1.12 *************** *** 6,100 **** <table width="100%" cellpadding="3" cellspacing="1" border="0" align="center" class="forumline"> <tr> ! <th class="thHead" colspan="2">{L_CONFIGURATION_TITLE}</th> </tr> <tr> ! <td class="row1" width="50%">{L_NEW_NAME}<br /><span class="gensmall">{L_NEW_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_new" value="1" {S_NEW_YES} /> {L_YES} <input type="radio" name="allow_new" value="0" {S_NEW_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_NOTIFY_NAME}<br /><span class="gensmall">{L_NOTIFY_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="notify" value="0" {S_NOTIFY_NONE} />{L_NONE} <input type="radio" name="notify" value="2" {S_NOTIFY_EMAIL} />{L_EMAIL} <input type="radio" name="notify" value="1" {S_NOTIFY_PM} />{L_PM}</td> </tr> <tr> ! <td class="row1" width="50%">{L_ADMIN_ID_NAME}<br /><span class="gensmall">{L_ADMIN_ID_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="post" type="text" name="admin_id" value="{ADMIN_ID}" size="5" maxlength="4" /></td> </tr> <tr> ! <td class="row1" width="50%">{L_HEADER_BANNER}<br /><span class="gensmall">{L_HEADER_BANNER_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="header_banner" value="1" {S_HEADER_BANNER_YES} /> {L_YES} <input type="radio" name="header_banner" value="0" {S_HEADER_BANNER_NO} /> {L_NO}</td> ! </tr> <tr> ! <td class="row1" width="50%">{L_STATS_LIST}<br /><span class="gensmall">{L_STATS_LIST_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="stats_list" value="1" {S_STATS_LIST_YES} /> {L_YES} <input type="radio" name="stats_list" value="0" {S_STATS_LIST_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_ARTICLE_PAG}<br /><span class="gensmall">{L_ARTICLE_PAG_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="post" type="text" name="art_pagination" value="{ARTICLE_PAG}" size="5" maxlength="4" /></td> </tr> <tr> ! <td class="row1" width="50%">{L_COMMENTS_PAG}<br /><span class="gensmall">{L_COMMENTS_PAG_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="post" type="text" name="comments_pagination" value="{COMMENTS_PAG}" size="5" maxlength="4" /></td> ! </tr> <tr> ! <td class="row1" width="50%">{L_NEWS_SORT}</td> ! <td class="row2" width="50%">{NEWS_SORT} </td> ! </tr> <tr> ! <td class="row1" width="50%">{L_NEWS_SORT_PAR}</td> ! <td class="row2" width="50%">{NEWS_SORT_PAR} </td> ! </tr> <tr> ! <td class="row1" width="50%">{L_WYSIWYG}<br /><span class="gensmall">{L_WYSIWYG_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="wysiwyg" value="1" {S_WYSIWYG_YES} /> {L_YES} <input type="radio" name="wysiwyg" value="0" {S_WYSIWYG_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_WYSIWYG_PATH}<br /><span class="gensmall">{L_WYSIWYG_PATH_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input text="text" name="wysiwyg_path" value="{WYSIWYG_PATH}" size="20" maxlength="50" /></td> </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_HTML}<br /><span class="gensmall">{L_ALLOW_HTML_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="radio" type="radio" name="allow_html" value="1" {S_ALLOW_HTML_YES} /> {L_YES} <input type="radio" name="allow_html" value="0" {S_ALLOW_HTML_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_ALLOWED_HTML_TAGS}<br /><span class="gensmall">{L_ALLOWED_HTML_TAGS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input text="text" name="allowed_html_tags" value="{ALLOWED_HTML_TAGS}" size="15" maxlength="50" /></td> </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_BBCODE}<br /><span class="gensmall">{L_ALLOW_BBCODE_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_bbcode" value="1" {S_ALLOW_BBCODE_YES} /> {L_YES} <input type="radio" name="allow_bbcode" value="0" {S_ALLOW_BBCODE_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_SMILIES}<br /><span class="gensmall">{L_ALLOW_SMILIES_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_smilies" value="1" {S_ALLOW_SMILIES_YES} /> {L_YES} <input type="radio" name="allow_smilies" value="0" {S_ALLOW_SMILIES_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_FORMATTING_FIXUP}<br /><span class="gensmall">{L_FORMATTING_FIXUP_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="formatting_fixup" value="1" {S_FORMATTING_FIXUP_YES} /> {L_YES} <input type="radio" name="formatting_fixup" value="0" {S_FORMATTING_FIXUP_NO} /> {L_NO}</td> </tr> <tr> ! <th class="thHead" colspan="2">{L_COMMENTS_INFO}</th> </tr> - <tr> <td class="row1" width="50%">{L_USE_COMMENTS}<br /><span class="gensmall">{L_USE_COMMENTS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="use_comments" value="1" {S_USE_COMMENTS_YES} /> {L_YES} <input type="radio" name="use_comments" value="0" {S_USE_COMMENTS_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_COMMENTS_SHOW}<br /><span class="gensmall">{L_COMMENTS_SHOW_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="comments_show" value="1" {S_COMMENTS_SHOW_YES} /> {L_YES} <input type="radio" name="comments_show" value="0" {S_COMMENTS_SHOW_NO} /> {L_NO}</td> ! </tr> <tr> ! <td class="row1" width="50%">{L_BUMP_POST}<br /><span class="gensmall">{L_BUMP_POST_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="bump_post" value="1" {S_BUMP_POST_YES} /> {L_YES} <input type="radio" name="bump_post" value="0" {S_BUMP_POST_NO} /> {L_NO}</td> </tr> <tr> <td class="row1" width="50%">{L_DEL_TOPIC}<br /><span class="gensmall">{L_DEL_TOPIC_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="del_topic" value="1" {S_DEL_TOPIC_YES} /> {L_YES} <input type="radio" name="del_topic" value="0" {S_DEL_TOPIC_NO} /> {L_NO}</td> </tr> <tr> ! <th class="thHead" colspan="2">{L_RATINGS_INFO}</th> </tr> - <tr> <td class="row1" width="50%">{L_USE_RATINGS}<br /><span class="gensmall">{L_USE_RATINGS_EXPLAIN}</span></td> --- 6,196 ---- <table width="100%" cellpadding="3" cellspacing="1" border="0" align="center" class="forumline"> <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_GENERAL_TITLE}</th> </tr> <tr> ! <td class="row1" width="50%">{L_MODULE_NAME}<br /><span class="gensmall">{L_MODULE_NAME_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input text="text" name="module_name" value="{MODULE_NAME}" size="20" maxlength="50" /></td> </tr> <tr> ! <td class="row1" width="50%">{L_ENABLE_MODULE}<br /><span class="gensmall">{L_ENABLE_MODULE_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="enable_module" value="1" {S_ENABLE_MODULE_YES} /> {L_YES} <input type="radio" name="enable_module" value="0" {S_ENABLE_MODULE_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_WYSIWYG_PATH}<br /><span class="gensmall">{L_WYSIWYG_PATH_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input text="text" name="wysiwyg_path" value="{WYSIWYG_PATH}" size="20" maxlength="50" /></td> </tr> <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_ARTICLE_TITLE}</th> ! </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_WYSIWYG}<br /><span class="gensmall">{L_ALLOW_WYSIWYG_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_wysiwyg" value="1" {S_ALLOW_WYSIWYG_YES} /> {L_YES} <input type="radio" name="allow_wysiwyg" value="0" {S_ALLOW_WYSIWYG_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_HTML}<br /><span class="gensmall">{L_ALLOW_HTML_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="radio" type="radio" name="allow_html" value="1" {S_ALLOW_HTML_YES} /> {L_YES} <input type="radio" name="allow_html" value="0" {S_ALLOW_HTML_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_ALLOWED_HTML_TAGS}<br /><span class="gensmall">{L_ALLOWED_HTML_TAGS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input text="text" name="allowed_html_tags" value="{ALLOWED_HTML_TAGS}" size="15" maxlength="50" /></td> ! </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_BBCODE}<br /><span class="gensmall">{L_ALLOW_BBCODE_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_bbcode" value="1" {S_ALLOW_BBCODE_YES} /> {L_YES} <input type="radio" name="allow_bbcode" value="0" {S_ALLOW_BBCODE_NO} /> {L_NO}</td> ! </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_SMILIES}<br /><span class="gensmall">{L_ALLOW_SMILIES_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_smilies" value="1" {S_ALLOW_SMILIES_YES} /> {L_YES} <input type="radio" name="allow_smilies" value="0" {S_ALLOW_SMILIES_NO} /> {L_NO}</td> ! </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_IMAGES}<br /><span class="gensmall">{L_ALLOW_IMAGES_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_images" value="1" {S_ALLOW_IMAGES_YES} /> {L_YES} <input type="radio" name="allow_images" value="0" {S_ALLOW_IMAGES_NO} /> {L_NO}</td> </tr> + <tr> + <td class="row1">{L_IMAGES_MESSAGE}<br><span class="gensmall">{L_IMAGES_MESSAGE_EXPLAIN}</span></td> + <td class="row2"><input type="text" class="post" size="50" name="no_image_message" value="{MESSAGE_IMAGE}" /></td> + </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_LINKS}<br /><span class="gensmall">{L_ALLOW_LINKS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_links" value="1" {S_ALLOW_LINKS_YES} /> {L_YES} <input type="radio" name="allow_links" value="0" {S_ALLOW_LINKS_NO} /> {L_NO}</td> </tr> + <tr> + <td class="row1">{L_LINKS_MESSAGE}<br><span class="gensmall">{L_LINKS_MESSAGE_EXPLAIN}</span></td> + <td class="row2"><input type="text" class="post" size="50" name="no_link_message" value="{MESSAGE_LINK}" /></td> + </tr> <tr> ! <td class="row1" width="50%">{L_FORMAT_WORDWRAP}<br /><span class="gensmall">{L_FORMAT_WORDWRAP_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="formatting_wordwrap" value="1" {S_FORMAT_WORDWRAP_YES} /> {L_YES} <input type="radio" name="formatting_wordwrap" value="0" {S_FORMAT_WORDWRAP_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_FORMAT_IMAGE_RESIZE}<br><span class="gensmall">{L_FORMAT_IMAGE_RESIZE_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="formatting_image_resize" value="{FORMAT_IMAGE_RESIZE}" /></td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_FORMAT_TRUNCATE_LINKS}<br /><span class="gensmall">{L_FORMAT_TRUNCATE_LINKS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="formatting_truncate_links" value="1" {S_FORMAT_TRUNCATE_LINKS_YES} /> {L_YES} <input type="radio" name="formatting_truncate_links" value="0" {S_FORMAT_TRUNCATE_LINKS_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_MAX_SUBJECT_CHAR}<br><span class="gensmall">{L_MAX_SUBJECT_CHAR_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="max_subject_chars" value="{MAX_SUBJECT_CHAR}" /></td> ! </tr> ! <tr> ! <td class="row1">{L_MAX_DESC_CHAR}<br><span class="gensmall">{L_MAX_DESC_CHAR_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="max_desc_chars" value="{MAX_DESC_CHAR}" /></td> ! </tr> ! <tr> ! <td class="row1">{L_MAX_CHAR}<br><span class="gensmall">{L_MAX_CHAR_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="max_chars" value="{MAX_CHAR}" /></td> ! </tr> ! <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_APPEARANCE_TITLE}</th> </tr> <tr> ! <td class="row1" width="50%">{L_STATS_LIST}<br /><span class="gensmall">{L_STATS_LIST_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="stats_list" value="1" {S_STATS_LIST_YES} /> {L_YES} <input type="radio" name="stats_list" value="0" {S_STATS_LIST_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_HEADER_BANNER}<br /><span class="gensmall">{L_HEADER_BANNER_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="header_banner" value="1" {S_HEADER_BANNER_YES} /> {L_YES} <input type="radio" name="header_banner" value="0" {S_HEADER_BANNER_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_PAGINATION}<br /><span class="gensmall">{L_PAGINATION_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="post" type="text" name="pagination" value="{PAGINATION}" size="5" maxlength="4" /></td> </tr> <tr> ! <td class="row1" width="50%">{L_SORT_METHOD}<br /><span class="gensmall">{L_SORT_METHOD_EXPLAIN}</span></td> ! <td class="row2" width="50%">{SORT_METHOD} </td> </tr> <tr> ! <td class="row1" width="50%">{L_SORT_ORDER}<br /><span class="gensmall">{L_SORT_ORDER_EXPLAIN}</span></td> ! <td class="row2" width="50%">{SORT_ORDER} </td> </tr> <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_COMMENTS_TITLE}<br /><span class="gensmall">{L_COMMENTS_TITLE_EXPLAIN}</span></th> </tr> <tr> <td class="row1" width="50%">{L_USE_COMMENTS}<br /><span class="gensmall">{L_USE_COMMENTS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="use_comments" value="1" {S_USE_COMMENTS_YES} /> {L_YES} <input type="radio" name="use_comments" value="0" {S_USE_COMMENTS_NO} /> {L_NO}</td> ! </tr> <tr> ! <td class="row1" width="50%">{L_INTERNAL_COMMENTS}<br /><span class="gensmall">{L_INTERNAL_COMMENTS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="internal_comments" value="1" {S_INTERNAL_COMMENTS_INTERNAL} /> {L_INTERNAL_COMMENTS_INTERNAL} <input type="radio" name="internal_comments" value="0" {S_INTERNAL_COMMENTS_PHPBB} /> {L_INTERNAL_COMMENTS_PHPBB}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_COMMENTS_PAG}<br /><span class="gensmall">{L_COMMENTS_PAG_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="post" type="text" name="comments_pagination" value="{COMMENTS_PAG}" size="5" maxlength="4" /></td> ! </tr> <tr> ! <td class="row1" width="50%">{L_AUTOGENERATE_COMMENTS}<br /><span class="gensmall">{L_AUTOGENERATE_COMMENTS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="autogenerate_comments" value="1" {S_AUTOGENERATE_COMMENTS_YES} /> {L_YES} <input type="radio" name="autogenerate_comments" value="0" {S_AUTOGENERATE_COMMENTS_NO} /> {L_NO}</td> </tr> <tr> <td class="row1" width="50%">{L_DEL_TOPIC}<br /><span class="gensmall">{L_DEL_TOPIC_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="del_topic" value="1" {S_DEL_TOPIC_YES} /> {L_YES} <input type="radio" name="del_topic" value="0" {S_DEL_TOPIC_NO} /> {L_NO}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_ALLOW_COMMENT_WYSIWYG}<br /><span class="gensmall">{L_ALLOW_COMMENT_WYSIWYG_EXPLAIN}</span></td> + <td class="row2" width="50%"><input type="radio" name="allow_comment_wysiwyg" value="1" {S_ALLOW_COMMENT_WYSIWYG_YES} /> {L_YES} <input type="radio" name="allow_comment_wysiwyg" value="0" {S_ALLOW_COMMENT_WYSIWYG_NO} /> {L_NO}</td> </tr> <tr> ! <td class="row1" width="50%">{L_ALLOW_COMMENT_HTML}<br /><span class="gensmall">{L_ALLOW_COMMENT_HTML_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input class="radio" type="radio" name="allow_comment_html" value="1" {S_ALLOW_COMMENT_HTML_YES} /> {L_YES} <input type="radio" name="allow_comment_html" value="0" {S_ALLOW_COMMENT_HTML_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_ALLOWED_COMMENT_HTML_TAGS}<br /><span class="gensmall">{L_ALLOWED_HTML_TAGS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input text="text" name="allowed_comment_html_tags" value="{ALLOWED_COMMENT_HTML_TAGS}" size="15" maxlength="50" /></td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_ALLOW_COMMENT_BBCODE}<br /><span class="gensmall">{L_ALLOW_BBCODE_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_comment_bbcode" value="1" {S_ALLOW_COMMENT_BBCODE_YES} /> {L_YES} <input type="radio" name="allow_comment_bbcode" value="0" {S_ALLOW_COMMENT_BBCODE_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_ALLOW_COMMENT_SMILIES}<br /><span class="gensmall">{L_ALLOW_SMILIES_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_comment_smilies" value="1" {S_ALLOW_COMMENT_SMILIES_YES} /> {L_YES} <input type="radio" name="allow_comment_smilies" value="0" {S_ALLOW_COMMENT_SMILIES_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_ALLOW_COMMENT_IMAGES}<br /><span class="gensmall">{L_ALLOW_IMAGES_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_comment_images" value="1" {S_ALLOW_COMMENT_IMAGES_YES} /> {L_YES} <input type="radio" name="allow_comment_images" value="0" {S_ALLOW_COMMENT_IMAGES_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_COMMENT_IMAGES_MESSAGE}<br><span class="gensmall">{L_COMMENT_IMAGES_MESSAGE_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="no_comment_image_message" value="{COMMENT_MESSAGE_IMAGE}" /></td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_ALLOW_COMMENT_LINKS}<br /><span class="gensmall">{L_ALLOW_COMMENT_LINKS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_comment_links" value="1" {S_ALLOW_COMMENT_LINKS_YES} /> {L_YES} <input type="radio" name="allow_comment_links" value="0" {S_ALLOW_COMMENT_LINKS_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_COMMENT_LINKS_MESSAGE}<br><span class="gensmall">{L_COMMENT_LINKS_MESSAGE_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="no_comment_link_message" value="{COMMENT_MESSAGE_LINK}" /></td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_COMMENT_FORMAT_WORDWRAP}<br /><span class="gensmall">{L_COMMENT_FORMAT_WORDWRAP_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="formatting_comment_wordwrap" value="1" {S_COMMENT_FORMAT_WORDWRAP_YES} /> {L_YES} <input type="radio" name="formatting_comment_wordwrap" value="0" {S_COMMENT_FORMAT_WORDWRAP_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_COMMENT_FORMAT_IMAGE_RESIZE}<br><span class="gensmall">{L_COMMENT_FORMAT_IMAGE_RESIZE_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="formatting_comment_image_resize" value="{COMMENT_FORMAT_IMAGE_RESIZE}" /></td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_COMMENT_FORMAT_TRUNCATE_LINKS}<br /><span class="gensmall">{L_COMMENT_FORMAT_TRUNCATE_LINKS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="formatting_comment_truncate_links" value="1" {S_COMMENT_FORMAT_TRUNCATE_LINKS_YES} /> {L_YES} <input type="radio" name="formatting_comment_truncate_links" value="0" {S_COMMENT_FORMAT_TRUNCATE_LINKS_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_COMMENT_MAX_SUBJECT_CHAR}<br><span class="gensmall">{L_COMMENT_MAX_SUBJECT_CHAR_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="max_comment_subject_chars" value="{COMMENT_MAX_SUBJECT_CHAR}" /></td> ! </tr> ! <tr> ! <td class="row1">{L_COMMENT_MAX_CHAR}<br><span class="gensmall">{L_COMMENT_MAX_CHAR_EXPLAIN}</span></td> ! <td class="row2"><input type="text" class="post" size="50" name="max_comment_chars" value="{COMMENT_MAX_CHAR}" /></td> ! </tr> ! <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_RATINGS_TITLE}<br /><span class="gensmall">{L_RATINGS_TITLE_EXPLAIN}</span></th> </tr> <tr> <td class="row1" width="50%">{L_USE_RATINGS}<br /><span class="gensmall">{L_USE_RATINGS_EXPLAIN}</span></td> *************** *** 108,114 **** <td class="row1" width="50%">{L_VOTES_CHECK_USERID}<br /><span class="gensmall">{L_VOTES_CHECK_USERID_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="votes_check_userid" value="1" {S_VOTES_CHECK_USERID_YES} /> {L_YES} <input type="radio" name="votes_check_userid" value="0" {S_VOTES_CHECK_USERID_NO} /> {L_NO}</td> ! </tr> <tr> ! <th class="thHead" colspan="2">{L_PRE_TEXT_NAME}</th> </tr> <tr> --- 204,211 ---- <td class="row1" width="50%">{L_VOTES_CHECK_USERID}<br /><span class="gensmall">{L_VOTES_CHECK_USERID_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="votes_check_userid" value="1" {S_VOTES_CHECK_USERID_YES} /> {L_YES} <input type="radio" name="votes_check_userid" value="0" {S_VOTES_CHECK_USERID_NO} /> {L_NO}</td> ! </tr> <tr> ! <!-- TITLE ------------------------------------------------------------------------------------------- --> ! <th class="thHead" colspan="2"> {L_INSTRUCTIONS_TITLE}</th> </tr> <tr> *************** *** 123,126 **** --- 220,235 ---- <td class="row1" width="50%">{L_PRE_TEXT_BODY}</td> <td class="row2" width="50%"><textarea name="pt_body" cols="40" rows="5">{L_PT_BODY}</textarea></td> + </tr> + <tr> + <!-- TITLE ------------------------------------------------------------------------------------------- --> + <th class="thHead" colspan="2"> {L_NOTIFICATIONS_TITLE}</th> + </tr> + <tr> + <td class="row1" width="50%">{L_NOTIFY}<br /><span class="gensmall">{L_NOTIFY_EXPLAIN}</span></td> + <td class="row2" width="50%"><input type="radio" name="notify" value="0" {S_NOTIFY_NONE} />{L_NONE} <input type="radio" name="notify" value="2" {S_NOTIFY_EMAIL} />{L_EMAIL} <input type="radio" name="notify" value="1" {S_NOTIFY_PM} />{L_PM}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_NOTIFY_GROUP}<br /><span class="gensmall">{L_NOTIFY_GROUP_EXPLAIN}</span></td> + <td class="row2" width="50%">{NOTIFY_GROUP}</td> </tr> <tr> --- kb_rebuild_search.tpl DELETED --- Index: kb_cat_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_cat_admin_body.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_cat_admin_body.tpl 3 Nov 2005 12:13:34 -0000 1.5 --- kb_cat_admin_body.tpl 8 Dec 2005 15:04:26 -0000 1.6 *************** *** 1,5 **** ! <h1>{L_KB_CAT_TITLE}</h1> ! <p>{L_KB_CAT_DESCRIPTION}</p> <table width="100%" cellpadding="2" cellspacing="2" border="0"> --- 1,5 ---- ! <h1>{L_CAT_TITLE}</h1> ! <p>{L_CAT_EXPLAIN}</p> <table width="100%" cellpadding="2" cellspacing="2" border="0"> Index: kb_config.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_config.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_config.tpl 3 Nov 2005 12:13:34 -0000 1.3 --- kb_config.tpl 8 Dec 2005 15:04:26 -0000 1.4 *************** *** 10,14 **** <tr> <td class="row1" width="50%">{L_NEW_NAME}<br /><span class="gensmall">{L_NEW_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="allow_new" value="1" {S_NEW_YES} /> {L_YES} <input type="radio" name="allow_new" value="0" {S_NEW_NO} /> {L_NO}</td> </tr> <!-- --- 10,14 ---- <tr> <td class="row1" width="50%">{L_NEW_NAME}<br /><span class="gensmall">{L_NEW_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="enable_module" value="1" {S_NEW_YES} /> {L_YES} <input type="radio" name="enable_module" value="0" {S_NEW_NO} /> {L_NO}</td> </tr> <!-- |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:04:36
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3524/modules/mx_kb/language/lang_english Modified Files: lang_main.php Added Files: lang_admin.php Removed Files: lang_admin_rebuild_search.php Log Message: in progress commit for mx_kb --- lang_admin_rebuild_search.php DELETED --- Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_main.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang_main.php 25 Nov 2005 22:05:11 -0000 1.5 --- lang_main.php 8 Dec 2005 15:04:26 -0000 1.6 *************** *** 22,25 **** --- 22,26 ---- $lang['Article'] = 'Article'; $lang['Category'] = 'Category'; + $lang['Sub_categories'] = 'Sub Categories'; $lang['Article_description'] = 'Description'; $lang['Article_type'] = 'Type'; *************** *** 49,149 **** $lang['KB_title'] = 'Knowledge Base'; - $lang['KB_art_description'] = 'Here you can approve articles so users can view them, or you can delete articles.'; - $lang['Art_man'] = 'Article Manager'; - $lang['Cat_man'] = 'Category Manager'; - $lang['KB_cat_description'] = 'Here you can add, edit, or delete categories in the Knowledge Base'; - $lang['Art_action'] = 'Action'; - - //approve - $lang['Art_edit'] = 'Edited Articles'; - $lang['Art_not_approved'] = 'Not Approved'; - $lang['Art_approved'] = 'Approved'; - $lang['Approve'] = 'Approve'; - $lang['Un_approve'] = 'Un-Approve'; - $lang['Article_approved'] = 'Article is now Approved.'; - $lang['Article_unapproved'] = 'Article is now Unapproved.'; - - //delete - $lang['Delete'] = 'Delete'; - $lang['Confirm_art_delete'] = 'Are you sure you want to delete this article?'; - $lang['Confirm_art_delete_yes'] = '%sYes, I want to delete this article%s'; - $lang['Confirm_art_delete_no'] = '%sNo, I don\'t want to delete this article%s'; - $lang['Article_deleted'] = 'Article Deleted Successfully.'; - - $lang['Click_return_article_manager'] = 'Click %sHere%s to return to the Article Manager'; - - //cat manager - $lang['Create_cat'] = 'Create New Category:'; - $lang['Create'] = 'Create'; - $lang['Cat_settings'] = 'Category Settings'; - $lang['Create_description'] = 'Here you can change the name of the category and add a description to the new category.'; - $lang['Cat_created'] = 'Category Created Successfully.'; - $lang['Click_return_cat_manager'] = 'Click %sHere%s to return to the ' . $lang['Cat_man']; - $lang['Edit_description'] = 'Here you can edit the settings of your category'; - $lang['Edit_cat'] = 'Edit Category'; - $lang['Cat_edited'] = 'Category Edited Successfully.'; - $lang['Parent'] = 'Parent'; - - $lang['Cat_delete_title'] = 'Delete Category'; - $lang['Cat_delete_desc'] = 'Here you can delete a category and move all of the articles in it to a new category'; - $lang['Cat_deleted'] = 'Category Deleted Successfully.'; - $lang['Delete_all_articles'] = 'Delete Articles'; - - //configuration - $lang['KB_config'] = 'KB Configuration'; - $lang['Art_types'] = 'Article Types'; - $lang['KB_config_title'] = 'Knowledge Base Configuration'; - $lang['KB_config_explain'] = 'Change the configuration of your Knowledge Base'; - $lang['New_title'] = 'Allow New Articles'; - $lang['New_explain'] = 'Let users post new articles on in your Knowledge Base'; - $lang['Edit_name'] = 'Allow Editing'; - $lang['Edit_explain'] = 'Allow users to edit their articles after posting them'; - $lang['Notify_name'] = 'Notify me by'; - $lang['Notify_explain'] = 'Choose which way to receive notices that new articles have been posted'; - $lang['PM'] = 'PM'; - $lang['Click_return_kb_config'] = 'Click %sHere%s to return to Knowledge Base Configuration'; - $lang['Admin_id_name'] = 'Admin ID'; - $lang['Admin_id_explain'] = 'This is the user id number that PM notifications will be sent to.'; - $lang['Approve_new_name'] = 'Approve new Articles'; - $lang['Approve_new_explain'] = 'Change whether <b>new</b> articles need to be approved or not'; - $lang['Approve_edit_name'] = 'Approve Edited Articles'; - $lang['Approve_edit_explain'] = 'Change whether <b>edited</b> articles need to be approved or not'; - $lang['Allow_anon_name'] = 'Allow anonymous posting of articles'; - $lang['Allow_anon_explain'] = 'Change whether <b>new</b> articles can be submitted anonymously'; - $lang['Del_topic'] = 'Delete Topic'; - $lang['Del_topic_explain'] = 'When you delete an article, do you want its comments topic to be deleted also?'; - - $lang['Use_comments'] = 'Comments'; - $lang['Use_comments_explain'] = 'Enable comments for articles, to be inserted in the forum'; - $lang['Use_ratings'] = 'Ratings'; - $lang['Use_ratings_explain'] = 'Enable ratings for articles'; - - $lang['Forum_id'] = 'Forum ID'; - $lang['Forum_id_explain'] = 'This is the forum that the article\'s comments will be kept'; - - - // - // Permissions - // - $lang['KB_Auth_Title'] = 'KB Permissions'; - $lang['KB_Auth_Explain'] = 'Here you can choose which usergroup(s) can be the moderators for each KB category, or just has the private access'; - $lang['Select_a_Category'] = 'Select a Category'; - $lang['Look_up_Category'] = 'Look up Category'; - $lang['KB_Auth_successfully'] = 'Auth has been updated successfully'; - $lang['Click_return_KB_auth'] = 'Click %sHere%s to return to the KB Permissions'; - - $lang['Upload'] = 'Upload'; - $lang['Rate'] = 'Rate'; - $lang['Comment'] = 'Comment'; - $lang['Approval'] = 'Approval'; - $lang['Approval_edit'] = 'Approval Edit'; - - $lang['Allow_rating'] = 'Allow ratings'; - $lang['Allow_rating_explain'] = 'Users are allowed to rate articles.'; - - $lang['Allow_anonymos_rating'] = 'Allow anonymous ratings'; - $lang['Allow_anonymos_rating_explain'] = 'If ratings are activated, allow anonymous users to add ratings to your articles'; - - $lang['KB_config_updated'] = 'Knowledge Base Configuration Updated Successfully.'; $lang['KB_notify_subject_new'] = 'New Article!'; --- 50,53 ---- *************** *** 153,168 **** $lang['KB_notify_body'] = 'An article has been submitted or modified:'; - $lang['Category_Permissions'] = 'Category Permissions'; - $lang['Category_Title'] = 'Category Title'; - $lang['Category_Desc'] = 'Category Description'; - $lang['View_level'] = 'View Level'; - $lang['Upload_level'] = 'Upload Level'; - $lang['Rate_level'] = 'Rate Level'; - $lang['Comment_level'] = 'Comment Level'; - $lang['Edit_level'] = ' Edit Level'; - $lang['Delete_level'] = 'Delete Level'; - $lang['Approval_level'] = 'Approval Level'; - $lang['Approval_edit_level'] = 'Approval Edit Level'; - $lang['KB_Rules_post_can'] = 'You <b>can</b> post new articles in this category'; $lang['KB_Rules_post_cannot'] = 'You <b>cannot</b> post new articles in this category'; --- 57,60 ---- *************** *** 182,230 **** $lang['KB_Rules_moderate_can'] = 'You <b>can</b> moderate this category'; // %s replaced by a href links, do not remove! - $lang['Comments_show'] = 'Display article comments.'; - $lang['Comments_show_explain'] = '- also displays comments in the article page'; - $lang['Comments_show_title'] = 'User comments'; - - $lang['Mod_group'] = 'KB Moderator Group'; - $lang['Mod_group_explain'] = '- with KB Admin permissions!'; - - $lang['Bump_post'] = 'Bumping article post'; - $lang['Bump_post_explain'] = 'When editing an article, a reply is posted in the article topic notifying of the updated article.'; - - $lang['Stats_list'] = 'Show KB Stats'; - $lang['Stats_list_explain'] = 'Show KB stats in the header.'; - - $lang['Header_banner'] = 'Show Top Logo'; - $lang['Header_banner_explain'] = 'Show KB logo in the header.'; - - $lang['Comment_info'] = 'Comments settings'; - $lang['Rating_info'] = 'Ratings settings'; - - - //types - $lang['Types_man'] = 'Types Manager'; - $lang['KB_types_description'] = 'Here you can add, delete, and/or edit the different article types'; - $lang['Create_type'] = 'Create new Article Type:'; - $lang['Type_created'] = 'Article Type Created Successfully.'; - $lang['Click_return_type_manager'] = 'Click %sHere%s to return to the Types Manager'; - - $lang['Edit_type'] = 'Edit Type'; - $lang['Edit_type_description'] = 'Here you can edit the name of the type'; - $lang['Type_edited'] = 'Article Type Edited Successfully.'; - - $lang['Type_delete_title'] = 'Delete Article Type'; - $lang['Type_delete_desc'] = 'Here you can change what the article type is of the articles that have the type you are deleting.'; - $lang['Change_type'] = 'Change article\'s type to'; - $lang['Change_and_Delete'] = 'Change and Delete'; - $lang['Type_deleted'] = 'Article Type Deleted Successfully.'; - - $lang['Pre_text_name'] = 'Article Submission Instructions'; - $lang['Pre_text_header'] = 'Article Submission Instructions Header'; - $lang['Pre_text_body'] = 'Article Submission Instructions Body'; - $lang['Pre_text_explain'] = 'This is the instruction text displayed to users at the top of the submission forum.'; - - $lang['Show'] = 'Show'; - $lang['Hide'] = 'Hide'; - $lang['Empty_fields'] ='Please fill out all parts of the form.'; $lang['Empty_fields_return'] ='Click %sHere%s to return to the form.'; --- 74,77 ---- *************** *** 247,251 **** $lang['Edited_Article_info'] = 'Article updated by '; ! $lang['No_Articles'] = 'This category is empty!'; $lang['Not_authorized'] = 'Sorry, you are not authorized!'; $lang['TOC'] = 'Contents'; --- 94,98 ---- $lang['Edited_Article_info'] = 'Article updated by '; ! $lang['No_Articles'] = 'There are no articles in this cateogry!'; $lang['Not_authorized'] = 'Sorry, you are not authorized!'; $lang['TOC'] = 'Contents'; *************** *** 280,302 **** $lang['Top_latest'] = 'Latest Articles'; - // Votes check - $lang['Votes_check_ip'] = 'Validate ratings - IP'; - $lang['Votes_check_ip_explain'] = 'Only one vote per IP address is permitted.'; - - $lang['Votes_check_userid'] = 'Validate ratings - User'; - $lang['Votes_check_userid_explain'] = 'Users may only vote once.'; - - $lang['Article_pag'] = 'Article pagination'; - $lang['Article_pag_explain'] = 'The number of articles to show in a (stats) category before pagination.'; - - $lang['Comments_pag'] = 'Comments pagination'; - $lang['Comments_pag_explain'] = 'The number of comments to show for the article before pagination.'; - - $lang['News_sort'] = 'Article sort method'; - $lang['News_sort_explain'] = 'Define how articles are sorted within its category.'; - - $lang['News_sort_par'] = 'ASC or DESC sorting'; - $lang['News_sort_par_explain'] = ''; - // // General strings from the news admin panel --- 127,130 ---- *************** *** 314,352 **** $lang['News_update_error'] = "Couldn't update KB block configuration.<br /><br />This mod is designed for MySQL, so please contact the author if you have troubles. If you can offer a translation of the SQL into other database formats, please send them to:<br />"; - // Custom Field - $lang['Fieldselecttitle'] = 'Select what to do'; - $lang['Afield'] = 'Custom Field: Add'; - $lang['Efield'] = 'Custom Field: Edit'; - $lang['Dfield'] = 'Custom Field: Delete'; - $lang['Mfieldtitle'] = 'Custom Fields'; - $lang['Afieldtitle'] = 'Add Field'; - $lang['Efieldtitle'] = 'Edit Field'; - $lang['Dfieldtitle'] = 'Delete Field'; - $lang['Fieldexplain'] = 'You can use the custom fields management section to add, edit, and delete custom fields. You can use custom fields to add more information about an article.'; - $lang['Fieldname'] = 'Field Name'; - $lang['Fieldnameinfo'] = 'This is the name of the field, for example \'File Size\''; - $lang['Fielddesc'] = 'Field Description'; - $lang['Fielddescinfo'] = 'This is a description of the field, for example \'File Size in Megabytes\''; - $lang['Fieldadded'] = 'The custom field has been successfully added'; - $lang['Fieldedited'] = 'The custom field you selected has been successfully edited'; - $lang['Dfielderror'] = 'You didn\'t select any fields to delete'; - $lang['Fieldsdel'] = 'The custom fields you selected have been successfully deleted'; - - $lang['Field_data'] = 'Options'; - $lang['Field_data_info'] = 'Enter the options that the user can choose from. Separate each option with a newline (carriage return).'; - $lang['Field_regex'] = 'Regular Expression'; - $lang['Field_regex_info'] = 'You may require the input field to match a regular expression %s(PCRE)%s.'; - $lang['Field_order'] = 'Display Order'; - - //Fields Types - $lang['Field_Input'] = 'Single-Line Text Box'; - $lang['Field_Textarea'] = 'Multiple-Line Text Box'; - $lang['Field_Radio'] = 'Single-Selection Radio Buttons'; - $lang['Field_Select'] = 'Single-Selection Menu'; - $lang['Field_Select_multiple'] = 'Multiple-Selection Menu'; - $lang['Field_Checkbox'] = 'Multiple-Selection Checkbox'; - - $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; // added --- 142,146 ---- *************** *** 375,388 **** // Added for v. 2.0 - $lang['KB_comment_prefix'] = '[ KB ] '; - - $lang['Wysiwyg'] = 'Use WYSIWYG editor'; - $lang['Wysiwyg_explain'] = 'If enabled, the standard BBCode/HTML/Smilies input dialog is replaced by a WYSIWYG editor.'; - - $lang['Wysiwyg_path'] = 'Path to WYSIWYG software'; - $lang['Wysiwyg_path_explain'] = 'This is the path (from mxBB/phpBB root) to the WYSIWYG software folder, eg \'modules/\' if you have uploaded, for example, TinyMCE in modules/tinymce.'; - - $lang['Formatting_fixup'] = 'Fixup formatting'; - $lang['Formatting_fixup_explain'] = 'If enabled, the article text is reformatted: word wrapping, URL truncation, image resizing, some BBCode reformatting, etc.'; $lang['Addtional_field'] = 'More information (optional)'; --- 169,172 ---- *************** *** 391,396 **** // Quick Nav ! $lang['Quick_nav'] = 'Quick KB Navigation'; ! $lang['Quick_jump'] = 'Go'; ?> \ No newline at end of file --- 175,217 ---- // Quick Nav ! $lang['Quick_nav'] = 'Quick Navigation'; ! $lang['Quick_jump'] = 'Select Category'; ! $lang['Quick_go'] = 'Go'; ! ! // Search ! $lang['Search'] = 'Search'; ! $lang['Search_results'] = 'Search Results'; ! $lang['Search_for'] = 'Search for'; ! $lang['Results'] = 'Results for'; ! $lang['No_matches'] = 'Sorry, no matches were found for'; ! $lang['Matches'] = 'matches were found for'; ! $lang['All'] = 'All Categories'; ! $lang['Choose_cat'] = 'Choose Category:'; ! $lang['Include_comments'] = 'Include Comments'; ! $lang['Submiter'] = 'Submited by'; ! ! // Comments ! $lang['Comments'] = 'Comments'; ! $lang['Comments_title'] = 'Comments Title'; ! $lang['Comment_subject'] = 'Comment subject'; ! $lang['Comment'] = 'Comment'; ! $lang['Comment_explain'] = 'Use the text box above to give your opinion on this file!'; ! $lang['Comment_add'] = 'Add Comment'; ! $lang['Comment_delete'] = 'Delete'; ! $lang['Comment_posted'] = 'Your comment has been entered successfully'; ! $lang['Comment_deleted'] = 'The comment you selected has been deleted successfully'; ! $lang['Comment_desc'] = 'Title'; ! $lang['No_comments'] = 'No Comments have been posted yet.'; ! $lang['Links_are_ON'] = 'Links is <u>ON</u>'; ! $lang['Links_are_OFF'] = 'Links is <u>OFF</u>'; ! $lang['Images_are_ON'] = 'Images is <u>ON</u>'; ! $lang['Images_are_OFF'] = 'Images is <u>OFF</u>'; ! $lang['Check_message_length'] = 'Check Message Length'; ! $lang['Msg_length_1'] = 'Your message is '; ! $lang['Msg_length_2'] = ' characters long.'; ! $lang['Msg_length_3'] = 'You have '; ! $lang['Msg_length_4'] = ' characters available.';; ! $lang['Msg_length_5'] = 'There are '; ! $lang['Msg_length_6'] = ' characters left to use.'; ?> \ No newline at end of file --- NEW FILE: lang_admin.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: lang_admin.php,v 1.1 2005/12/08 15:04:26 jonohlsson Exp $ */ /** * 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. */ // // adminCP index // $lang['KB_title'] = 'Knowledge Base'; $lang['1_Configuration'] = 'General Settings'; $lang['2_Cat_man'] = 'Category Manager'; $lang['3_Art_man'] = 'Article Manager'; $lang['4_Permissions'] = 'Permissions'; $lang['5_Types_man'] = 'Types Manager'; $lang['6_Custom_Field'] = 'Custom Fields'; $lang['7_Optimize_tables'] = 'Optimize Search Table'; // // Parameter Types // $lang['ParType_kb_type_select'] = "Advanced phpBB Source Forum Selection"; $lang['ParType_kb_type_select_info'] = ""; $lang['ParType_default_article_id'] = "Default Article"; $lang['ParType_default_article_id_info'] = "- Article Reader"; // // Parameter Names // $lang['kb_type_select'] = "KB Source:"; $lang['kb_type_select_explain'] = "Select Source KB categories and article types"; $lang['default_article_id'] = "Default Article:"; $lang['default_article_id_explain'] = "- This article is default (first) displayed if noone else is chosen"; // // Admin Panels - Configuration // $lang['Panel_config_title'] = 'Knowledge Base Configuration'; $lang['Panel_config_explain'] = 'Change the configuration of your Knowledge Base'; // // General // $lang['General_title'] = 'General'; $lang['Module_name'] = 'Module name'; $lang['Module_name_explain'] = ''; $lang['Enable_module'] = 'Enable this module'; $lang['Enable_module_explain'] = 'Let users view and post new articles on in your Knowledge Base.'; $lang['Wysiwyg_path'] = 'Path to WYSIWYG software'; $lang['Wysiwyg_path_explain'] = 'This is the path (from mxBB/phpBB root) to the WYSIWYG software folder, eg \'modules/\' if you have uploaded, for example, TinyMCE in modules/tinymce.'; // // Article // $lang['Article_title'] = 'Article'; // // Appearance // $lang['Appearance_title'] = 'Appearance'; $lang['Article_pag'] = 'Article pagination'; $lang['Article_pag_explain'] = 'The number of articles to show in a (stats) category before pagination.'; $lang['Sort_method'] = 'Sorting method'; $lang['Sort_method_explain'] = 'Define how articles are sorted within its category.'; $lang['Sort_order'] = 'ASC or DESC sorting'; $lang['Sort_order_explain'] = ''; $lang['Stats_list'] = 'Show KB Stats links'; $lang['Stats_list_explain'] = 'Show KB stats links in the header.'; $lang['Header_banner'] = 'Show Top Logo'; $lang['Header_banner_explain'] = 'Show KB logo in the header.'; // // Comments // $lang['Comments_title'] = 'Comments'; $lang['Comments_title_explain'] = 'Some comments settings are default settings, and can be overridden per category'; $lang['Use_comments'] = 'Comments'; $lang['Use_comments_explain'] = 'Enable comments for articles, to be inserted in the forum'; $lang['Internal_comments'] = 'Internal or phpBB Comments'; $lang['Internal_comments_explain'] = 'Use internal comments, or phpBB comments'; $lang['Internal_comments_phpBB'] = 'phpBB Comments'; $lang['Internal_comments_internal'] = 'Internal Comments'; $lang['Forum_id'] = 'phpBB Forum ID'; $lang['Forum_id_explain'] = 'If phpBB comments are used, this is the forum where the comments will be kept'; $lang['Autogenerate_comments'] = 'Autogenerate comments when articles are managed'; $lang['Autogenerate_comments_explain'] = 'When editing/adding an article, a notifying reply is posted in the article topic.'; $lang['Del_topic'] = 'Delete Topic'; $lang['Del_topic_explain'] = 'When you delete an article, do you want its comments topic to be deleted also?'; $lang['Comments_pag'] = 'Comments pagination'; $lang['Comments_pag_explain'] = 'The number of comments to show for the article before pagination.'; $lang['Allow_Wysiwyg'] = 'Use WYSIWYG editor'; $lang['Allow_Wysiwyg_explain'] = 'If enabled, the standard BBCode/HTML/Smilies input dialog is replaced by a WYSIWYG editor.'; $lang['Allow_links'] = 'Allow Links'; $lang['Allow_links_message'] = 'Default \'No Links\' Message'; $lang['Allow_links_explain'] = 'If links are not allowed this text will be displayed instead'; $lang['Allow_images'] = 'Allow Images'; $lang['Allow_images_message'] = 'Default \'No Images\' Message'; $lang['Allow_images_explain'] = 'If images are not allowed this text will be displayed instead'; $lang['Max_subject_char'] = 'Maximum Number of charcters in subject'; $lang['Max_subject_char_explain'] = 'If to big, you get an error message (Limit the subject).'; $lang['Max_desc_char'] = 'Maximum Number of charcters in description'; $lang['Max_desc_char_explain'] = 'If to big, you get an error message (Limit the subject).'; $lang['Max_char'] = 'Maximum Number of charcters in text'; $lang['Max_char_explain'] = 'If to big, you get an error message (Limit the comment).'; $lang['Format_wordwrap'] = 'Word wrapping'; $lang['Format_wordwrap_explain'] = 'Text control filter'; $lang['Format_truncate_links'] = 'Truncate Links'; $lang['Format_truncate_links_explain'] = 'Links are shortened, eg t ex \'www.mxbb-portal...\''; $lang['Format_image_resize'] = 'Image resize'; $lang['Format_image_resize_explain'] = 'Resize images to this width (pixels)'; // // Ratings // $lang['Ratings_title'] = 'Ratings'; $lang['Ratings_title_explain'] = 'Some ratings settings are default settings, and can be overridden per category'; $lang['Use_ratings'] = 'Ratings'; $lang['Use_ratings_explain'] = 'Enable ratings'; $lang['Votes_check_ip'] = 'Validate ratings - IP'; $lang['Votes_check_ip_explain'] = 'Only one vote per IP address is permitted.'; $lang['Votes_check_userid'] = 'Validate ratings - User'; $lang['Votes_check_userid_explain'] = 'Users may only vote once.'; // // Instructions // $lang['Instructions_title'] = 'User Instructions'; $lang['Pre_text_name'] = 'Article Submission Instructions'; $lang['Pre_text_explain'] = 'Activate Submission Instructions displayed to users at the top of the submission forum.'; $lang['Pre_text_header'] = 'Article Submission Instructions Header'; $lang['Pre_text_body'] = 'Article Submission Instructions Body'; $lang['Show'] = 'Show'; $lang['Hide'] = 'Hide'; // // Notifications // $lang['Notifications_title'] = 'Notification'; $lang['Notify'] = 'Notify admin by'; $lang['Notify_explain'] = 'Choose which way to receive notices that new articles have been posted'; $lang['PM'] = 'PM'; $lang['Notify_group'] = 'and groupmembers '; $lang['Notify_group_explain'] = 'Also send notification to members in this group'; $lang['Click_return_kb_config'] = 'Click %sHere%s to return to Knowledge Base Configuration'; $lang['KB_config_updated'] = 'Knowledge Base Configuration Updated Successfully.'; $lang['KB_config'] = 'KB Configuration'; $lang['Art_types'] = 'Article Types'; $lang['Mod_group'] = 'KB Moderator Group'; $lang['Mod_group_explain'] = '- with KB Admin permissions!'; // // General // $lang['Article'] = 'Article'; $lang['Articles'] = 'Articles'; $lang['Article_description'] = 'Description'; $lang['Article_category'] = 'Category'; $lang['Category'] = 'Category'; $lang['Category_desc'] = 'Category description'; $lang['Article_type'] = 'Type'; $lang['Art_action'] = 'Action'; // // Admin Panels - Article // $lang['Panel_art_title'] = 'Article administration'; $lang['Panel_art_explain'] = 'Here you can approve articles so users can view them, or you can delete articles.'; //approve $lang['Art_edit'] = 'Edited Articles'; $lang['Art_not_approved'] = 'Not Approved'; $lang['Art_approved'] = 'Approved'; $lang['Approve'] = 'Approve'; $lang['Un_approve'] = 'Un-Approve'; $lang['Article_approved'] = 'Article is now Approved.'; $lang['Article_unapproved'] = 'Article is now Unapproved.'; //delete $lang['Delete'] = 'Delete'; $lang['Confirm_art_delete'] = 'Are you sure you want to delete this article?'; $lang['Confirm_art_delete_yes'] = '%sYes, I want to delete this article%s'; $lang['Confirm_art_delete_no'] = '%sNo, I don\'t want to delete this article%s'; $lang['Article_deleted'] = 'Article Deleted Successfully.'; $lang['Click_return_article_manager'] = 'Click %sHere%s to return to the Article Manager'; // // Admin Panels - Category // $lang['Panel_cat_title'] = 'Category administration'; $lang['Panel_cat_explain'] = 'Here you can add, edit, or delete categories in the Knowledge Base'; $lang['Use_default'] = 'Use default setting'; $lang['Create_cat'] = 'Create New Category:'; $lang['Create'] = 'Create'; $lang['Cat_settings'] = 'Category Settings'; $lang['Create_description'] = 'Here you can change the name of the category and add a description to the new category.'; $lang['Cat_created'] = 'Category Created Successfully.'; $lang['Click_return_cat_manager'] = 'Click %sHere%s to return to the ' . $lang['Cat_man']; $lang['Edit_description'] = 'Here you can edit the settings of your category'; $lang['Edit_cat'] = 'Edit Category'; $lang['Cat_edited'] = 'Category Edited Successfully.'; $lang['Parent'] = 'Parent'; $lang['Cat_delete_title'] = 'Delete Category'; $lang['Cat_delete_desc'] = 'Here you can delete a category and move all of the articles in it to a new category'; $lang['Cat_deleted'] = 'Category Deleted Successfully.'; $lang['Delete_all_articles'] = 'Delete Articles'; // // Admin Panels - Permissions // $lang['KB_Auth_Title'] = 'KB Permissions'; $lang['KB_Auth_Explain'] = 'Here you can choose which usergroup(s) can be the moderators for each KB category, or just has the private access'; $lang['Select_a_Category'] = 'Select a Category'; $lang['Look_up_Category'] = 'Look up Category'; $lang['KB_Auth_successfully'] = 'Auth has been updated successfully'; $lang['Click_return_KB_auth'] = 'Click %sHere%s to return to the KB Permissions'; $lang['Upload'] = 'Upload'; $lang['Rate'] = 'Rate'; $lang['Comment'] = 'Comment'; $lang['Approval'] = 'Approval'; $lang['Approval_edit'] = 'Approval Edit'; $lang['Allow_rating'] = 'Allow ratings'; $lang['Allow_rating_explain'] = 'Users are allowed to rate articles.'; $lang['Allow_anonymos_rating'] = 'Allow anonymous ratings'; $lang['Allow_anonymos_rating_explain'] = 'If ratings are activated, allow anonymous users to add ratings to your articles'; $lang['Category_Permissions'] = 'Category Permissions'; $lang['Category_Title'] = 'Category Title'; $lang['Category_Desc'] = 'Category Description'; $lang['View_level'] = 'View Level'; $lang['Upload_level'] = 'Upload Level'; $lang['Rate_level'] = 'Rate Level'; $lang['Comment_level'] = 'Comment Level'; $lang['Edit_level'] = ' Edit Level'; $lang['Delete_level'] = 'Delete Level'; $lang['Approval_level'] = 'Approval Level'; $lang['Approval_edit_level'] = 'Approval Edit Level'; // // Admin Panels - Types // $lang['Types_man'] = 'Types Manager'; $lang['KB_types_description'] = 'Here you can add, delete, and/or edit the different article types'; $lang['Create_type'] = 'Create new Article Type:'; $lang['Type_created'] = 'Article Type Created Successfully.'; $lang['Click_return_type_manager'] = 'Click %sHere%s to return to the Types Manager'; $lang['Edit_type'] = 'Edit Type'; $lang['Edit_type_description'] = 'Here you can edit the name of the type'; $lang['Type_edited'] = 'Article Type Edited Successfully.'; $lang['Type_delete_title'] = 'Delete Article Type'; $lang['Type_delete_desc'] = 'Here you can change what the article type is of the articles that have the type you are deleting.'; $lang['Change_type'] = 'Change article\'s type to'; $lang['Change_and_Delete'] = 'Change and Delete'; $lang['Type_deleted'] = 'Article Type Deleted Successfully.'; // // Admin Panels - Custom Field // $lang['Fieldselecttitle'] = 'Select what to do'; $lang['Afield'] = 'Custom Field: Add'; $lang['Efield'] = 'Custom Field: Edit'; $lang['Dfield'] = 'Custom Field: Delete'; $lang['Mfieldtitle'] = 'Custom Fields'; $lang['Afieldtitle'] = 'Add Field'; $lang['Efieldtitle'] = 'Edit Field'; $lang['Dfieldtitle'] = 'Delete Field'; $lang['Fieldexplain'] = 'You can use the custom fields management section to add, edit, and delete custom fields. You can use custom fields to add more information about an article.'; $lang['Fieldname'] = 'Field Name'; $lang['Fieldnameinfo'] = 'This is the name of the field, for example \'File Size\''; $lang['Fielddesc'] = 'Field Description'; $lang['Fielddescinfo'] = 'This is a description of the field, for example \'File Size in Megabytes\''; $lang['Fieldadded'] = 'The custom field has been successfully added'; $lang['Fieldedited'] = 'The custom field you selected has been successfully edited'; $lang['Dfielderror'] = 'You didn\'t select any fields to delete'; $lang['Fieldsdel'] = 'The custom fields you selected have been successfully deleted'; $lang['Field_data'] = 'Options'; $lang['Field_data_info'] = 'Enter the options that the user can choose from. Separate each option with a newline (carriage return).'; $lang['Field_regex'] = 'Regular Expression'; $lang['Field_regex_info'] = 'You may require the input field to match a regular expression %s(PCRE)%s.'; $lang['Field_order'] = 'Display Order'; $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; // // Admin Panels - Field Types // $lang['Field_Input'] = 'Single-Line Text Box'; $lang['Field_Textarea'] = 'Multiple-Line Text Box'; $lang['Field_Radio'] = 'Single-Selection Radio Buttons'; $lang['Field_Select'] = 'Single-Selection Menu'; $lang['Field_Select_multiple'] = 'Multiple-Selection Menu'; $lang['Field_Checkbox'] = 'Multiple-Selection Checkbox'; ?> |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:04:36
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3524/modules/mx_kb Modified Files: db_install.php db_uninstall.php db_upgrade.php kb.php kb_article_reader.php kb_search.php Log Message: in progress commit for mx_kb Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** kb.php 3 Nov 2005 12:13:34 -0000 1.25 --- kb.php 8 Dec 2005 15:04:26 -0000 1.26 *************** *** 31,35 **** include( $phpbb_root_path . 'common.' . $phpEx ); ! define( 'PAGE_KB', -500 ); // If this id generates a conflict with other mods, change it ;) // Start session management --- 31,35 ---- include( $phpbb_root_path . 'common.' . $phpEx ); ! define( 'PAGE_KB', -501 ); // If this id generates a conflict with other mods, change it ;) // Start session management *************** *** 121,126 **** global $images; } - - } --- 121,124 ---- *************** *** 134,139 **** include_once( $module_root_path . 'kb/kb_common.' . $phpEx ); - $show_new = true; - // =================================================== // Get action variable other wise set it to the main --- 132,135 ---- *************** *** 141,185 **** $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, 'main'); - if ( isset( $HTTP_POST_VARS['page_num'] ) || isset( $HTTP_GET_VARS['page_num'] ) ) - { - $page_num = ( isset( $HTTP_POST_VARS['page_num'] ) ) ? intval( $HTTP_POST_VARS['page_num'] ) : intval( $HTTP_GET_VARS['page_num'] ); - $page_num = $page_num - 1; - } - else - { - $page_num = 0; - } - // Print version - if ( isset( $HTTP_POST_VARS['print'] ) || isset( $HTTP_GET_VARS['print'] ) ) - { - $print_version = ( isset( $HTTP_POST_VARS['print'] ) ) ? $HTTP_POST_VARS['print'] : $HTTP_GET_VARS['print']; - $print_version = htmlspecialchars( $print_version ); - } - else - { - $print_version = ''; - } - // ! // options // ! $kb_wysiwyg = false; ! if ( $kb_config['wysiwyg'] ) // Html Textblock ! { ! if ( file_exists( $mx_root_path . 'modules/tinymce/jscripts/tiny_mce/blank.htm' ) ) ! { ! $bbcode_on = false; ! $html_on = true; ! $smilies_on = false; ! $kb_wysiwyg = true; ! } ! } ! ! if ( !$kb_wysiwyg ) ! { ! $bbcode_on = $kb_config['allow_bbcode'] ? true : false; ! $html_on = $kb_config['allow_html'] ? true : false; ! $smilies_on = $kb_config['allow_smilies'] ? true : false; ! } $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; --- 137,144 ---- $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, 'main'); // ! // Get more variables // ! $print_version = $mx_request_vars->request('print', MX_TYPE_NO_TAGS, ''); $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; *************** *** 189,195 **** // if the database disabled give them a nice message // =================================================== ! if ( intval( $kb_config['disable'] ) ) { ! // mx_message_die( GENERAL_MESSAGE, $lang['pafiledb_disable'] ); } --- 148,154 ---- // if the database disabled give them a nice message // =================================================== ! if ( intval( $kb_config['module_enable'] ) ) { ! mx_message_die( GENERAL_MESSAGE, $lang['pafiledb_disable'] ); } *************** *** 206,209 **** --- 165,169 ---- 'stats' => 'stats', 'moderate' => 'moderator', + 'post_comment' => 'post_comment', 'main' => 'main' ); *************** *** 211,215 **** // Lets Build the page // =================================================== - if ( !$is_block && !$print_version) { --- 171,174 ---- Index: db_uninstall.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_uninstall.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** db_uninstall.php 1 Oct 2005 14:13:46 -0000 1.13 --- db_uninstall.php 8 Dec 2005 15:04:26 -0000 1.14 *************** *** 67,70 **** --- 67,72 ---- "DROP TABLE " . $mx_table_prefix . "kb_custom ", + + "DROP TABLE " . $mx_table_prefix . "kb_comments ", "DROP TABLE " . $mx_table_prefix . "kb_customdata " Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** db_upgrade.php 1 Oct 2005 14:13:46 -0000 1.26 --- db_upgrade.php 8 Dec 2005 15:04:26 -0000 1.27 *************** *** 150,153 **** --- 150,165 ---- $upgrade_202 = 1; $message .= "<b>Upgrading to v. 2.02...ok</b><br/><br/>"; + + // validate before 2.0.3 + $result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "kb_config WHERE config_name = 'internal_comments'" ); + if ( $db->sql_numrows( $result ) == 0 ) + { + $upgrade_203 = 1; + $message .= "<b>Upgrading to v. 2.0.3...ok</b><br/><br/>"; + } + else + { + $message .= "<b>Validating v. 2.0.3...ok</b><br/><br/>"; + } // ------------------------------------------------------------------------------------------------------ *************** *** 269,273 **** --- 281,394 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; + } + + if ( $upgrade_203 == 1 ) + { + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_comments` + $sql[] = "CREATE TABLE " . $mx_table_prefix . "kb_comments ( + comments_id int(10) NOT NULL auto_increment, + article_id int(10) NOT NULL default '0', + comments_text text NOT NULL, + comments_title text NOT NULL, + comments_time int(50) NOT NULL default '0', + comment_bbcode_uid varchar(10) default NULL, + poster_id mediumint(8) NOT NULL default '0', + PRIMARY KEY (comments_id), + KEY comments_id (comments_id), + FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) + )"; + + // Config table + $sql[] = "UPDATE " . $mx_table_prefix . "kb_config" . " SET config_name = 'enable_module' WHERE config_name = 'allow_new'"; + $sql[] = "UPDATE " . $mx_table_prefix . "kb_config" . " SET config_name = 'pagination' WHERE config_name = 'art_pagination'"; + $sql[] = "UPDATE " . $mx_table_prefix . "kb_config" . " SET config_name = 'sort_method' WHERE config_name = 'news_sort'"; + $sql[] = "UPDATE " . $mx_table_prefix . "kb_config" . " SET config_name = 'sort_order' WHERE config_name = 'news_sort_par'"; + $sql[] = "UPDATE " . $mx_table_prefix . "kb_config" . " SET config_name = 'autogenerate_comments' WHERE config_name = 'bump_post'"; + $sql[] = "UPDATE " . $mx_table_prefix . "kb_config" . " SET config_name = 'notify_group' WHERE config_name = 'admin_id'"; + + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'comments_show'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'wysiwyg'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'wysiwyg_comments'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'allow_wysiwyg_comments'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'allow_wysiwyg'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'formatting_fixup'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'formatting_comment_fixup'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'approve_new'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'approve_edit'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'allow_edit'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'allow_anon'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'forum_id'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'allow_anonymos_rating'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "kb_config" . " WHERE config_name = 'mod_group'"; + + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('module_name', 'Knowledge Base')"; + + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_wysiwyg', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_links', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_images', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_image_message', '[No image please]')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_link_message', '[No links please]')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_wordwrap', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_image_resize', '300')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_truncate_links', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_subject_chars', '100')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_desc_chars', '500')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_chars', '0')"; + + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('internal_comments', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_comment_wordwrap', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_comment_image_resize', '300')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_comment_truncate_links', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_comment_subject_chars', '50')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_comment_chars', '5000')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_wysiwyg', '0')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_html', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_bbcode', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_smilies', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_links', '1')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_images', '0')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_comment_image_message', '[No image please]')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_comment_link_message', '[No links please]')"; + + // Categories table + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD cat_allow_comments tinyint(2) NOT NULL default '-1' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD internal_comments tinyint(2) NOT NULL DEFAULT '-1' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD autogenerate_comments tinyint(2) NOT NULL DEFAULT '-1' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD comments_forum_id mediumint(8) NOT NULL DEFAULT '-1' "; + + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD cat_allow_ratings tinyint(2) NOT NULL default '-1' "; + + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD show_pretext tinyint(2) NOT NULL default '-1' "; + + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD notify tinyint(2) NOT NULL DEFAULT '-1' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD notify_group mediumint(8) NOT NULL DEFAULT '-1' "; + + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD cat_last_article_id mediumint(8) unsigned NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD cat_last_article_name varchar(255) NOT NULL default '' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD cat_last_article_time INT(50) UNSIGNED DEFAULT '0' NOT NULL "; + + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_view_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_post_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_rate_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_comment_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_edit_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_delete_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_approval_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_approval_edit_groups smallint(5) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY auth_moderator_groups smallint(5) NOT NULL default '0' "; + + // Number of articles can be -1 when syncing + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY number_articles mediumint(8) NOT NULL"; + + // + // Drop unused tables + // + $sql[] = "DROP TABLE " . $mx_table_prefix . "kb_wordlist "; + $sql[] = "DROP TABLE " . $mx_table_prefix . "kb_results "; + $sql[] = "DROP TABLE " . $mx_table_prefix . "kb_wordmatch "; + } else Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** db_install.php 23 Oct 2005 02:04:18 -0000 1.33 --- db_install.php 8 Dec 2005 15:04:26 -0000 1.34 *************** *** 89,95 **** category_name VARCHAR(255) binary NOT NULL, category_details VARCHAR(255) binary NOT NULL, - number_articles mediumint(8) unsigned NOT NULL, parent mediumint(8) unsigned, cat_order mediumint(8) unsigned NOT NULL, auth_view tinyint(3) NOT NULL DEFAULT '0', auth_post tinyint(3) NOT NULL DEFAULT '0', --- 89,112 ---- category_name VARCHAR(255) binary NOT NULL, category_details VARCHAR(255) binary NOT NULL, parent mediumint(8) unsigned, cat_order mediumint(8) unsigned NOT NULL, + + cat_allow_comments tinyint(2) NOT NULL default '1', + internal_comments tinyint(2) NOT NULL default '-1', + autogenerate_comments tinyint(2) NOT NULL default '-1', + comments_forum_id mediumint(8) NOT NULL DEFAULT '-1', + + cat_allow_ratings tinyint(2) NOT NULL default '-1', + + show_pretext tinyint(2) NOT NULL default '-1', + + notify tinyint(2) NOT NULL default '-1', + notify_group mediumint(8) unsigned NOT NULL default '-1', + + number_articles mediumint(8) NOT NULL, + cat_last_article_id mediumint(8) unsigned NOT NULL default '0', + cat_last_article_name varchar(255) NOT NULL default '', + cat_last_article_time INT(50) UNSIGNED DEFAULT '0' NOT NULL, + auth_view tinyint(3) NOT NULL DEFAULT '0', auth_post tinyint(3) NOT NULL DEFAULT '0', *************** *** 100,117 **** auth_approval tinyint(3) NOT NULL DEFAULT '0', auth_approval_edit tinyint(3) NOT NULL DEFAULT '0', ! auth_view_groups varchar(255), ! auth_post_groups varchar(255), ! auth_rate_groups varchar(255), ! auth_comment_groups varchar(255), ! auth_edit_groups varchar(255), ! auth_delete_groups varchar(255), ! auth_approval_groups varchar(255), ! auth_approval_edit_groups varchar(255), ! auth_moderator_groups varchar(255), ! comments_forum_id tinyint(3) NOT NULL DEFAULT '-1', KEY category_id (category_id) )", ! "INSERT INTO " . $mx_table_prefix . "kb_categories VALUES (1, 'Test Category 1', 'This is a test category', '0', '0', '10', '0', '0', '0', '0', '0', '2', '0', '0', '', '', '', '', '', '', '', '', '', '0' )", "CREATE TABLE " . $mx_table_prefix . "kb_config ( --- 117,136 ---- auth_approval tinyint(3) NOT NULL DEFAULT '0', auth_approval_edit tinyint(3) NOT NULL DEFAULT '0', ! ! auth_view_groups smallint(5) NOT NULL default '0', ! auth_post_groups smallint(5) NOT NULL default '0', ! auth_rate_groups smallint(5) NOT NULL default '0', ! auth_comment_groups smallint(5) NOT NULL default '0', ! auth_edit_groups smallint(5) NOT NULL default '0', ! auth_delete_groups smallint(5) NOT NULL default '0', ! auth_approval_groups smallint(5) NOT NULL default '0', ! auth_approval_edit_groups smallint(5) NOT NULL default '0', ! ! auth_moderator_groups smallint(5) NOT NULL default '0', ! KEY category_id (category_id) )", ! "INSERT INTO " . $mx_table_prefix . "kb_categories VALUES (1, 'Test Category 1', 'This is a test category', '0', '10', '-1', '-1','-1','-1','-1','-1','-1','-1', '', '0', '', '0', '0', '0', '0', '0', '0', '2', '0', '0', '', '', '', '', '', '', '', '', '0' )", "CREATE TABLE " . $mx_table_prefix . "kb_config ( *************** *** 121,164 **** )", ! // "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('approve_new', '1')", ! // "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('approve_edit', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_new', '1')", ! // "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_edit', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('notify', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('admin_id', '2')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('show_pretext',0)", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('pt_header','Article Submission Instructions')", ! "INSERT INTO " . $mx_table_prefix . "kb_config values ('pt_body','Please check your references and include as much information as you can.')", ! // "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('forum_id', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('use_comments', '1')", ! // "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_anon', '0')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('del_topic', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('use_ratings', '0')", ! // "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_anonymos_rating', '0')", ! // Added by Haplo ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('comments_show', '1')", ! // "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('mod_group', '0')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('bump_post', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('stats_list', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('header_banner', '1')", ! // kb 1.06 ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('votes_check_userid', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('votes_check_ip', '1')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('art_pagination', '5')", ! // kb 1.07 ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('comments_pagination', '5')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('news_sort', 'Alphabetic')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('news_sort_par', 'ASC')", ! // kb 2.0 ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('wysiwyg', '0')", ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('wysiwyg_path', 'modules/')", ! ! "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_fixup', '0')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_html', '1')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_bbcode', '1')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_smilies', '1')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allowed_html_tags', 'b,i,u,a')", "CREATE TABLE " . $mx_table_prefix . "kb_types ( id mediumint(8) unsigned NOT NULL auto_increment, --- 140,226 ---- )", ! // ! // Insert Configs ! // + // General + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('enable_module', '1')", // allow_new + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('module_name', 'Knowledge Base')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('wysiwyg_path', 'modules/')", + + // Articles + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_wordwrap', '1')", // formatting_fixup + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_image_resize', '300')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_truncate_links', '1')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_wysiwyg', '0')", // NEW "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_html', '1')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_bbcode', '1')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_smilies', '1')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allowed_html_tags', 'b,i,u,a')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_links', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_images', '0')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_image_message', '[No image please]')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_link_message', '[No links please]')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_subject_chars', '100')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_desc_chars', '500')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_chars', '0')", // NEW + + // Appearance + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('stats_list', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('header_banner', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('pagination', '5')", // art_pagination + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('sort_method', 'Alphabetic')", // news_sort + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('sort_order', 'ASC')", // news_sort_par + + // Comments + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('use_comments', '1')", // comments_show + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('internal_comments', '1')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_comment_wordwrap', '1')", // formatting_comment_fixup + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_comment_image_resize', '300')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_comment_truncate_links', '1')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_comment_subject_chars', '50')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('max_comment_chars', '5000')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_wysiwyg', '0')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_html', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_bbcode', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_smilies', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_links', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_comment_images', '0')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_comment_image_message', '[No image please]')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('no_comment_link_message', '[No links please]')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')", // NEW + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('del_topic', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('autogenerate_comments', '1')", // bump_post + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('comments_pagination', '5')", + + // Ratings + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('use_ratings', '0')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('votes_check_userid', '1')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('votes_check_ip', '1')", + + // Instructions + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('show_pretext',0)", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('pt_header','Article Submission Instructions')", + "INSERT INTO " . $mx_table_prefix . "kb_config values ('pt_body','Please check your references and include as much information as you can.')", + + // Notifications + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('notify', 'pm')", // updated + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('notify_group', '0')", // admin_id + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_comments` + "CREATE TABLE " . $mx_table_prefix . "kb_comments ( + comments_id int(10) NOT NULL auto_increment, + article_id int(10) NOT NULL default '0', + comments_text text NOT NULL, + comments_title text NOT NULL, + comments_time int(50) NOT NULL default '0', + comment_bbcode_uid varchar(10) default NULL, + poster_id mediumint(8) NOT NULL default '0', + PRIMARY KEY (comments_id), + KEY comments_id (comments_id), + FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) + )", + "CREATE TABLE " . $mx_table_prefix . "kb_types ( id mediumint(8) unsigned NOT NULL auto_increment, *************** *** 175,202 **** )", - "CREATE TABLE " . $mx_table_prefix . "kb_wordlist ( - word_text varchar(50) binary NOT NULL default '', - word_id mediumint(8) unsigned NOT NULL auto_increment, - word_common tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (word_text), - KEY word_id (word_id) - )", - - "CREATE TABLE " . $mx_table_prefix . "kb_results ( - search_id int(11) unsigned NOT NULL default '0', - session_id varchar(32) NOT NULL default '', - search_array text NOT NULL, - PRIMARY KEY (search_id), - KEY session_id (session_id) - )", - - "CREATE TABLE " . $mx_table_prefix . "kb_wordmatch ( - article_id mediumint(8) unsigned NOT NULL default '0', - word_id mediumint(8) unsigned NOT NULL default '0', - title_match tinyint(1) NOT NULL default '0', - KEY post_id (article_id), - KEY word_id (word_id) - )", - // -------------------------------------------------------- // Table structure for table `phpbb_pa_custom` --- 237,240 ---- Index: kb_article_reader.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_article_reader.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** kb_article_reader.php 24 Oct 2005 20:15:33 -0000 1.10 --- kb_article_reader.php 8 Dec 2005 15:04:26 -0000 1.11 *************** *** 19,24 **** */ - // Switch for making this run as a phpBB MOD or mxBB module - if ( file_exists( './viewtopic.php' ) ) // -------------------------------------------- phpBB MOD MODE { --- 19,22 ---- *************** *** 36,53 **** // Start session management - $userdata = session_pagestart( $user_ip, PAGE_KB ); init_userprefs( $userdata ); - // End session management - - include( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); - include( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); - include( $phpbb_root_path . 'includes/functions_kb.' . $phpEx ); - include( $phpbb_root_path . 'includes/functions_kb_auth.' . $phpEx ); - include( $phpbb_root_path . 'includes/functions_kb_field.' . $phpEx ); - include( $phpbb_root_path . 'includes/functions_kb_mx.' . $phpEx ); - include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); - include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); } else // --------------------------------------------------------------------------------- mxBB Module MODE --- 34,40 ---- *************** *** 59,152 **** define( 'IN_PORTAL', true ); $mx_root_path = './../../'; - include_once( $mx_root_path . 'extension.inc' ); include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management - $userdata = session_pagestart( $user_ip, PAGE_INDEX ); mx_init_userprefs( $userdata ); - // End session management ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; ! if ( empty( $block_id ) ) { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'KB' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query Smartor_Album module information", "", __LINE__, __FILE__, $sql ); } - $tmp_row = $db->sql_fetchrow( $result ); - $block_id = $tmp_row['block_id']; } - $is_block = false; } else { define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! // ! // Read Block Settings // ! $title = $mx_block->block_info['block_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); $is_block = true; global $images; ! } ! ! ! // Extract 'what posts to view info', the cool Array ;) ! $kb_type_select_tmp = $mx_block->get_parameters( 'kb_type_select' ); ! $kb_type_select_data = ( !empty( $kb_type_select_tmp ) ) ? unserialize( $kb_type_select_tmp ) : array(); ! ! $default_article_id = $mx_block->get_parameters( 'default_article_id' ); ! ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include( $module_root_path . 'includes/kb_constants.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_mx.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); } ! // Instanciate custom fields ! $kb_custom_field = new kb_custom_field(); ! $kb_custom_field->init(); ! ! $show_new = true; ! // options ! if ( !$board_config['allow_html'] ) ! { ! $html_on = 0; ! } ! else ! { ! $html_on = ( $submit || $refresh ) ? ( ( !empty( $HTTP_POST_VARS['disable_html'] ) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] ); ! } ! if ( !$board_config['allow_bbcode'] ) ! { ! $bbcode_on = 0; ! } ! else ! { ! $bbcode_on = ( $submit || $refresh ) ? ( ( !empty( $HTTP_POST_VARS['disable_bbcode'] ) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_bbcode'] : $userdata['user_allowbbcode'] ); ! } ! if ( !$board_config['allow_smilies'] ) ! { ! $smilies_on = 0; ! } ! else ! { ! $smilies_on = ( $submit || $refresh ) ? ( ( !empty( $HTTP_POST_VARS['disable_smilies'] ) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] ); ! } ! // page number if ( isset( $HTTP_POST_VARS['page_num'] ) || isset( $HTTP_GET_VARS['page_num'] ) ) --- 46,139 ---- define( 'IN_PORTAL', true ); $mx_root_path = './../../'; include_once( $mx_root_path . 'extension.inc' ); include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management $userdata = session_pagestart( $user_ip, PAGE_INDEX ); mx_init_userprefs( $userdata ); // End session management ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! if ( !isset( $HTTP_GET_VARS['print'] ) ) { ! include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); ! include_once( $module_root_path . 'includes/kb_pages.' . $phpEx ); ! ! $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; ! ! $url = ''; ! if ( empty( $article_id ) ) { ! $url = PORTAL_URL . 'index.php?page=' . $kb_pages . '&mode=cat&cat=' . $cat_id; ! } ! else if ( !empty( $article_id ) ) ! { ! $url = PORTAL_URL . 'index.php?page=' . $kb_pages . '&mode=article&k=' . $article_id; ! } ! ! if ( !empty( $url ) && !$kb_error ) ! { ! if ( !empty( $db ) ) ! { ! $db->sql_close(); ! } ! ! if ( @preg_match( '/Microsoft|WebSTAR|Xitami/', getenv( 'SERVER_SOFTWARE' ) ) ) ! { ! header( 'Refresh: 0; URL=' . $url ); ! echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' . "\n" . '<html><head>' . "\n" . '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' . "\n" . '<meta http-equiv="refresh" content="0; url=' . $url . '">' . "\n" . '<title>Redirect</title>' . "\n" . '<script language="javascript" type="text/javascript">' . "\n" . '<!--' . "\n" . 'if( document.images ) {' . "\n" . "\t" . 'parent.location.replace("' . $url . '");' . "\n" . '} else {' . "\n" . "\t" . 'parent.location.href = "' . $url . '";' . "\n" . '}' . "\n" . '// -->' . "\n" . '</script>' . "\n" . '</head>' . "\n" . '<body>' . "\n" . '<div align="center">If your browser does not support meta redirection please click ' . '<a href="' . $url . '">HERE</a> to be redirected</div>' . "\n" . '</body></html>'; ! exit; ! } ! @header( 'Location: ' . $url ); ! } ! else ! { ! if ( MXBB_27x ) ! { ! mx_message_die(GENERAL_MESSAGE, 'This module does not support standalone usage. In the adminCP, add the kb block to a portal page.'); ! } ! else ! { ! die('no article, no redirect'); ! } } } } else { define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! // ! // Read Block Settings (default mode) // ! $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); + // + // Extract 'what posts to view info', the cool Array ;) + // + $kb_type_select_var = $mx_block->get_parameters( 'kb_type_select' ); + $kb_type_select_data = ( !empty( $kb_type_select_var ) ) ? unserialize( $kb_type_select_var ) : array(); + $is_block = true; global $images; ! } } ! // ------------------------------------------------------------------------------------------------------------------------- ! // ------------------------------------------------------------------------------------------------------------------------- ! // ------------------------------------------------------------------------------------------------------------------------- ! // =================================================== ! // Include the common file ! // =================================================== ! include_once( $module_root_path . 'kb/kb_common.' . $phpEx ); ! // =================================================== ! // Get action variable other wise set it to the main ! // =================================================== ! $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, 'main'); if ( isset( $HTTP_POST_VARS['page_num'] ) || isset( $HTTP_GET_VARS['page_num'] ) ) *************** *** 159,229 **** $page_num = 0; } - // Print version - if ( isset( $HTTP_POST_VARS['print'] ) || isset( $HTTP_GET_VARS['print'] ) ) - { - $print_version = ( isset( $HTTP_POST_VARS['print'] ) ) ? $HTTP_POST_VARS['print'] : $HTTP_GET_VARS['print']; - } - else - { - $print_version = ''; - } ! // Pull all config data ! ! $sql = "SELECT * ! FROM " . KB_CONFIG_TABLE; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( CRITICAL_ERROR, "Could not query config information in kb_config", "", __LINE__, __FILE__, $sql ); ! } ! else ! { ! while ( $kb_config_row = $db->sql_fetchrow( $result ) ) ! { ! $config_name = $kb_config_row['config_name']; ! $config_value = $kb_config_row['config_value']; ! $kb_config[$config_name] = $config_value; ! } ! } ! ! if ( MXBB_MODULE ) ! { ! // Newssuite operation mode? ! //------------------------------------------------------------------------- ! $total_blockk = count( $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks'] ); ! ! $kb_config['news_operate_mode'] = ''; ! for( $blockk = 0; $blockk < $total_blockk; $blockk++ ) ! { ! if ( $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_source_switch']['parameter_value'] == 'kb' && $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_mode_operate']['parameter_value'] == 'Source' ) ! { ! $newssuite_select_par = $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_type_select']['parameter_value']; ! // Extract 'what posts to view info', the cool Array ;) ! $news_type_select_data = array(); ! $news_type_select_temp = $newssuite_select_par; ! $news_type_select_temp = stripslashes( $news_type_select_temp ); ! $news_type_select_data = eval( "return " . $news_type_select_temp . ";" ); ! $kb_config['news_operate_mode'] = true; ! } ! else ! { ! $kb_config['news_operate_mode'] = ''; ! } ! } ! // ------------------------------------------------------------------------- ! } ! ! // $is_admin = ( ( $userdata['user_level'] == ADMIN || is_group_member( $kb_config['mod_group'], $userdata['user_id'] ) ) && $userdata['session_logged_in'] ) ? true : 0; ! // mode ! if ( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) { ! $mode = ( isset( $HTTP_POST_VARS['mode'] ) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars( $mode ); } ! $reader_mode = true; ! if ( $mode == 'article' ) { --- 146,167 ---- $page_num = 0; } ! // ! // Print version ! // ! $print_version = $mx_request_vars->request('print', MX_TYPE_NO_TAGS, ''); ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; ! $reader_mode = true; ! // =================================================== ! // if the database disabled give them a nice message ! // =================================================== ! if ( intval( $kb_config['disable'] ) ) { ! // mx_message_die( GENERAL_MESSAGE, $lang['pafiledb_disable'] ); } ! /* if ( $mode == 'article' ) { *************** *** 262,265 **** --- 200,252 ---- include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } + */ + + // =================================================== + // an array of all expected actions + // =================================================== + $actions = array( + 'article' => 'article', + 'cat' => 'cat', + 'add' => 'post', + 'search' => 'search', + 'edit' => 'post', + 'rate' => 'rate', + 'stats' => 'stats', + 'moderate' => 'moderator', + 'main' => 'main' ); + + // =================================================== + // Lets Build the page + // =================================================== + + if ( !$is_block && !$print_version) + { + include( $mx_root_path . 'includes/page_header.' . $phpEx ); + } + + $mx_kb->module( $actions[$mode] ); + $mx_kb->modules[$actions[$mode]]->main( $mode ); + + // + // load module header + // + if ( !$print_version ) + { + kb_page_header( $page_title ); + } + + $template->pparse( 'body' ); + + // + // load module footer + // + if ( !$print_version ) + { + kb_page_footer(); + } + if ( !$is_block && !$print_version ) + { + include( $mx_root_path . 'includes/page_tail.' . $phpEx ); + } ?> \ No newline at end of file Index: kb_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_search.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** kb_search.php 23 Oct 2005 18:50:22 -0000 1.15 --- kb_search.php 8 Dec 2005 15:04:26 -0000 1.16 *************** *** 448,452 **** $article_id = $searchset[$i]['article_id']; ! $kb_cat = get_kb_cat( $searchset[$i]['article_category_id'] ); $temp_url = append_sid( this_kb_mxurl( 'mode=cat&cat=' . $searchset[$i]['article_category_id'], true ) ); $category = '<a href="' . $temp_url . '" class="name">' . $kb_cat['category_name'] . '</a>'; --- 448,453 ---- $article_id = $searchset[$i]['article_id']; ! //$kb_cat = get_kb_cat( $searchset[$i]['article_category_id'] ); ! $kb_cat = $this->cat_rowset[$searchset[$i]['article_category_id']]; $temp_url = append_sid( this_kb_mxurl( 'mode=cat&cat=' . $searchset[$i]['article_category_id'], true ) ); $category = '<a href="' . $temp_url . '" class="name">' . $kb_cat['category_name'] . '</a>'; |
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3524/modules/mx_kb/admin Modified Files: admin_kb_art.php admin_kb_auth.php admin_kb_cat.php admin_kb_custom.php admin_kb_settings.php Removed Files: admin_kb_rebuild_search.php Log Message: in progress commit for mx_kb --- admin_kb_rebuild_search.php DELETED --- Index: admin_kb_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_settings.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_kb_settings.php 3 Nov 2005 12:18:59 -0000 1.1 --- admin_kb_settings.php 8 Dec 2005 15:04:25 -0000 1.2 *************** *** 18,23 **** --- 18,27 ---- * (at your option) any later version. */ + if ( file_exists( './../viewtopic.php' ) ) { + // + // phpBB MOD mode + // define( 'IN_PHPBB', 1 ); define( 'IN_PORTAL', 1 ); *************** *** 34,38 **** return; } ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 38,44 ---- return; } ! ! // Load default header ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 71,74 **** --- 77,92 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + // // Pull all config data *************** *** 87,104 **** $config_name = $row['config_name']; $config_value = $row['config_value']; ! $default_config[$config_name] = $config_value; ! $new[$config_name] = ( isset( $HTTP_POST_VARS[$config_name] ) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $sql = "UPDATE " . KB_CONFIG_TABLE . " SET ! config_value = '" . str_replace( "\'", "''", $new[$config_name] ) . "' ! WHERE config_name = '$config_name'"; ! ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql ); ! } } } --- 105,115 ---- $config_name = $row['config_name']; $config_value = $row['config_value']; ! $kb_config[$config_name] = $config_value; ! $new[$config_name] = ( isset( $HTTP_POST_VARS[$config_name] ) ) ? $HTTP_POST_VARS[$config_name] : $kb_config[$config_name]; if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $mx_kb_functions->set_config( $config_name, $new[$config_name] ); } } *************** *** 106,110 **** if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $message = $lang['KB_config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_kb_config'], "<a href=\"" . append_sid( "admin_kb_config.$phpEx?mode=config" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); --- 117,122 ---- if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $mx_kb_cache->unload(); ! $message = $lang['KB_config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_kb_config'], "<a href=\"" . append_sid( "admin_kb_settings.$phpEx?mode=config" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 112,186 **** } ! $new_yes = ( $new['allow_new'] ) ? "checked=\"checked\"" : ""; ! $new_no = ( !$new['allow_new'] ) ? "checked=\"checked\"" : ""; ! ! $allow_html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : ""; ! $allow_html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : ""; ! ! $allow_bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! ! $allow_smilies_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_smilies_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! ! $formatting_fixup_yes = ( $new['formatting_fixup'] ) ? "checked=\"checked\"" : ""; ! $formatting_fixup_no = ( !$new['formatting_fixup'] ) ? "checked=\"checked\"" : ""; ! $wysiwyg_yes = ( $new['wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $wysiwyg_no = ( !$new['wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $kb_allowed_html_tags = $new['allowed_html_tags']; $wysiwyg_path = $new['wysiwyg_path']; ! $pretext_show = ( $new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( !$new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pt_header = $new['pt_header']; ! $pt_body = $new['pt_body']; ! $notify_none = ( $new['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $new['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $new['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! $admin_id = $new['admin_id']; ! $use_comments_yes = ( $new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( !$new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $del_topic_yes = ( $new['del_topic'] ) ? "checked=\"checked\"" : ""; ! $del_topic_no = ( !$new['del_topic'] ) ? "checked=\"checked\"" : ""; ! // Added by Haplo ! $comments_show_yes = ( $new['comments_show'] ) ? "checked=\"checked\"" : ""; ! $comments_show_no = ( !$new['comments_show'] ) ? "checked=\"checked\"" : ""; ! $bump_post_yes = ( $new['bump_post'] ) ? "checked=\"checked\"" : ""; ! $bump_post_no = ( !$new['bump_post'] ) ? "checked=\"checked\"" : ""; ! $stats_list_yes = ( $new['stats_list'] ) ? "checked=\"checked\"" : ""; ! $stats_list_no = ( !$new['stats_list'] ) ? "checked=\"checked\"" : ""; ! $header_banner_yes = ( $new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $header_banner_no = ( !$new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $use_ratings_yes = ( $new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( !$new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! $votes_check_ip_yes = ( $new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! $votes_check_ip_no = ( !$new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! $votes_check_userid_yes = ( $new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! $votes_check_userid_no = ( !$new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! $article_pag = $new['art_pagination']; ! $comments_pag = $new['comments_pagination']; ! $news_sort_options = array(); ! $news_sort_options = array( "Latest", "Creation", "Id", "Userrank", "Alphabetic" ); ! $news_sort_list = '<select name="news_sort">'; ! for( $j = 0; $j < count( $news_sort_options ); $j++ ) { ! if ( $new['news_sort'] == $news_sort_options[$j] ) { $status = "selected"; --- 124,189 ---- } ! $template->set_filenames( array( "body" => "admin/kb_config_body.tpl" ) ); ! // ! // General Settings ! // ! $module_name = $new['module_name']; ! $enable_module_yes = ( $new['enable_module'] ) ? "checked=\"checked\"" : ""; ! $enable_module_no = ( !$new['enable_module'] ) ? "checked=\"checked\"" : ""; $wysiwyg_path = $new['wysiwyg_path']; ! // ! // Article ! // ! $allow_wysiwyg_yes = ( $new['allow_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_wysiwyg_no = ( !$new['allow_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : ""; ! $allow_html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : ""; ! $allowed_html_tags = $new['allowed_html_tags']; ! $allow_bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_smilies_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_smilies_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_images_yes = ( $new['allow_images'] ) ? "checked=\"checked\"" : ""; ! $allow_images_no = ( !$new['allow_images'] ) ? "checked=\"checked\"" : ""; ! $allow_links_yes = ( $new['allow_links'] ) ? "checked=\"checked\"" : ""; ! $allow_links_no = ( !$new['allow_links'] ) ? "checked=\"checked\"" : ""; ! $no_image_message = $new['no_image_message']; ! $no_link_message = $new['no_link_message']; ! $max_chars = $new['max_chars']; ! $max_subject_chars = $new['max_subject_chars']; ! $max_desc_chars = $new['max_desc_chars']; ! $format_truncate_links_yes = ( $new['formatting_truncate_links'] ) ? "checked=\"checked\"" : ""; ! $format_truncate_links_no = ( !$new['formatting_truncate_links'] ) ? "checked=\"checked\"" : ""; ! $format_image_resize = $new['formatting_image_resize']; ! $format_wordwrap_yes = ( $new['formatting_wordwrap'] ) ? "checked=\"checked\"" : ""; ! $format_wordwrap_no = ( !$new['formatting_wordwrap'] ) ? "checked=\"checked\"" : ""; ! // ! // Appearance ! // ! $pagination = $new['pagination']; ! $sort_method_options = array(); ! $sort_method_options = array( "Latest", "Creation", "Id", "Userrank", "Alphabetic" ); ! $sort_method_list = '<select name="sort_method">'; ! for( $j = 0; $j < count( $sort_method_options ); $j++ ) { ! if ( $new['sort_method'] == $sort_method_options[$j] ) { $status = "selected"; *************** *** 190,204 **** $status = ''; } ! $news_sort_list .= '<option value="' . $news_sort_options[$j] . '" ' . $status . '>' . $news_sort_options[$j] . '</option>'; } ! $news_sort_list .= '</select>'; ! $news_sort_par_options = array(); ! $news_sort_par_options = array( "DESC", "ASC" ); ! $news_sort_par_list = '<select name="news_sort_par">'; ! for( $j = 0; $j < count( $news_sort_par_options ); $j++ ) { ! if ( $new['news_sort_par'] == $news_sort_par_options[$j] ) { $status = "selected"; --- 193,208 ---- $status = ''; } ! $sort_method_list .= '<option value="' . $sort_method_options[$j] . '" ' . $status . '>' . $sort_method_options[$j] . '</option>'; } ! $sort_method_list .= '</select>'; ! $sort_order_options = array(); ! $sort_order_options = array( "DESC", "ASC" ); ! $sort_order_list = '<select name="sort_order">'; ! ! for( $j = 0; $j < count( $sort_order_options ); $j++ ) { ! if ( $new['sort_order'] == $sort_order_options[$j] ) { $status = "selected"; *************** *** 208,288 **** $status = ''; } ! $news_sort_par_list .= '<option value="' . $news_sort_par_options[$j] . '" ' . $status . '>' . $news_sort_par_options[$j] . '</option>'; } ! $news_sort_par_list .= '</select>'; ! $template->set_filenames( array( "body" => "admin/kb_config_body.tpl" ) ); ! $template->assign_vars( array( ! 'S_ACTION' => append_sid( "admin_kb_config.$phpEx?mode=config" ), ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_NONE' => $lang['Acc_None'], ! 'L_CONFIGURATION_TITLE' => $lang['KB_config_title'], ! 'L_CONFIGURATION_EXPLAIN' => $lang['KB_config_explain'], - 'L_NEW_NAME' => $lang['New_title'], - 'L_NEW_EXPLAIN' => $lang['New_explain'], - 'S_NEW_YES' => $new_yes, - 'S_NEW_NO' => $new_no, ! 'L_SHOW' => $lang['Show'], ! 'L_HIDE' => $lang['Hide'], ! 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], ! 'L_PRE_TEXT_HEADER' => $lang['Pre_text_header'], ! 'L_PRE_TEXT_BODY' => $lang['Pre_text_body'], ! 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], ! 'S_SHOW_PRETEXT' => $pretext_show, ! 'S_HIDE_PRETEXT' => $pretext_hide, ! 'L_PT_HEADER' => $pt_header, ! 'L_PT_BODY' => $pt_body, ! 'L_NOTIFY_NAME' => $lang['Notify_name'], ! 'L_NOTIFY_EXPLAIN' => $lang['Notify_explain'], ! 'L_EMAIL' => $lang['Email'], ! 'L_PM' => $lang['PM'], ! 'S_NOTIFY_NONE' => $notify_none, ! 'S_NOTIFY_EMAIL' => $notify_email, ! 'S_NOTIFY_PM' => $notify_pm, ! 'L_ADMIN_ID_NAME' => $lang['Admin_id_name'], ! 'L_ADMIN_ID_EXPLAIN' => $lang['Admin_id_explain'], ! 'ADMIN_ID' => $admin_id, ! 'L_USE_COMMENTS' => $lang['Use_comments'], ! 'L_USE_COMMENTS_EXPLAIN' => $lang['Use_comments_explain'], ! 'S_USE_COMMENTS_YES' => $use_comments_yes, ! 'S_USE_COMMENTS_NO' => $use_comments_no, ! 'L_RATINGS_INFO' => $lang['Rating_info'], ! 'L_COMMENTS_INFO' => $lang['Comment_info'], ! 'L_COMMENTS_SHOW' => $lang['Comments_show'], ! 'L_COMMENTS_SHOW_EXPLAIN' => $lang['Comments_show_explain'], ! 'S_COMMENTS_SHOW_YES' => $comments_show_yes, ! 'S_COMMENTS_SHOW_NO' => $comments_show_no, ! 'L_BUMP_POST' => $lang['Bump_post'], ! 'L_BUMP_POST_EXPLAIN' => $lang['Bump_post_explain'], ! 'S_BUMP_POST_YES' => $bump_post_yes, ! 'S_BUMP_POST_NO' => $bump_post_no, ! 'L_FORMATTING_FIXUP' => $lang['Formatting_fixup'], ! 'L_FORMATTING_FIXUP_EXPLAIN' => $lang['Formatting_fixup_explain'], ! 'S_FORMATTING_FIXUP_YES' => $formatting_fixup_yes, ! 'S_FORMATTING_FIXUP_NO' => $formatting_fixup_no, ! 'L_WYSIWYG' => $lang['Wysiwyg'], ! 'L_WYSIWYG_EXPLAIN' => $lang['Wysiwyg_explain'], ! 'S_WYSIWYG_YES' => $wysiwyg_yes, ! 'S_WYSIWYG_NO' => $wysiwyg_no, ! 'L_WYSIWYG_PATH' => $lang['Wysiwyg_path'], 'L_WYSIWYG_PATH_EXPLAIN' => $lang['Wysiwyg_path_explain'], ! 'WYSIWYG_PATH' => $wysiwyg_path, 'L_ALLOW_HTML' => $lang['Allow_HTML'], --- 212,347 ---- $status = ''; } ! $sort_order_list .= '<option value="' . $sort_order_options[$j] . '" ' . $status . '>' . $sort_order_options[$j] . '</option>'; } ! $sort_order_list .= '</select>'; ! $header_banner_yes = ( $new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $header_banner_no = ( !$new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $stats_list_yes = ( $new['stats_list'] ) ? "checked=\"checked\"" : ""; ! $stats_list_no = ( !$new['stats_list'] ) ? "checked=\"checked\"" : ""; ! // ! // Instructions ! // ! $pretext_show = ( $new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( !$new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pt_header = $new['pt_header']; ! $pt_body = $new['pt_body']; ! // ! // Comments (default settings) ! // ! $use_comments_yes = ( $new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( !$new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $internal_comments_internal = ( $new['internal_comments'] ) ? "checked=\"checked\"" : ""; ! $internal_comments_phpbb = ( !$new['internal_comments'] ) ? "checked=\"checked\"" : ""; ! $del_topic_yes = ( $new['del_topic'] ) ? "checked=\"checked\"" : ""; ! $del_topic_no = ( !$new['del_topic'] ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_yes = ( $new['autogenerate_comments'] ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_no = ( !$new['autogenerate_comments'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_wysiwyg_yes = ( $new['allow_comment_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_wysiwyg_no = ( !$new['allow_comment_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_html_yes = ( $new['allow_comment_html'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_html_no = ( !$new['allow_comment_html'] ) ? "checked=\"checked\"" : ""; ! $allowed_comment_html_tags = $new['allowed_comment_html_tags']; ! ! $allow_comment_bbcode_yes = ( $new['allow_comment_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_bbcode_no = ( !$new['allow_comment_bbcode'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_smilies_yes = ( $new['allow_comment_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_smilies_no = ( !$new['allow_comment_smilies'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_links_yes = ( $new['allow_comment_links'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_links_no = ( !$new['allow_comment_links'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_images_yes = ( $new['allow_comment_images'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_images_no = ( !$new['allow_comment_images'] ) ? "checked=\"checked\"" : ""; ! ! $no_comment_link_message = $new['no_comment_link_message']; ! $no_comment_image_message = $new['no_comment_image_message']; ! ! $max_comment_chars = $new['max_comment_chars']; ! $max_comment_subject_chars = $new['max_comment_subject_chars']; ! ! $format_comment_truncate_links_yes = ( $new['formatting_comment_truncate_links'] ) ? "checked=\"checked\"" : ""; ! $format_comment_truncate_links_no = ( !$new['formatting_comment_truncate_links'] ) ? "checked=\"checked\"" : ""; ! ! $format_comment_image_resize = $new['formatting_comment_image_resize']; ! ! $format_comment_wordwrap_yes = ( $new['formatting_comment_wordwrap'] ) ? "checked=\"checked\"" : ""; ! $format_comment_wordwrap_no = ( !$new['formatting_comment_wordwrap'] ) ? "checked=\"checked\"" : ""; ! ! $comments_pag = $new['comments_pagination']; ! ! // ! // Ratings (default settings) ! // ! $use_ratings_yes = ( $new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( !$new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! ! $votes_check_ip_yes = ( $new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! $votes_check_ip_no = ( !$new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! ! $votes_check_userid_yes = ( $new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! $votes_check_userid_no = ( !$new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! ! // ! // Notifications ! // ! $notify_none = ( $new['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $new['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $new['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! ! $notify_group_list = mx_get_groups($new['notify_group'], 'notify_group'); ! ! $template->assign_vars( array( ! 'S_ACTION' => append_sid( "admin_kb_settings.$phpEx?mode=config" ), ! ! 'L_CONFIGURATION_TITLE' => $lang['Panel_config_title'], ! 'L_CONFIGURATION_EXPLAIN' => $lang['Panel_config_explain'], ! ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_NONE' => $lang['Acc_None'], ! // ! // General ! // ! 'L_GENERAL_TITLE' => $lang['General_title'], ! 'L_MODULE_NAME' => $lang['Module_name'], ! 'L_MODULE_NAME_EXPLAIN' => $lang['Module_name_explain'], ! 'MODULE_NAME' => $module_name, ! ! 'L_ENABLE_MODULE' => $lang['Enable_module'], ! 'L_ENABLE_MODULE_EXPLAIN' => $lang['Enable_module_explain'], ! 'S_ENABLE_MODULE_YES' => $enable_module_yes, ! 'S_ENABLE_MODULE_NO' => $enable_module_no, ! 'L_WYSIWYG_PATH' => $lang['Wysiwyg_path'], 'L_WYSIWYG_PATH_EXPLAIN' => $lang['Wysiwyg_path_explain'], ! 'WYSIWYG_PATH' => $wysiwyg_path, ! ! // ! // Article ! // ! 'L_ARTICLE_TITLE' => $lang['Article_title'], ! ! 'L_ALLOW_WYSIWYG' => $lang['Allow_Wysiwyg'], ! 'L_ALLOW_WYSIWYG_EXPLAIN' => $lang['Allow_Wysiwyg_explain'], ! 'S_ALLOW_WYSIWYG_YES' => $allow_wysiwyg_yes, ! 'S_ALLOW_WYSIWYG_NO' => $allow_wysiwyg_no, 'L_ALLOW_HTML' => $lang['Allow_HTML'], *************** *** 303,308 **** 'L_ALLOWED_HTML_TAGS' => $lang['Allowed_tags'], 'L_ALLOWED_HTML_TAGS_EXPLAIN' => $lang['Allowed_tags_explain'], ! 'ALLOWED_HTML_TAGS' => $kb_allowed_html_tags, 'L_STATS_LIST' => $lang['Stats_list'], 'L_STATS_LIST_EXPLAIN' => $lang['Stats_list_explain'], --- 362,428 ---- 'L_ALLOWED_HTML_TAGS' => $lang['Allowed_tags'], 'L_ALLOWED_HTML_TAGS_EXPLAIN' => $lang['Allowed_tags_explain'], ! 'ALLOWED_HTML_TAGS' => $allowed_html_tags, ! ! 'L_ALLOW_IMAGES' => $lang['Allow_images'], ! 'L_ALLOW_IMAGES_EXPLAIN' => $lang['Allow_images_explain'], ! 'S_ALLOW_IMAGES_YES' => $allow_images_yes, ! 'S_ALLOW_IMAGES_NO' => $allow_images_no, ! ! 'L_ALLOW_LINKS' => $lang['Allow_links'], ! 'L_ALLOW_LINKS_EXPLAIN' => $lang['Allow_links_explain'], ! 'S_ALLOW_LINKS_YES' => $allow_links_yes, ! 'S_ALLOW_LINKS_NO' => $allow_links_no, ! ! 'L_LINKS_MESSAGE' => $lang['Allow_links_message'], ! 'L_LINKS_MESSAGE_EXPLAIN' => $lang['Allow_links_message_explain'], ! 'MESSAGE_LINK' => $no_link_message, ! ! 'L_IMAGES_MESSAGE' => $lang['Allow_images_message'], ! 'L_IMAGES_MESSAGE_EXPLAIN' => $lang['Allow_images_message_explain'], ! 'MESSAGE_IMAGE' => $no_image_message, ! ! 'L_MAX_SUBJECT_CHAR' => $lang['Max_subject_char'], ! 'L_MAX_SUBJECT_CHAR_EXPLAIN' => $lang['Max_subject_char_explain'], ! 'MAX_SUBJECT_CHAR' => $max_subject_chars, ! ! 'L_MAX_DESC_CHAR' => $lang['Max_desc_char'], ! 'L_MAX_DESC_CHAR_EXPLAIN' => $lang['Max_desc_char_explain'], ! 'MAX_DESC_CHAR' => $max_desc_chars, ! ! 'L_MAX_CHAR' => $lang['Max_char'], ! 'L_MAX_CHAR_EXPLAIN' => $lang['Max_char_explain'], ! 'MAX_CHAR' => $max_chars, ! ! 'L_FORMAT_WORDWRAP' => $lang['Format_wordwrap'], ! 'L_FORMAT_WORDWRAP_EXPLAIN' => $lang['Format_wordwrap_explain'], ! 'S_FORMAT_WORDWRAP_YES' => $format_wordwrap_yes, ! 'S_FORMAT_WORDWRAP_NO' => $format_wordwrap_no, ! ! 'L_FORMAT_IMAGE_RESIZE' => $lang['Format_image_resize'], ! 'L_FORMAT_IMAGE_RESIZE_EXPLAIN' => $lang['Format_image_resize_explain'], ! 'FORMAT_IMAGE_RESIZE' => $format_image_resize, ! ! 'L_FORMAT_TRUNCATE_LINKS' => $lang['Format_truncate_links'], ! 'L_FORMAT_TRUNCATE_LINKS_EXPLAIN' => $lang['Format_truncate_links_explain'], ! 'S_FORMAT_TRUNCATE_LINKS_YES' => $format_truncate_links_yes, ! 'S_FORMAT_TRUNCATE_LINKS_NO' => $format_truncate_links_no, ! ! // ! // Appearance ! // ! 'L_APPEARANCE_TITLE' => $lang['Appearance_title'], ! ! 'L_PAGINATION' => $lang['Article_pag'], ! 'L_PAGINATION_EXPLAIN' => $lang['Article_pag_explain'], ! 'PAGINATION' => $pagination, ! ! 'L_SORT_METHOD' => $lang['Sort_method'], ! 'L_SORT_METHOD_EXPLAIN' => $lang['Sort_method_explain'], ! 'SORT_METHOD' => $sort_method_list, + 'L_SORT_ORDER' => $lang['Sort_order'], + 'L_SORT_ORDER_EXPLAIN' => $lang['Sort_order_explain'], + 'SORT_ORDER' => $sort_order_list, + 'L_STATS_LIST' => $lang['Stats_list'], 'L_STATS_LIST_EXPLAIN' => $lang['Stats_list_explain'], *************** *** 313,322 **** 'L_HEADER_BANNER_EXPLAIN' => $lang['Header_banner_explain'], 'S_HEADER_BANNER_YES' => $header_banner_yes, ! 'S_HEADER_BANNER_NO' => $header_banner_no, ! 'L_ANON_NAME' => $lang['Allow_anon_name'], ! 'L_ANON_EXPLAIN' => $lang['Allow_anon_explain'], ! 'S_ANON_YES' => $anon_yes, ! 'S_ANON_NO' => $anon_no, 'L_USE_RATINGS' => $lang['Use_ratings'], --- 433,539 ---- 'L_HEADER_BANNER_EXPLAIN' => $lang['Header_banner_explain'], 'S_HEADER_BANNER_YES' => $header_banner_yes, ! 'S_HEADER_BANNER_NO' => $header_banner_no, ! ! // ! // Comments ! // ! 'L_COMMENTS_TITLE' => $lang['Comments_title'], ! 'L_COMMENTS_TITLE_EXPLAIN' => $lang['Comments_title_explain'], ! ! 'L_USE_COMMENTS' => $lang['Use_comments'], ! 'L_USE_COMMENTS_EXPLAIN' => $lang['Use_comments_explain'], ! 'S_USE_COMMENTS_YES' => $use_comments_yes, ! 'S_USE_COMMENTS_NO' => $use_comments_no, ! ! 'L_INTERNAL_COMMENTS' => $lang['Internal_comments'], ! 'L_INTERNAL_COMMENTS_EXPLAIN' => $lang['Internal_comments_explain'], ! 'S_INTERNAL_COMMENTS_INTERNAL' => $internal_comments_internal, ! 'S_INTERNAL_COMMENTS_PHPBB' => $internal_comments_phpbb, ! 'L_INTERNAL_COMMENTS_INTERNAL' => $lang['Internal_comments_internal'], ! 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], ! 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], ! 'L_AUTOGENERATE_COMMENTS_EXPLAIN' => $lang['Autogenerate_comments_explain'], ! 'S_AUTOGENERATE_COMMENTS_YES' => $autogenerate_comments_yes, ! 'S_AUTOGENERATE_COMMENTS_NO' => $autogenerate_comments_no, ! ! 'L_ALLOW_COMMENT_WYSIWYG' => $lang['Allow_Wysiwyg'], ! 'L_ALLOW_COMMENT_WYSIWYG_EXPLAIN' => $lang['Allow_Wysiwyg_explain'], ! 'S_ALLOW_COMMENT_WYSIWYG_YES' => $allow_comment_wysiwyg_yes, ! 'S_ALLOW_COMMENT_WYSIWYG_NO' => $allow_comment_wysiwyg_no, ! ! 'L_ALLOW_COMMENT_HTML' => $lang['Allow_HTML'], ! 'L_ALLOW_COMMENT_HTML_EXPLAIN' => $lang['Allow_html_explain'], ! 'S_ALLOW_COMMENT_HTML_YES' => $allow_comment_html_yes, ! 'S_ALLOW_COMMENT_HTML_NO' => $allow_comment_html_no, ! ! 'L_ALLOW_COMMENT_BBCODE' => $lang['Allow_BBCode'], ! 'L_ALLOW_COMMENT_BBCODE_EXPLAIN' => $lang['Allow_bbcode_explain'], ! 'S_ALLOW_COMMENT_BBCODE_YES' => $allow_comment_bbcode_yes, ! 'S_ALLOW_COMMENT_BBCODE_NO' => $allow_comment_bbcode_no, ! ! 'L_ALLOW_COMMENT_SMILIES' => $lang['Allow_smilies'], ! 'L_ALLOW_COMMENT_SMILIES_EXPLAIN' => $lang['Allow_smilies_explain'], ! 'S_ALLOW_COMMENT_SMILIES_YES' => $allow_comment_smilies_yes, ! 'S_ALLOW_COMMENT_SMILIES_NO' => $allow_comment_smilies_no, ! ! 'L_ALLOWED_COMMENT_HTML_TAGS' => $lang['Allowed_tags'], ! 'L_ALLOWED_COMMENT_HTML_TAGS_EXPLAIN' => $lang['Allowed_tags_explain'], ! 'ALLOWED_COMMENT_HTML_TAGS' => $allowed_comment_html_tags, ! ! 'L_ALLOW_COMMENT_IMAGES' => $lang['Allow_images'], ! 'L_ALLOW_COMMENT_IMAGES_EXPLAIN' => $lang['Allow_images_explain'], ! 'S_ALLOW_COMMENT_IMAGES_YES' => $allow_comment_images_yes, ! 'S_ALLOW_COMMENT_IMAGES_NO' => $allow_comment_images_no, ! ! 'L_ALLOW_COMMENT_LINKS' => $lang['Allow_links'], ! 'L_ALLOW_COMMENT_LINKS_EXPLAIN' => $lang['Allow_links_explain'], ! 'S_ALLOW_COMMENT_LINKS_YES' => $allow_comment_links_yes, ! 'S_ALLOW_COMMENT_LINKS_NO' => $allow_comment_links_no, ! ! 'L_COMMENT_LINKS_MESSAGE' => $lang['Allow_links_message'], ! 'L_COMMENT_LINKS_MESSAGE_EXPLAIN' => $lang['Allow_links_message_explain'], ! 'COMMENT_MESSAGE_LINK' => $no_comment_link_message, ! ! 'L_COMMENT_IMAGES_MESSAGE' => $lang['Allow_images_message'], ! 'L_COMMENT_IMAGES_MESSAGE_EXPLAIN' => $lang['Allow_images_message_explain'], ! 'COMMENT_MESSAGE_IMAGE' => $no_comment_image_message, ! ! 'L_COMMENT_MAX_SUBJECT_CHAR' => $lang['Max_subject_char'], ! 'L_COMMENT_MAX_SUBJECT_CHAR_EXPLAIN' => $lang['Max_subject_char_explain'], ! 'COMMENT_MAX_SUBJECT_CHAR' => $max_comment_subject_chars, ! ! 'L_COMMENT_MAX_CHAR' => $lang['Max_char'], ! 'L_COMMENT_MAX_CHAR_EXPLAIN' => $lang['Max_char_explain'], ! 'COMMENT_MAX_CHAR' => $max_comment_chars, ! ! 'L_COMMENT_FORMAT_WORDWRAP' => $lang['Format_wordwrap'], ! 'L_COMMENT_FORMAT_WORDWRAP_EXPLAIN' => $lang['Format_wordwrap_explain'], ! 'S_COMMENT_FORMAT_WORDWRAP_YES' => $format_comment_wordwrap_yes, ! 'S_COMMENT_FORMAT_WORDWRAP_NO' => $format_comment_wordwrap_no, ! ! 'L_COMMENT_FORMAT_IMAGE_RESIZE' => $lang['Format_image_resize'], ! 'L_COMMENT_FORMAT_IMAGE_RESIZE_EXPLAIN' => $lang['Format_image_resize_explain'], ! 'COMMENT_FORMAT_IMAGE_RESIZE' => $format_comment_image_resize, ! ! 'L_COMMENT_FORMAT_TRUNCATE_LINKS' => $lang['Format_truncate_links'], ! 'L_COMMENT_FORMAT_TRUNCATE_LINKS_EXPLAIN' => $lang['Format_truncate_links_explain'], ! 'S_COMMENT_FORMAT_TRUNCATE_LINKS_YES' => $format_comment_truncate_links_yes, ! 'S_COMMENT_FORMAT_TRUNCATE_LINKS_NO' => $format_comment_truncate_links_no, ! ! 'L_COMMENTS_PAG' => $lang['Comments_pag'], ! 'L_COMMENTS_PAG_EXPLAIN' => $lang['Comments_pag_explain'], ! 'COMMENTS_PAG' => $comments_pag, ! ! 'L_DEL_TOPIC' => $lang['Del_topic'], ! 'L_DEL_TOPIC_EXPLAIN' => $lang['Del_topic_explain'], ! 'S_DEL_TOPIC_YES' => $del_topic_yes, ! 'S_DEL_TOPIC_NO' => $del_topic_no, ! ! // ! // Ratings ! // ! 'L_RATINGS_TITLE' => $lang['Ratings_title'], ! 'L_RATINGS_TITLE_EXPLAIN' => $lang['Ratings_title_explain'], 'L_USE_RATINGS' => $lang['Use_ratings'], *************** *** 334,359 **** 'S_VOTES_CHECK_USERID_YES' => $votes_check_userid_yes, 'S_VOTES_CHECK_USERID_NO' => $votes_check_userid_no, ! 'L_ARTICLE_PAG' => $lang['Article_pag'], ! 'L_ARTICLE_PAG_EXPLAIN' => $lang['Article_pag_explain'], ! 'ARTICLE_PAG' => $article_pag, ! ! 'L_COMMENTS_PAG' => $lang['Comments_pag'], ! 'L_COMMENTS_PAG_EXPLAIN' => $lang['Comments_pag_explain'], ! 'COMMENTS_PAG' => $comments_pag, ! ! 'L_NEWS_SORT' => $lang['News_sort'], ! 'L_NEWS_SORT_EXPLAIN' => $lang['News_sort_explain'], ! 'NEWS_SORT' => $news_sort_list, ! 'L_NEWS_SORT_PAR' => $lang['News_sort_par'], ! 'L_NEWS_SORT_PAR_EXPLAIN' => $lang['News_sort_par_explain'], ! 'NEWS_SORT_PAR' => $news_sort_par_list, ! 'L_DEL_TOPIC' => $lang['Del_topic'], ! 'L_DEL_TOPIC_EXPLAIN' => $lang['Del_topic_explain'], ! 'S_DEL_TOPIC_YES' => $del_topic_yes, ! 'S_DEL_TOPIC_NO' => $del_topic_no ) ! ); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); --- 551,594 ---- 'S_VOTES_CHECK_USERID_YES' => $votes_check_userid_yes, 'S_VOTES_CHECK_USERID_NO' => $votes_check_userid_no, + + // + // Instructions + // + 'L_INSTRUCTIONS_TITLE' => $lang['Instructions_title'], + + 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], + 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], + 'S_SHOW_PRETEXT' => $pretext_show, + 'S_HIDE_PRETEXT' => $pretext_hide, + 'S_DEFAULT_PRETEXT' => $pretext_default, + + 'L_SHOW' => $lang['Show'], + 'L_HIDE' => $lang['Hide'], + + 'L_PRE_TEXT_HEADER' => $lang['Pre_text_header'], + 'L_PT_HEADER' => $pt_header, + + 'L_PRE_TEXT_BODY' => $lang['Pre_text_body'], + 'L_PT_BODY' => $pt_body, + + // + // Notifications + // + 'L_NOTIFICATIONS_TITLE' => $lang['Notifications_title'], ! 'L_NOTIFY' => $lang['Notify'], ! 'L_NOTIFY_EXPLAIN' => $lang['Notify_explain'], ! 'L_EMAIL' => $lang['Email'], ! 'L_PM' => $lang['PM'], ! ! 'S_NOTIFY_NONE' => $notify_none, ! 'S_NOTIFY_EMAIL' => $notify_email, ! 'S_NOTIFY_PM' => $notify_pm, ! 'L_NOTIFY_GROUP' => $lang['Notify_group'], ! 'L_NOTIFY_GROUP_EXPLAIN' => $lang['Notify_group_explain'], ! 'NOTIFY_GROUP' => $notify_group_list, ! )); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_art.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** admin_kb_art.php 3 Nov 2005 12:13:33 -0000 1.26 --- admin_kb_art.php 8 Dec 2005 15:04:23 -0000 1.27 *************** *** 40,45 **** include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); - include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); - include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); include( $phpbb_root_path . 'kb/kb_common.' . $phpEx ); --- 40,43 ---- *************** *** 74,82 **** } $mx_kb->init(); $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); $start = $mx_request_vars->request('start', MX_TYPE_INT, 0); ! $article_id = $mx_request_vars->get('a', MX_TYPE_INT, 0); if( empty( $mode ) ) --- 72,93 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + $mx_kb->init(); $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); $start = $mx_request_vars->request('start', MX_TYPE_INT, 0); ! $category_id = $mx_request_vars->request('cat', MX_TYPE_INT, 0); ! $article_id = $mx_request_vars->request('a', MX_TYPE_INT, 0); if( empty( $mode ) ) *************** *** 104,165 **** case 'approve': - $kb_custom_field = new kb_custom_field(); - $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; if ( !( $results = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } $kb_row = $db->sql_fetchrow( $results ); ! $topic_sql = ''; $kb_comment = array(); ! ! // // Populate the kb_comment variable ! // ! $kb_comment = $mx_kb->kb_get_data($kb_row, $userdata ); ! ! // // Compose post header - // $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; ! $message_temp = kb_compose_comment( $kb_comment ); ! ! $kb_message = $message_temp['message']; ! $kb_update_message = $message_temp['update_message']; ! // ! // Insert comment, if not already present ! // if ( $kb_config['use_comments'] ) { if ( !$kb_row['topic_id'] ) { - // // Post - // $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $topic_sql = ", topic_id = " . $topic_data['topic_id']; } } ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 1 " . $topic_sql . " ! WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } - - $article_category_id = $kb_row['article_category_id']; - - update_kb_number( $article_category_id ); - kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); - mx_add_search_words( 'single', $article_id, stripslashes( $kb_row['article_body'] ), stripslashes( $kb_row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); --- 115,170 ---- case 'approve': $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; + if ( !( $results = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } + $kb_row = $db->sql_fetchrow( $results ); ! $topic_sql = ''; + /* $kb_comment = array(); ! // Populate the kb_comment variable ! $kb_comment = $this->kb_get_data($kb_row, $userdata ); ! // Compose post header $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; ! $message_temp = $this->kb_compose_comment( $kb_comment ); ! $kb_message = $message_temp['message']; ! $kb_update_message = $message_temp['update_message']; ! if ( $kb_config['use_comments'] ) { if ( !$kb_row['topic_id'] ) { // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $topic_sql = ", topic_id = " . $topic_data['topic_id']; } } ! */ ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 1 " . $topic_sql . " ! WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } ! /* ! $this->kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); ! */ ! ! $mx_kb->modified( true ); ! $mx_kb->_kb(); ! ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 170,198 **** $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 0 WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } ! ! $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not obtain article category", '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $article_category_id = $kb_row['article_category_id']; ! } ! ! update_kb_number( $article_category_id ); ! mx_remove_search_post( $article_id, 'kb' ); ! ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); break; --- 175,190 ---- $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 0 WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } ! ! $mx_kb->modified( true ); ! $mx_kb->_kb(); ! ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); + break; *************** *** 202,207 **** { $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) --- 194,199 ---- { $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 209,339 **** mx_message_die( GENERAL_ERROR, "Could not obtain article category", '', __LINE__, __FILE__, $sql ); } ! ! if ( $article = $db->sql_fetchrow( $result ) ) ! { ! $article_category_id = $article['article_category_id']; ! } ! ! if ( $article['approved'] == 1 ) ! { ! update_kb_number( $article_category_id ); ! } ! ! if ( $kb_config['del_topic'] && $article['topic_id'] ) { ! $topic = $article['topic_id']; ! ! $sql = "SELECT poster_id, COUNT(post_id) AS posts ! FROM " . POSTS_TABLE . " ! WHERE topic_id = " . $topic . " ! GROUP BY poster_id"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not get poster id information', '', __LINE__, __FILE__, $sql ); ! } ! ! $count_sql = array(); ! while ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $count_sql[] = "UPDATE " . USERS_TABLE . " ! SET user_posts = user_posts - " . $kb_row['posts'] . " ! WHERE user_id = " . $kb_row['poster_id']; ! } ! $db->sql_freeresult( $result ); ! ! if ( sizeof( $count_sql ) ) ! { ! for( $i = 0; $i < sizeof( $count_sql ); $i++ ) ! { ! if ( !$db->sql_query( $count_sql[$i] ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not update user post count information', '', __LINE__, __FILE__, $sql ); ! } ! } ! } ! ! $sql = "SELECT forum_id ! FROM " . TOPICS_TABLE . " ! WHERE topic_id = $topic"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not get forum id information', '', __LINE__, __FILE__, $sql ); ! } ! ! $forum_id = array(); ! while ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $forum_id = $kb_row['forum_id']; ! } ! $db->sql_freeresult( $result ); ! ! $sql = "SELECT post_id ! FROM " . POSTS_TABLE . " ! WHERE topic_id = $topic"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not get post id information', '', __LINE__, __FILE__, $sql ); ! } ! ! $post_array = array(); ! $ii = 0; ! $post_id_sql = ''; ! while ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $post_array[$ii] = $kb_row['post_id']; ! $post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . $kb_row['post_id']; ! $ii++; ! } ! $db->sql_freeresult( $result ); ! ! // Got all required info so go ahead and start deleting everything ! ! $sql = "DELETE ! FROM " . TOPICS_TABLE . " ! WHERE topic_id = $topic ! OR topic_moved_id = $topic"; ! if ( !$db->sql_query( $sql, BEGIN_TRANSACTION ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete topics', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $post_id_sql != '' ) ! { ! $sql = "DELETE ! FROM " . POSTS_TABLE . " ! WHERE topic_id = $topic"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete posts', '', __LINE__, __FILE__, $sql ); ! } ! ! for ( $i = 0; $i < count( $post_array ); $i++ ) ! { ! $sql = "DELETE ! FROM " . POSTS_TEXT_TABLE . " ! WHERE post_id = $post_array[$i]"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete posts text', '', __LINE__, __FILE__, $sql ); ! } ! } ! ! remove_search_post( $post_id_sql ); ! } ! ! $sql = "DELETE ! FROM " . TOPICS_WATCH_TABLE . " ! WHERE topic_id = $topic"; ! if ( !$db->sql_query( $sql, END_TRANSACTION ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete watched post list', '', __LINE__, __FILE__, $sql ); ! } ! if ( !empty( $forum_id ) ) ! { ! sync( 'forum', $forum_id ); ! } } ! $sql = "DELETE FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 201,215 ---- mx_message_die( GENERAL_ERROR, "Could not obtain article category", '', __LINE__, __FILE__, $sql ); } ! ! $article_info = $db->sql_fetchrow( $result ); ! ! if ( $this->comments[$article_info['article_category_id']]['activated'] && !$this->comments[$article_info['article_category_id']]['internal_comments'] && $kb_config['del_topic'] && $article_info['topic_id'] ) { ! include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); ! $mx_kb_comments = new mx_kb_comments(); ! $mx_kb_comments->init( $article_info, 'phpbb' ); ! $mx_kb_comments->post('delete', $article_info['topic_id']); } ! $sql = "DELETE FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; *************** *** 342,354 **** mx_message_die( GENERAL_ERROR, "Could not delete article data", '', __LINE__, __FILE__, $sql ); } ! $sql = "DELETE FROM " . KB_MATCH_TABLE . " WHERE article_id = " . $article_id; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not delete article wordmatch data", '', __LINE__, __FILE__, $sql ); ! } ! ! mx_remove_search_post( $article_id, 'kb' ); $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); --- 218,226 ---- mx_message_die( GENERAL_ERROR, "Could not delete article data", '', __LINE__, __FILE__, $sql ); } + + $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; ! $mx_kb->modified( true ); ! $mx_kb->_kb(); $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); *************** *** 372,386 **** // edited articles // ! $mx_kb->get_kb_articles( '', 2, 'editrow', $start ); // // need to be approved // ! $mx_kb->get_kb_articles( '', 0, 'notrow', $start ); // // Articles that are approved // ! $total_articles = $mx_kb->get_kb_articles( '', 1, 'approverow', $start, $kb_config['art_pagination'] ); // --- 244,258 ---- // edited articles // ! $mx_kb->display_articles( '', 2, 'editrow', $start ); // // need to be approved // ! $mx_kb->display_articles( '', 0, 'notrow', $start ); // // Articles that are approved // ! $total_articles = $mx_kb->display_articles( '', 1, 'approverow', $start, $kb_config['pagination'] ); // *************** *** 401,405 **** { $total_articles = $total['total']; ! $pagination = generate_pagination( append_sid ( "admin_kb_art.$phpEx" ), $total_articles, $kb_config['art_pagination'], $start ) . ' '; } --- 273,277 ---- { $total_articles = $total['total']; ! $pagination = generate_pagination( append_sid ( "admin_kb_art.$phpEx" ), $total_articles, $kb_config['pagination'], $start ) . ' '; } *************** *** 410,429 **** $template->assign_vars( array( ! 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['art_pagination'] ) + 1 ), ceil( $total_articles / $kb_config['art_pagination'] ) ), ! 'L_GOTO_PAGE' => $lang['Goto_page'], ! 'L_ARTICLE' => $lang['Article'], ! 'L_ARTICLE_CAT' => $lang['Category'], ! 'L_ARTICLE_TYPE' => $lang['Article_type'], ! 'L_ARTICLE_AUTHOR' => $lang['Author'], ! 'L_ACTION' => $lang['Art_action'], ! 'L_APPROVED' => $lang['Art_approved'], ! 'L_NOT_APPROVED' => $lang['Art_not_approved'], ! 'L_EDITED' => $lang['Art_edit'], ! 'L_KB_ART_TITLE' => $lang['Art_man'], ! 'L_KB_ART_DESCRIPTION' => $lang['KB_art_description'] ) ! ); break; } --- 282,302 ---- $template->assign_vars( array( ! 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['pagination'] ) + 1 ), ceil( $total_articles / $kb_config['pagination'] ) ), ! 'L_GOTO_PAGE' => $lang['Goto_page'], ! ! 'L_ARTICLE' => $lang['Article'], ! 'L_ARTICLE_CAT' => $lang['Category'], ! 'L_ARTICLE_TYPE' => $lang['Article_type'], ! 'L_ARTICLE_AUTHOR' => $lang['Author'], ! 'L_ACTION' => $lang['Art_action'], ! 'L_APPROVED' => $lang['Art_approved'], ! 'L_NOT_APPROVED' => $lang['Art_not_approved'], ! 'L_EDITED' => $lang['Art_edit'], ! 'L_ART_TITLE' => $lang['Panel_art_title'], ! 'L_ART_EXPLAIN' => $lang['Panel_art_explain'] ! )); break; } Index: admin_kb_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_auth.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_kb_auth.php 3 Nov 2005 12:13:33 -0000 1.11 --- admin_kb_auth.php 8 Dec 2005 15:04:25 -0000 1.12 *************** *** 80,84 **** if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $s_kb_cat_list = $mx_kb->get_kb_cat_list( '', 0, 0, 0, 0, true ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); --- 80,84 ---- if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $s_kb_cat_list = $mx_kb->generate_jumpbox( '', 0, 0, 0, true ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** admin_kb_cat.php 3 Nov 2005 12:13:33 -0000 1.19 --- admin_kb_cat.php 8 Dec 2005 15:04:25 -0000 1.20 *************** *** 72,111 **** } ! function get_forums( $sel_id = 0 ) { ! global $db; ! ! $sql = "SELECT forum_id, forum_name ! FROM " . FORUMS_TABLE; ! ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Couldn't get list of forums", "", __LINE__, __FILE__, $sql ); ! } ! ! $forumlist = '<select name="forum_id">'; ! ! if ( $sel_id == 0 ) ! { ! $forumlist .= '<option value="0" selected > Select a Forum !</option>'; ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! if ( $sel_id == $row['forum_id'] ) ! { ! $status = "selected"; ! } ! else ! { ! $status = ''; ! } ! $forumlist .= '<option value="' . $row['forum_id'] . '" ' . $status . '>' . $row['forum_name'] . '</option>'; ! } ! ! $forumlist .= '</select>'; ! ! return $forumlist; } $mx_kb->init(); --- 72,86 ---- } ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } $mx_kb->init(); *************** *** 140,144 **** { $new_cat_name = stripslashes( $HTTP_POST_VARS['new_cat_name'] ); ! // // Generate page --- 115,158 ---- { $new_cat_name = stripslashes( $HTTP_POST_VARS['new_cat_name'] ); ! ! // ! // Comments ! // ! $use_comments_yes = ""; ! $use_comments_no = ""; ! $use_comments_default = "checked=\"checked\""; ! ! $internal_comments_internal = ""; ! $internal_comments_phpbb = ""; ! $internal_comments_default = "checked=\"checked\""; ! ! $autogenerate_comments_yes = ""; ! $autogenerate_comments_no = ""; ! $autogenerate_comments_default = "checked=\"checked\""; ! ! // ! // Ratings ! // ! $use_ratings_yes = ""; ! $use_ratings_no = ""; ! $use_ratings_default = "checked=\"checked\""; ! ! // ! // Instructions ! // ! $pretext_show = ""; ! $pretext_hide = ""; ! $pretext_default = "checked=\"checked\""; ! ! // ! // Notification ! // ! $notify_none = ""; ! $notify_pm = ""; ! $notify_email = ""; ! $notify_default = "checked=\"checked\""; ! ! $notify_group_list = mx_get_groups('', 'notify_group'); ! // // Generate page *************** *** 149,156 **** $template->assign_vars( array( 'L_EDIT_TITLE' => $lang['Create_cat'], 'L_EDIT_DESCRIPTION' => $lang['Create_description'], 'L_CATEGORY' => $lang['Category'], ! 'L_DESCRIPTION' => $lang['Article_description'], 'L_NUMBER_ARTICLES' => $lang['Articles'], 'L_CAT_SETTINGS' => $lang['Cat_settings'], --- 163,172 ---- $template->assign_vars( array( + 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=create" ), + 'L_EDIT_TITLE' => $lang['Create_cat'], 'L_EDIT_DESCRIPTION' => $lang['Create_description'], 'L_CATEGORY' => $lang['Category'], ! 'L_DESCRIPTION' => $lang['Category_description'], 'L_NUMBER_ARTICLES' => $lang['Articles'], 'L_CAT_SETTINGS' => $lang['Cat_settings'], *************** *** 159,174 **** 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $mx_kb->get_kb_cat_list( '', 0, 0, 0, 0, true ), 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], 'FORUM_LIST' => get_forums( ), ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=create" ), ! 'CAT_NAME' => $new_cat_name, ! 'DESC' => '', ! 'NUMBER_ARTICLES' => '0', ! // Category permissions 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], --- 175,264 ---- 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $mx_kb->generate_jumpbox( '', 0, 0, 0, true ), ! 'CAT_NAME' => $new_cat_name, ! 'DESC' => '', ! 'NUMBER_ARTICLES' => '0', ! ! 'L_DEFAULT' => $lang['Use_default'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_NONE' => $lang['Acc_None'], ! ! // ! // Comments ! // ! 'L_COMMENTS_TITLE' => $lang['Comments_title'], ! ! 'L_USE_COMMENTS' => $lang['Use_comments'], ! 'L_USE_COMMENTS_EXPLAIN' => $lang['Use_comments_explain'], ! 'S_USE_COMMENTS_YES' => $use_comments_yes, ! 'S_USE_COMMENTS_NO' => $use_comments_no, ! 'S_USE_COMMENTS_DEFAULT' => $use_comments_default, ! ! 'L_INTERNAL_COMMENTS' => $lang['Internal_comments'], ! 'L_INTERNAL_COMMENTS_EXPLAIN' => $lang['Internal_comments_explain'], ! 'S_INTERNAL_COMMENTS_INTERNAL' => $internal_comments_internal, ! 'S_INTERNAL_COMMENTS_PHPBB' => $internal_comments_phpbb, ! 'S_INTERNAL_COMMENTS_DEFAULT' => $internal_comments_default, ! 'L_INTERNAL_COMMENTS_INTERNAL' => $lang['Internal_comments_internal'], ! 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], 'FORUM_LIST' => get_forums( ), + + 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], + 'L_AUTOGENERATE_COMMENTS_EXPLAIN' => $lang['Autogenerate_comments_explain'], + 'S_AUTOGENERATE_COMMENTS_YES' => $autogenerate_comments_yes, + 'S_AUTOGENERATE_COMMENTS_NO' => $autogenerate_comments_no, + 'S_AUTOGENERATE_COMMENTS_DEFAULT' => $autogenerate_comments_default, + + // + // Ratings + // + 'L_RATINGS_TITLE' => $lang['Ratings_title'], + + 'L_USE_RATINGS' => $lang['Use_ratings'], + 'L_USE_RATINGS_EXPLAIN' => $lang['Use_ratings_explain'], + 'S_USE_RATINGS_YES' => $use_ratings_yes, + 'S_USE_RATINGS_NO' => $use_ratings_no, + 'S_USE_RATINGS_DEFAULT' => $use_ratings_default, + + // + // Instructions + // + 'L_INSTRUCTIONS_TITLE' => $lang['Instructions_title'], + + 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], + 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], + 'S_SHOW_PRETEXT' => $pretext_show, + 'S_HIDE_PRETEXT' => $pretext_hide, + 'S_DEFAULT_PRETEXT' => $pretext_default, + + 'L_SHOW' => $lang['Show'], + 'L_HIDE' => $lang['Hide'], ! // ! // Notifications ! // ! 'L_NOTIFICATIONS_TITLE' => $lang['Notifications_title'], ! ! 'L_NOTIFY' => $lang['Notify'], ! 'L_NOTIFY_EXPLAIN' => $lang['Notify_explain'], ! 'L_EMAIL' => $lang['Email'], ! 'L_PM' => $lang['PM'], ! ! 'S_NOTIFY_NONE' => $notify_none, ! 'S_NOTIFY_EMAIL' => $notify_email, ! 'S_NOTIFY_PM' => $notify_pm, ! 'S_NOTIFY_DEFAULT' => $notify_default, ! ! 'L_NOTIFY_GROUP' => $lang['Notify_group'], ! 'L_NOTIFY_GROUP_EXPLAIN' => $lang['Notify_group_explain'], ! 'NOTIFY_GROUP' => $notify_group_list, ! ! // // Category permissions + // 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], *************** *** 213,218 **** --- 303,319 ---- $cat_desc = $HTTP_POST_VARS['catdesc']; $parent = intval( $HTTP_POST_VARS['parent'] ); + + $cat_use_comments = ( isset( $HTTP_POST_VARS['cat_allow_comments'] ) ) ? intval( $HTTP_POST_VARS['cat_allow_comments'] ) : 0; + $cat_internal_comments = ( isset( $HTTP_POST_VARS['internal_comments'] ) ) ? intval( $HTTP_POST_VARS['internal_comments'] ) : 0; + $cat_autogenerate_comments = ( isset( $HTTP_POST_VARS['autogenerate_comments'] ) ) ? intval( $HTTP_POST_VARS['autogenerate_comments'] ) : 0; $comments_forum_id = intval( $HTTP_POST_VARS['forum_id'] ); + + $cat_show_pretext = ( isset( $HTTP_POST_VARS['show_pretext'] ) ) ? intval( $HTTP_POST_VARS['show_pretext'] ) : 0; + + $cat_use_ratings = ( isset( $HTTP_POST_VARS['cat_allow_ratings'] ) ) ? intval( $HTTP_POST_VARS['cat_allow_ratings'] ) : 0; + $cat_notify = ( isset( $HTTP_POST_VARS['notify'] ) ) ? intval( $HTTP_POST_VARS['notify'] ) : 0; + $cat_notify_group = ( isset( $HTTP_POST_VARS['notify_group'] ) ) ? intval( $HTTP_POST_VARS['notify_group'] ) : 0; + if ( $comments_forum_id == 0 ) { *************** *** 244,249 **** $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, comments_forum_id)" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$comments_forum_id')"; if ( !( $results = $db->sql_query( $sql ) ) ) --- 345,350 ---- $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, cat_allow_ratings, show_pretext, notify, notify_group )" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$cat_use_comments', '$cat_internal_comments', '$cat_autogenerate_comments', '$comments_forum_id', '$cat_use_ratings', '$cat_show_pretext', '$cat_notify', '$cat_notify_group')"; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 277,281 **** --- 378,422 ---- $number_articles = $kb_cat['number_articles']; $parent = $kb_cat['parent']; + + // + // Comments + // + $use_comments_yes = ( $kb_cat['cat_allow_comments'] == 1 ) ? "checked=\"checked\"" : ""; + $use_comments_no = ( $kb_cat['cat_allow_comments'] == 0 ) ? "checked=\"checked\"" : ""; + $use_comments_default = ( $kb_cat['cat_allow_comments'] == -1 ) ? "checked=\"checked\"" : ""; + + $internal_comments_internal = ( $kb_cat['internal_comments'] == 1 ) ? "checked=\"checked\"" : ""; + $internal_comments_phpbb = ( $kb_cat['internal_comments'] == 0 ) ? "checked=\"checked\"" : ""; + $internal_comments_default = ( $kb_cat['internal_comments'] == -1 ) ? "checked=\"checked\"" : ""; + $comments_forum_id = $kb_cat['comments_forum_id']; + + $autogenerate_comments_yes = ( $kb_cat['autogenerate_comments'] == 1 ) ? "checked=\"checked\"" : ""; + $autogenerate_comments_no = ( $kb_cat['autogenerate_comments'] == 0) ? "checked=\"checked\"" : ""; + $autogenerate_comments_default = ( $kb_cat['autogenerate_comments'] == -1 ) ? "checked=\"checked\"" : ""; + + // + // Ratings + // + $use_ratings_yes = ( $kb_cat['cat_allow_ratings'] == 1) ? "checked=\"checked\"" : ""; + $use_ratings_no = ( $kb_cat['cat_allow_ratings'] == 0) ? "checked=\"checked\"" : ""; + $use_ratings_default = ( $kb_cat['cat_allow_ratings'] == -1 ) ? "checked=\"checked\"" : ""; + + // + // Instructions + // + $pretext_show = ( $kb_cat['show_pretext'] == 1) ? "checked=\"checked\"" : ""; + $pretext_hide = ( $kb_cat['show_pretext'] == 0) ? "checked=\"checked\"" : ""; + $pretext_default = ( $kb_cat['show_pretext'] == -1 ) ?... [truncated message content] |
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/images/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3524/modules/mx_kb/templates/subSilver/images/lang_english Added Files: icon_kb_post.gif icon_kb_post_comment.gif icon_kb_rate.gif icon_kb_search.gif icon_kb_stats.gif icon_kb_toplist.gif Log Message: in progress commit for mx_kb --- NEW FILE: icon_kb_post.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icon_kb_search.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icon_kb_post_comment.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icon_kb_rate.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icon_kb_stats.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icon_kb_toplist.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Jon O. <jon...@us...> - 2005-12-08 15:00:31
|
Update of /cvsroot/mxbb/mx_kb/kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2825/kb Log Message: Directory /cvsroot/mxbb/mx_kb/kb added to the repository |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:43:25
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31621/modules/mx_calsnails Modified Files: calendar.php mx_calendar_events.php mx_calendar_query.php Log Message: optimization...less db queries Index: mx_calendar_events.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_events.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mx_calendar_events.php 24 Oct 2005 20:13:55 -0000 1.14 --- mx_calendar_events.php 8 Dec 2005 14:43:10 -0000 1.15 *************** *** 19,25 **** */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( "Hacking attempt !!!" ); } --- 19,25 ---- */ ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } *************** *** 103,108 **** { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_events.tpl' ) ! ); // Compute date range depending on block parameters. --- 103,107 ---- { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_events.tpl' ) ); // Compute date range depending on block parameters. Index: mx_calendar_query.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_query.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_calendar_query.php 24 Oct 2005 20:13:55 -0000 1.9 --- mx_calendar_query.php 8 Dec 2005 14:43:10 -0000 1.10 *************** *** 19,25 **** */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( "Hacking attempt !!!" ); } --- 19,25 ---- */ ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } Index: calendar.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/calendar.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** calendar.php 24 Oct 2005 20:13:55 -0000 1.19 --- calendar.php 8 Dec 2005 14:43:10 -0000 1.20 *************** *** 75,109 **** // +MX001: Begin ! if ( !function_exists( 'read_block_config' ) ) ! { ! define( 'IN_PORTAL', 1 ); ! // session_start(); ! $mx_root_path = "../../"; ! include_once( $mx_root_path . 'extension.inc' ); ! include_once( $mx_root_path . 'common.' . $phpEx ); ! ! // Start session management ! ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); ! ! // End session management ! ! $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : 0; ! if ( empty( $block_id ) ) ! { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'CalSnails Lite' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not query CalSnails module information", "", __LINE__, __FILE__, $sql ); ! } ! $row = $db->sql_fetchrow( $result ); ! $block_id = $row['block_id']; ! } ! $generate_headers = true; ! } ! else { ! $generate_headers = false; } --- 75,81 ---- // +MX001: Begin ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } |
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135/includes Modified Files: mx_functions.php mx_functions_admincp.php mx_functions_auth.php mx_functions_core.php mx_functions_phpbb.php page_header.php page_tail.php Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: mx_functions_auth.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_auth.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_functions_auth.php 1 Oct 2005 14:10:45 -0000 1.4 --- mx_functions_auth.php 8 Dec 2005 14:41:48 -0000 1.5 *************** *** 421,432 **** if( $mode == 'kb' ) { ! include_once($mx_root_path . 'modules/mx_kb/includes/functions_kb_auth.' . $phpEx); ! $auth_func = 'kb_auth'; } else { ! $auth_func = 'auth'; } ! $is_auth_ary = $auth_func(AUTH_VIEW, AUTH_LIST_ALL, $userdata); // --- 421,433 ---- if( $mode == 'kb' ) { ! include_once($mx_root_path . 'modules/mx_kb/kb/includes/functions_auth.' . $phpEx); ! $mx_kb_auth = new mx_kb_auth(); ! $is_auth_ary = $mx_kb_auth->auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); } else { ! $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); } ! // Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** page_tail.php 25 Nov 2005 02:52:16 -0000 1.18 --- page_tail.php 8 Dec 2005 14:41:48 -0000 1.19 *************** *** 84,87 **** --- 84,95 ---- // + // Update config cache + // + if ($mx_config_cache->modified) + { + $mx_config_cache->unload(); + } + + // // Close our DB connection. // Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mx_functions_core.php 23 Oct 2005 18:48:20 -0000 1.15 --- mx_functions_core.php 8 Dec 2005 14:41:48 -0000 1.16 *************** *** 23,27 **** die( "Hacking attempt" ); } ! /********************************************************************************\ | Class: mx_cache --- 23,201 ---- die( "Hacking attempt" ); } ! ! /********************************************************************************\ ! | Class: mx_config_cache ! | The mx_config_cache handles the mx_config data ! | ! \********************************************************************************/ ! class mx_config_cache ! { ! var $vars = ''; ! var $vars_ts = array(); ! var $modified = false; ! ! function mx_config_cache() ! { ! global $phpbb_root_path, $mx_root_path, $is_block, $phpEx; ! $this->cache_dir = $mx_root_path . 'cache/'; ! } ! ! function load() ! { ! global $phpEx; ! @include( $this->cache_dir . 'mx_config.' . $phpEx ); ! } ! ! function unload() ! { ! $this->save(); ! unset( $this->vars ); ! unset( $this->vars_ts ); ! } ! ! function save() ! { ! if ( !$this->modified ) ! { ! return; ! } ! ! global $phpEx; ! $file = '<?php $this->vars=' . $this->format_array( $this->vars ) . ";\n\$this->vars_ts=" . $this->format_array( $this->vars_ts ) . ' ?>'; ! ! if ( $fp = @fopen( $this->cache_dir . 'mx_config.' . $phpEx, 'wb' ) ) ! { ! @flock( $fp, LOCK_EX ); ! fwrite( $fp, $file ); ! @flock( $fp, LOCK_UN ); ! fclose( $fp ); ! } ! } ! ! function tidy( $expire_time = 0 ) ! { ! global $phpEx; ! ! $dir = opendir( $this->cache_dir ); ! while ( $entry = readdir( $dir ) ) ! { ! if ( $entry{0} == '.' || substr( $entry, 0, 4 ) != 'sql_' ) ! { ! continue; ! } ! ! if ( time() - $expire_time >= filemtime( $this->cache_dir . $entry ) ) ! { ! unlink( $this->cache_dir . $entry ); ! } ! } ! ! if ( file_exists( $this->cache_dir . 'mx_config.' . $phpEx ) ) ! { ! foreach ( $this->vars_ts as $varname => $timestamp ) ! { ! if ( time() - $expire_time >= $timestamp ) ! { ! $this->destroy( $varname ); ! } ! } ! } ! else ! { ! $this->vars = $this->vars_ts = array(); ! $this->modified = true; ! } ! } ! ! function get( $varname, $expire_time = 0 ) ! { ! return ( $this->exists( $varname, $expire_time ) ) ? $this->vars[$varname] : null; ! } ! ! function put( $varname, $var ) ! { ! $this->vars[$varname] = $var; ! $this->vars_ts[$varname] = time(); ! $this->modified = true; ! } ! ! function destroy( $varname ) ! { ! if ( isset( $this->vars[$varname] ) ) ! { ! $this->modified = true; ! unset( $this->vars[$varname] ); ! unset( $this->vars_ts[$varname] ); ! } ! } ! ! function exists( $varname, $expire_time = 0 ) ! { ! if ( !is_array( $this->vars ) ) ! { ! $this->load(); ! } ! ! if ( $expire_time > 0 && isset( $this->vars_ts[$varname] ) ) ! { ! if ( $this->vars_ts[$varname] <= time() - $expire_time ) ! { ! $this->destroy( $varname ); ! return false; ! } ! } ! ! return isset( $this->vars[$varname] ); ! } ! ! function format_array( $array ) ! { ! $lines = array(); ! foreach ( $array as $k => $v ) ! { ! if ( is_array( $v ) ) ! { ! $lines[] = "'$k'=>" . $this->format_array( $v ); ! }elseif ( is_int( $v ) ) ! { ! $lines[] = "'$k'=>$v"; ! }elseif ( is_bool( $v ) ) ! { ! $lines[] = "'$k'=>" . ( ( $v ) ? 'TRUE' : 'FALSE' ); ! } ! else ! { ! $lines[] = "'$k'=>'" . str_replace( "'", "\'", str_replace( '\\', '\\\\', $v ) ) . "'"; ! } ! } ! return 'array(' . implode( ',', $lines ) . ')'; ! } ! ! function db_get() ! { ! global $db; ! ! $sql = "SELECT * ! FROM " . PORTAL_TABLE . " ! WHERE portal_id = '1'"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt query portal configuration', '', __LINE__, __FILE__, $sql ); ! } ! ! $row = $db->sql_fetchrow( $result ); ! ! foreach ( $row as $config_name => $config_value ) ! { ! $portal_config[$config_name] = trim( $config_value ); ! } ! ! $db->sql_freeresult( $result ); ! ! return ( $portal_config ); ! } ! } ! /********************************************************************************\ | Class: mx_cache *************** *** 1933,1937 **** // ! function read_block_config( $block_id, $cache = true ) { global $mx_cache, $mx_block; --- 2107,2111 ---- // ! function read_block_config( $block_id, $force_query = false ) { global $mx_cache, $mx_block; *************** *** 1939,1943 **** if ( empty( $mx_block->block_config[$block_id] ) ) { ! $block_config_temp = $mx_cache->read( $block_id, MX_CACHE_BLOCK_TYPE, $cache ); $block_config_temp[$block_id] = array_merge($block_config_temp[$block_id]['block_info'], $block_config_temp[$block_id]['block_parameters']); return $block_config_temp; --- 2113,2117 ---- if ( empty( $mx_block->block_config[$block_id] ) ) { ! $block_config_temp = $mx_cache->read( $block_id, MX_CACHE_BLOCK_TYPE, $force_query ); $block_config_temp[$block_id] = array_merge($block_config_temp[$block_id]['block_info'], $block_config_temp[$block_id]['block_parameters']); return $block_config_temp; Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mx_functions_phpbb.php 13 Oct 2005 17:25:51 -0000 1.15 --- mx_functions_phpbb.php 8 Dec 2005 14:41:48 -0000 1.16 *************** *** 598,601 **** --- 598,602 ---- mx_message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.'); } + // Redirect via an HTML form for PITA webservers if ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_functions_admincp.php 23 Oct 2005 18:48:20 -0000 1.12 --- mx_functions_admincp.php 8 Dec 2005 14:41:48 -0000 1.13 *************** *** 150,154 **** $row = $db->sql_fetchrow($result); ! $module_id_new = $row[next_id]; // --- 150,154 ---- $row = $db->sql_fetchrow($result); ! $module_id_new = $row['next_id']; // Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** page_header.php 25 Nov 2005 02:52:16 -0000 1.26 --- page_header.php 8 Dec 2005 14:41:48 -0000 1.27 *************** *** 103,281 **** // - // Get basic (usernames + totals) online - // situation - // - // This code is moved to the mx_online coreblock - // - /* - $logged_visible_online = 0; - $logged_hidden_online = 0; - $guests_online = 0; - $online_userlist = ''; - $l_online_users = ''; - - if (defined('SHOW_ONLINE')) - { - - $user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = " . intval($forum_id) : ''; - $sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip - FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s - WHERE u.user_id = s.session_user_id - AND s.session_time >= ".( time() - 300 ) . " - $user_forum_sql - ORDER BY u.username ASC, s.session_ip ASC"; - if( !($result = $db->sql_query($sql)) ) - { - mx_message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql); - } - - $userlist_ary = array(); - $userlist_visible = array(); - - $prev_user_id = 0; - $prev_user_ip = $prev_session_ip = ''; - - while( $row = $db->sql_fetchrow($result) ) - { - // User is logged in and therefor not a guest - if ( $row['session_logged_in'] ) - { - // Skip multiple sessions for one user - if ( $row['user_id'] != $prev_user_id ) - { - $style_color = ''; - if ( $row['user_level'] == ADMIN ) - { - $row['username'] = '<b>' . $row['username'] . '</b>'; - $style_color = 'style="color:#' . $theme['fontcolor3'] . '"'; - } - else if ( $row['user_level'] == MOD ) - { - $row['username'] = '<b>' . $row['username'] . '</b>'; - $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; - } - - if ( $row['user_allow_viewonline'] ) - { - $user_online_link = '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>'; - $logged_visible_online++; - } - else - { - $user_online_link = '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>'; - $logged_hidden_online++; - } - - if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN ) - { - $online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link; - } - } - - $prev_user_id = $row['user_id']; - } - else - { - // Skip multiple sessions for one user - if ( $row['session_ip'] != $prev_session_ip ) - { - $guests_online++; - } - } - - $prev_session_ip = $row['session_ip']; - } - $db->sql_freeresult($result); - - if ( empty($online_userlist) ) - { - $online_userlist = $lang['None']; - } - $online_userlist = ( ( isset($forum_id) ) ? $lang['Browsing_forum'] : $lang['Registered_users'] ) . ' ' . $online_userlist; - - $total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online; - - if ( $total_online_users > $board_config['record_online_users']) - { - $board_config['record_online_users'] = $total_online_users; - $board_config['record_online_date'] = time(); - - $sql = "UPDATE " . CONFIG_TABLE . " - SET config_value = '$total_online_users' - WHERE config_name = 'record_online_users'"; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update online user record (nr of users)', '', __LINE__, __FILE__, $sql); - } - - $sql = "UPDATE " . CONFIG_TABLE . " - SET config_value = '" . $board_config['record_online_date'] . "' - WHERE config_name = 'record_online_date'"; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql); - } - } - - if ( $total_online_users == 0 ) - { - $l_t_user_s = $lang['Online_users_zero_total']; - } - else if ( $total_online_users == 1 ) - { - $l_t_user_s = $lang['Online_user_total']; - } - else - { - $l_t_user_s = $lang['Online_users_total']; - } - - if ( $logged_visible_online == 0 ) - { - $l_r_user_s = $lang['Reg_users_zero_total']; - } - else if ( $logged_visible_online == 1 ) - { - $l_r_user_s = $lang['Reg_user_total']; - } - else - { - $l_r_user_s = $lang['Reg_users_total']; - } - - if ( $logged_hidden_online == 0 ) - { - $l_h_user_s = $lang['Hidden_users_zero_total']; - } - else if ( $logged_hidden_online == 1 ) - { - $l_h_user_s = $lang['Hidden_user_total']; - } - else - { - $l_h_user_s = $lang['Hidden_users_total']; - } - - if ( $guests_online == 0 ) - { - $l_g_user_s = $lang['Guest_users_zero_total']; - } - else if ( $guests_online == 1 ) - { - $l_g_user_s = $lang['Guest_user_total']; - } - else - { - $l_g_user_s = $lang['Guest_users_total']; - } - - $l_online_users = sprintf($l_t_user_s, $total_online_users); - $l_online_users .= sprintf($l_r_user_s, $logged_visible_online); - $l_online_users .= sprintf($l_h_user_s, $logged_hidden_online); - $l_online_users .= sprintf($l_g_user_s, $guests_online); - } - */ - - // // Obtain number of new private messages // if user is logged in --- 103,106 ---- *************** *** 384,389 **** 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), ! //'TOTAL_USERS_ONLINE' => $l_online_users, ! //'LOGGED_IN_USER_LIST' => $online_userlist, 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, --- 209,213 ---- 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), ! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** mx_functions.php 22 Oct 2005 10:51:02 -0000 1.51 --- mx_functions.php 8 Dec 2005 14:41:48 -0000 1.52 *************** *** 572,640 **** function get_page_id($search_item, $use_function_file = false) { ! global $db; ! ! if( $use_function_file ) ! { ! $sql = "SELECT * FROM " . FUNCTION_TABLE . " WHERE function_file = '$search_item' LIMIT 1"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query Activity Mod module information", '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($result); ! $function_id = $row['function_id']; ! ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE function_id = '$function_id' LIMIT 1"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query " . $search_item . " module information", '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($result); ! $search_item = $row['block_id']; ! } // ! // First, see if we can get the page_id from ordinary blocks // ! $sql = "SELECT pag.page_id ! FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col ! WHERE pag.page_id = col.page_id ! AND bct.column_id = col.column_id ! AND bct.block_id = '" . $search_item . "' ! ORDER BY pag.page_id"; ! ! if( !($p_result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query column list", '', __LINE__, __FILE__, $sql); ! } ! $p_row = $db->sql_fetchrow($p_result); ! ! if( !empty($p_row['page_id']) ) { ! return $p_row['page_id']; } ! ! // ! // Find all dynamic block Page_ids, if not present as ordinary block ! // ! $sql = "SELECT pag.page_id ! FROM " . PAGE_TABLE . " pag, ! " . BLOCK_TABLE . " blk, ! " . MENU_NAV_TABLE . " nav, ! " . MENU_CAT_TABLE . " nac ! WHERE pag.page_id = nav.page_id AND nav.page_id > 0 ! AND nac.cat_id = nav.cat_id ! AND nav.block_id = blk.block_id ! AND nav.block_id = '" . $search_item . "' ! ORDER BY blk.block_id"; ! ! if( !($p_result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Could not query column list", '', __LINE__, __FILE__, $sql); } - $p_row = $db->sql_fetchrow($p_result); ! return ( !empty($p_row['page_id']) ) ? $p_row['page_id'] : ''; } --- 572,655 ---- function get_page_id($search_item, $use_function_file = false) { ! global $db, $userdata, $mx_config_cache; // ! // Try to reuse group_id results. // ! $cache_key = 'pagemap_block' . $search_item; ! ! if ( $mx_config_cache->exists( $cache_key ) ) { ! $page_id = $mx_config_cache->get( $cache_key ); ! return $page_id; } ! else { ! if( $use_function_file ) ! { ! $sql = "SELECT * FROM " . FUNCTION_TABLE . " WHERE function_file = '$search_item' LIMIT 1"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query Activity Mod module information", '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($result); ! $function_id = $row['function_id']; ! ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE function_id = '$function_id' LIMIT 1"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query " . $search_item . " module information", '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($result); ! $search_item = $row['block_id']; ! } ! ! // ! // First, see if we can get the page_id from ordinary blocks ! // ! $sql = "SELECT pag.page_id ! FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col ! WHERE pag.page_id = col.page_id ! AND bct.column_id = col.column_id ! AND bct.block_id = '" . $search_item . "' ! ORDER BY pag.page_id"; ! ! if( !($p_result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query column list", '', __LINE__, __FILE__, $sql); ! } ! $p_row = $db->sql_fetchrow($p_result); ! ! if( empty($p_row['page_id']) ) ! { ! // ! // Find all dynamic block Page_ids, if not present as ordinary block ! // ! $sql = "SELECT pag.page_id ! FROM " . PAGE_TABLE . " pag, ! " . BLOCK_TABLE . " blk, ! " . MENU_NAV_TABLE . " nav, ! " . MENU_CAT_TABLE . " nac ! WHERE pag.page_id = nav.page_id AND nav.page_id > 0 ! AND nac.cat_id = nav.cat_id ! AND nav.block_id = blk.block_id ! AND nav.block_id = '" . $search_item . "' ! ORDER BY blk.block_id"; ! ! if( !($p_result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Could not query column list", '', __LINE__, __FILE__, $sql); ! } ! $p_row = $db->sql_fetchrow($p_result); ! } ! ! $page_id = ( !empty($p_row['page_id']) ) ? $p_row['page_id'] : ''; ! ! $mx_config_cache->put( $cache_key, $page_id ); } ! return $page_id; } |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:42:02
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135/admin Modified Files: admin_mx_portal.php index.php Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** admin_mx_portal.php 12 Oct 2005 15:37:32 -0000 1.19 --- admin_mx_portal.php 8 Dec 2005 14:41:47 -0000 1.20 *************** *** 63,69 **** mx_message_die(GENERAL_ERROR, "Failed to update portal configuration ", "", __LINE__, __FILE__, $sql); } ! $message = $lang['Portal_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_portal_config'], "<a href=\"" . append_sid("admin_mx_portal.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); - mx_message_die(GENERAL_MESSAGE, $message); } --- 63,70 ---- mx_message_die(GENERAL_ERROR, "Failed to update portal configuration ", "", __LINE__, __FILE__, $sql); } ! ! $mx_config_cache->unload(); ! $message = $lang['Portal_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_portal_config'], "<a href=\"" . append_sid("admin_mx_portal.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** index.php 29 Oct 2005 17:40:53 -0000 1.17 --- index.php 8 Dec 2005 14:41:47 -0000 1.18 *************** *** 769,773 **** $errstr = $phpbb_version_info = ''; ! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr)) { @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); --- 769,773 ---- $errstr = $phpbb_version_info = ''; ! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) { @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:41:59
|
Update of /cvsroot/mxbb/core/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135/install/schemas Modified Files: mysql_schema_install.sql mysql_schema_upgrade_to_2.8_rc7.sql Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: mysql_schema_install.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_install.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mysql_schema_install.sql 22 Oct 2005 23:18:27 -0000 1.8 --- mysql_schema_install.sql 8 Dec 2005 14:41:48 -0000 1.9 *************** *** 17,26 **** `function_id` smallint(5) unsigned default NULL, `auth_view` tinyint(2) NOT NULL default '0', ! `auth_edit` tinyint(2) default '0', ! `auth_delete` tinyint(2) default '0', ! `auth_view_group` varchar(255) NOT NULL default '0', ! `auth_edit_group` varchar(255) NOT NULL default '0', ! `auth_delete_group` varchar(255) NOT NULL default '0', ! `auth_moderator_group` varchar(255) NOT NULL default '0', `show_title` tinyint(2) unsigned NOT NULL default '1', `show_block` tinyint(2) unsigned NOT NULL default '1', --- 17,26 ---- `function_id` smallint(5) unsigned default NULL, `auth_view` tinyint(2) NOT NULL default '0', ! `auth_edit` tinyint(2) NOT NULL default '0', ! `auth_delete` tinyint(2) NOT NULL default '0', ! `auth_view_group` smallint(5) NOT NULL default '0', ! `auth_edit_group` smallint(5) NOT NULL default '0', ! `auth_delete_group` smallint(5) NOT NULL default '0', ! `auth_moderator_group` smallint(5) NOT NULL default '0', `show_title` tinyint(2) unsigned NOT NULL default '1', `show_block` tinyint(2) unsigned NOT NULL default '1', *************** *** 389,394 **** `page_icon` varchar(255) default NULL, `auth_view` tinyint(2) NOT NULL default '0', ! `auth_view_group` varchar(255) NOT NULL default '0', ! `auth_moderator_group` varchar(255) NOT NULL default '0', `page_header` varchar(255) default 'overall_header.tpl', `page_graph_border` varchar(255) NOT NULL default '', --- 389,394 ---- `page_icon` varchar(255) default NULL, `auth_view` tinyint(2) NOT NULL default '0', ! `auth_view_group` smallint(5) NOT NULL default '0', ! `auth_moderator_group` smallint(5) NOT NULL default '0', `page_header` varchar(255) default 'overall_header.tpl', `page_graph_border` varchar(255) NOT NULL default '', Index: mysql_schema_upgrade_to_2.8_rc7.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_upgrade_to_2.8_rc7.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mysql_schema_upgrade_to_2.8_rc7.sql 15 Oct 2005 22:26:21 -0000 1.2 --- mysql_schema_upgrade_to_2.8_rc7.sql 8 Dec 2005 14:41:48 -0000 1.3 *************** *** 15,17 **** # New Fields in Table `mx_portal` # ! ALTER TABLE mx_table_portal ADD mod_rewrite VARCHAR(255) NOT NULL DEFAULT '0'; \ No newline at end of file --- 15,44 ---- # New Fields in Table `mx_portal` # ! ALTER TABLE mx_table_portal ADD mod_rewrite VARCHAR(255) NOT NULL DEFAULT '0'; ! ! # ------------------------------------------------------------ ! # ! # Changed Fields in Table `mx_block` (updated type) ! # ! ALTER TABLE mx_table_block MODIFY auth_view tinyint(2) NOT NULL default '0'; ! ALTER TABLE mx_table_block MODIFY auth_view tinyint(2) NOT NULL default '0'; ! ALTER TABLE mx_table_block MODIFY auth_view tinyint(2) NOT NULL default '0'; ! ! ALTER TABLE mx_table_block MODIFY auth_view_group smallint(5) NOT NULL default '0'; ! ALTER TABLE mx_table_block MODIFY auth_edit_group smallint(5) NOT NULL default '0'; ! ALTER TABLE mx_table_block MODIFY auth_delete_group smallint(5) NOT NULL default '0'; ! ALTER TABLE mx_table_block MODIFY auth_moderator_group smallint(5) NOT NULL default '0'; ! ! # ------------------------------------------------------------ ! # ! # Changed Fields in Table `mx_page` (updated type) ! # ! ALTER TABLE mx_table_page MODIFY auth_view tinyint(2) NOT NULL default '0'; ! ALTER TABLE mx_table_page MODIFY auth_view_group smallint(5) NOT NULL default '0'; ! ! # ------------------------------------------------------------ ! # ! # Changed Fields in Table `mx_menu_nav` (updated type) ! # ! ALTER TABLE mx_table_menu_nav MODIFY auth_view tinyint(2) NOT NULL default '0'; ! ALTER TABLE mx_table_menu_nav MODIFY auth_view_group smallint(5) NOT NULL default '0'; \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:41:59
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135/templates/subSilver/admin Modified Files: index_frameset.tpl page_header.tpl Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: page_header.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/page_header.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page_header.tpl 27 Apr 2005 21:51:36 -0000 1.3 --- page_header.tpl 8 Dec 2005 14:41:49 -0000 1.4 *************** *** 1,4 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html> <head> {META} --- 1,4 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html dir="{S_CONTENT_DIRECTION}"> <head> {META} Index: index_frameset.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/index_frameset.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index_frameset.tpl 20 Aug 2005 18:19:12 -0000 1.5 --- index_frameset.tpl 8 Dec 2005 14:41:49 -0000 1.6 *************** *** 1,3 **** ! <html> <head> <title>mxBB-Portal Administration</title> --- 1,3 ---- ! <html dir="{S_CONTENT_DIRECTION}"> <head> <title>mxBB-Portal Administration</title> |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:41:59
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135 Modified Files: common.php login.php Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: login.php =================================================================== RCS file: /cvsroot/mxbb/core/login.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** login.php 25 Nov 2005 02:52:16 -0000 1.13 --- login.php 8 Dec 2005 14:41:48 -0000 1.14 *************** *** 212,215 **** --- 212,216 ---- make_jumpbox($phpbb_root_path . 'viewforum.'.$phpEx); + $layouttemplate->assign_vars(array( 'USERNAME' => $username, Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** common.php 25 Nov 2005 02:52:16 -0000 1.42 --- common.php 8 Dec 2005 14:41:48 -0000 1.43 *************** *** 27,31 **** // ================================================================================ ! // The following code is based on common.php from phpBB 2.0.18 // ================================================================================ --- 27,31 ---- // ================================================================================ ! // The following code is based on common.php from phpBB // ================================================================================ *************** *** 37,41 **** // PHP5 with register_long_arrays off? ! if (@phpversion() >= '5.0.0' && (!ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; --- 37,41 ---- // PHP5 with register_long_arrays off? ! if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; *************** *** 69,75 **** // PHP4+ path $not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path'); ! //+MOD: Added by mxBB $not_unset[] = 'mx_root_path'; ! //-MOD: Added by mxBB // Not only will array_merge give a warning if a parameter --- 69,75 ---- // PHP4+ path $not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path'); ! //+MOD: Added by mxBB $not_unset[] = 'mx_root_path'; ! //-MOD: Added by mxBB // Not only will array_merge give a warning if a parameter *************** *** 99,102 **** --- 99,103 ---- } + // // addslashes to vars if magic_quotes_gpc is off *************** *** 185,189 **** if( !defined('MX_INSTALLED') ) { ! header("Location: " . $mx_root_path . "install/mx_install.$phpEx"); exit; } --- 186,190 ---- if( !defined('MX_INSTALLED') ) { ! header("Location: ' . $mx_root_path . 'install/mx_install.$phpEx"); exit; } *************** *** 207,212 **** include_once($mx_root_path . 'includes/mx_functions_core.' . $phpEx); - $portal_config = get_info(PORTAL_TABLE, 'portal_id', 1); define('PHPBB_URL', $portal_config['portal_phpbb_url']); define('PORTAL_URL', $portal_config['portal_url']); --- 208,230 ---- include_once($mx_root_path . 'includes/mx_functions_core.' . $phpEx); + // We do not need this any longer, unset for safety purposes + unset($dbpasswd); + + // + // Read mx_config data + // - instatiate the mx_config_cache class + // + $mx_config_cache = new mx_config_cache(); + + if ( $mx_config_cache->exists( 'config' ) ) + { + $portal_config = $mx_config_cache->get( 'config' ); + } + else + { + $portal_config = $mx_config_cache->db_get(); + $mx_config_cache->put( 'config', $portal_config ); + } define('PHPBB_URL', $portal_config['portal_phpbb_url']); define('PORTAL_URL', $portal_config['portal_url']); *************** *** 263,266 **** --- 281,285 ---- $sql = "SELECT * FROM " . CONFIG_TABLE; + if( !($result = $db->sql_query($sql)) ) { |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:41:59
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135/modules/mx_navmenu/admin Modified Files: mx_module_defs.php Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/admin/mx_module_defs.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mx_module_defs.php 23 Oct 2005 18:48:21 -0000 1.11 --- mx_module_defs.php 8 Dec 2005 14:41:48 -0000 1.12 *************** *** 271,274 **** --- 271,275 ---- } + /* // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name *************** *** 285,288 **** --- 286,290 ---- $groupdata[] = $row; } + */ // |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:41:57
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135/modules/mx_coreblocks/templates/subSilver Modified Files: mx_login.tpl Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: mx_login.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver/mx_login.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_login.tpl 22 Oct 2005 10:51:02 -0000 1.9 --- mx_login.tpl 8 Dec 2005 14:41:48 -0000 1.10 *************** *** 5,9 **** --- 5,11 ---- {L_USERNAME}:<br /><input class="post" type="text" name="username" size="10" /><br /> {L_PASSWORD}:<br /><input class="post" type="password" name="password" size="10" /><br /> + <!-- BEGIN switch_allow_autologin --> <input class="text" type="checkbox" name="autologin" /> {L_AUTO_LOGIN}<br /> + <!-- END switch_allow_autologin --> <!--<input type="checkbox" class="post" name="autologin" value="ON" /> {L_AUTO_LOGIN}<br />--> <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /></span> |
|
From: Jon O. <jon...@us...> - 2005-12-08 14:41:56
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31135/modules/mx_navmenu Modified Files: mx_menu_nav.php Log Message: - Security patch for 2.0.18 - added custom cache (eg for portal_configs etc) - minor fixes Index: mx_menu_nav.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/mx_menu_nav.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_menu_nav.php 23 Oct 2005 18:48:21 -0000 1.5 --- mx_menu_nav.php 8 Dec 2005 14:41:48 -0000 1.6 *************** *** 60,63 **** --- 60,66 ---- } + // + // Query data + // $sql = "SELECT * FROM " . MENU_CAT_TABLE . " cat, |
|
From: Jon O. <jon...@us...> - 2005-12-05 22:25:27
|
Update of /cvsroot/mxbb/core27x In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32005/core27x Modified Files: common.php login.php mx_announce.php mx_forum.php Log Message: Updated - more is backported - some is fixed Index: login.php =================================================================== RCS file: /cvsroot/mxbb/core27x/login.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** login.php 30 Nov 2005 23:50:44 -0000 1.2 --- login.php 5 Dec 2005 22:25:12 -0000 1.3 *************** *** 1,23 **** <?php ! /*************************************************************************** ! * login.php ! * ------------------- ! * begin : Saturday, Feb 13, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... ! * ! * $Id$ ! * ! * ! ***************************************************************************/ ! /*************************************************************************** ! * ! * 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. ! * ! ***************************************************************************/ // --- 1,21 ---- <?php ! /** ------------------------------------------------------------------------ ! * Subject : mxBB - a fully modular portal and CMS (for phpBB) ! * Author : Jon Ohlsson and the mxBB Team ! * Credits : The phpBB Group & Marc Morisette ! * Copyright : (C) 2002-2005 mxBB Portal ! * Email : jo...@mx... ! * Project site : www.mxbb-portal.com ! * ------------------------------------------------------------------------- ! * ! * $Id$ ! */ ! /** ! * 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. ! */ // *************** *** 52,59 **** if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) ) ! { ! if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] ) { ! $username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : ''; $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : ''; --- 50,57 ---- if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) ) ! { ! if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && (!$userdata['session_logged_in'] || isset($HTTP_POST_VARS['admin'])) ) { ! $username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : ''; $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : ''; *************** *** 61,65 **** FROM " . USERS_TABLE . " WHERE username = '" . str_replace("\\'", "''", $username) . "'"; ! if ( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql); --- 59,63 ---- FROM " . USERS_TABLE . " WHERE username = '" . str_replace("\\'", "''", $username) . "'"; ! if ( !($result = $db->sql_query($sql) ) ) { mx_message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql); *************** *** 78,82 **** $autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0; ! $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin); if( $session_id ) --- 76,81 ---- $autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0; ! $admin = (isset($HTTP_POST_VARS['admin'])) ? 1 : 0; ! $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin, $admin); if( $session_id ) *************** *** 130,134 **** } else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] ) ! { // session id check // added in accordance with phpBB 2.0.18 --- 129,133 ---- } else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] ) ! { // session id check // added in accordance with phpBB 2.0.18 *************** *** 137,141 **** message_die(GENERAL_ERROR, 'Invalid_session'); } ! if( $userdata['session_logged_in'] ) { --- 136,140 ---- message_die(GENERAL_ERROR, 'Invalid_session'); } ! if( $userdata['session_logged_in'] ) { *************** *** 161,170 **** } else ! { // // Do a full login page dohickey if // user not already logged in // ! if( !$userdata['session_logged_in'] ) { $page_title = $lang['Login']; --- 160,169 ---- } else ! { // // Do a full login page dohickey if // user not already logged in // ! if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN)) { $page_title = $lang['Login']; *************** *** 177,181 **** // added in accordance with phpBB 2.0.18 $forward_page = ''; ! if( isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) ) { --- 176,180 ---- // added in accordance with phpBB 2.0.18 $forward_page = ''; ! if( isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) ) { *************** *** 189,192 **** --- 188,192 ---- if(count($forward_match) > 1) { + for($i = 1; $i < count($forward_match); $i++) { *************** *** 208,221 **** } } $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : ''; $s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />'; ! make_jumpbox($phpbb_root_path . 'viewforum.'.$phpEx); $template->assign_vars(array( 'USERNAME' => $username, ! 'L_ENTER_PASSWORD' => $lang['Enter_password'], 'L_SEND_PASSWORD' => $lang['Forgotten_password'], --- 208,226 ---- } } + else + { + $forward_page = ''; + } $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : ''; $s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />'; + $s_hidden_fields .= (isset($HTTP_GET_VARS['admin'])) ? '<input type="hidden" name="admin" value="1" />' : ''; ! make_jumpbox($phpbb_root_path . 'viewforum.'.$phpEx, $forum_id); $template->assign_vars(array( 'USERNAME' => $username, ! 'L_ENTER_PASSWORD' => (isset($HTTP_GET_VARS['admin'])) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'], 'L_SEND_PASSWORD' => $lang['Forgotten_password'], Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core27x/common.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** common.php 5 Dec 2005 19:25:26 -0000 1.4 --- common.php 5 Dec 2005 22:25:12 -0000 1.5 *************** *** 30,34 **** // ================================================================================ ! // The following code is based on common.php from phpBB 2.0.14 // ================================================================================ --- 30,34 ---- // ================================================================================ ! // The following code is based on common.php from phpBB // ================================================================================ *************** *** 189,193 **** str_replace("//", "/", $phpbb_root_path); - include_once($mx_root_path . 'config.' . $phpEx); include_once($phpbb_root_path . 'includes/constants.' . $phpEx); --- 189,192 ---- *************** *** 266,293 **** mx_session_start(); // Note: this needs $board_config populated! - - //++ MX System - // - // if ( $language ) - // { - // $board_config['default_lang'] = $language; - // setcookie('default_lang', $language, (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); - // } - // elseif ( isset($HTTP_COOKIE_VARS['default_lang']) ) - // { - // $board_config['default_lang'] = $HTTP_COOKIE_VARS['default_lang']; - // } - // if ( $style ) - // { - // $board_config['default_style'] = $style; - // setcookie('default_style', $style, (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); - // } - // elseif ( isset($HTTP_COOKIE_VARS['default_style']) ) - // { - // $board_config['default_style'] = $HTTP_COOKIE_VARS['default_style']; - // } - // - //-- MX System - if( file_exists($phpbb_root_path . 'attach_mod') ) { --- 265,268 ---- Index: mx_announce.php =================================================================== RCS file: /cvsroot/mxbb/core27x/mx_announce.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_announce.php 5 Dec 2005 19:25:26 -0000 1.2 --- mx_announce.php 5 Dec 2005 22:25:12 -0000 1.3 *************** *** 20,23 **** --- 20,28 ---- */ + if ( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // // Read block Configuration Index: mx_forum.php =================================================================== RCS file: /cvsroot/mxbb/core27x/mx_forum.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_forum.php 5 Dec 2005 19:25:26 -0000 1.3 --- mx_forum.php 5 Dec 2005 22:25:12 -0000 1.4 *************** *** 24,37 **** if ( !defined('IN_PORTAL') ) { ! define('IN_PORTAL', 1); ! $mx_root_path = '../../'; ! ! $include_page_tail = 1; ! ! include($mx_root_path . 'extension.inc'); ! include($mx_root_path . 'common.' . $phpEx); ! ! $userdata = session_pagestart($user_ip, PAGE_FORUM); ! mx_init_userprefs($userdata); } --- 24,28 ---- if ( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } |