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...> - 2006-07-04 22:34:07
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12783/modules/mx_kb/kb/modules Modified Files: kb_article.php kb_cat.php kb_rate.php kb_search.php kb_stats.php Log Message: lots of optimizations Index: kb_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_stats.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_stats.php 7 Jun 2006 20:28:54 -0000 1.3 --- kb_stats.php 4 Jul 2006 22:33:32 -0000 1.4 *************** *** 69,73 **** )); ! $this->display_stats( $stats, '1', 'articlerow', $start, $kb_config['pagination'] ); // --- 69,74 ---- )); ! $this->display_stats( $start, $stats ); ! //$this->display_stats( $stats, '1', 'articlerow', $start, $kb_config['pagination'] ); // Index: kb_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_rate.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_rate.php 28 Jun 2006 21:18:14 -0000 1.5 --- kb_rate.php 4 Jul 2006 22:33:32 -0000 1.6 *************** *** 27,58 **** 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'] ); --- 27,56 ---- function main( $action ) { ! global $template, $lang, $board_config, $phpEx, $kb_config, $db, $userdata; ! global $phpbb_root_path, $mx_kb_user, $mx_kb_functions; ! global $mx_root_path, $module_root_path, $is_block, $phpEx, $mx_request_vars; ! // ======================================================= // Request vars ! // ======================================================= ! $article_id = $mx_request_vars->request('k', MX_TYPE_INT, ''); if ( empty( $article_id ) ) { ! mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); } ! $rating = ( isset( $_POST['rating'] ) ) ? intval( $_POST['rating'] ) : ''; ! $sql = 'SELECT article_title, article_category_id ! 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_data = $db->sql_fetchrow( $result ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); *************** *** 61,183 **** $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 ( !$this->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() ); - $path_kb = $lang['Rate']; $template->assign_vars( array( ! 'S_RATE_ACTION' => append_sid( this_kb_mxurl( ) ), 'L_RATE' => $lang['Rate'], 'L_RERROR' => $lang['Rerror'], --- 59,109 ---- $db->sql_freeresult( $result ); ! if ( !$this->auth_user[$article_data['article_category_id']]['auth_rate'] ) { ! if ( !$userdata['session_logged_in'] ) { ! mx_message_die( GENERAL_MESSAGE, 'not logged in' ); } + mx_message_die( GENERAL_MESSAGE, $lang['Not_authorized'] ); } ! $template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'L_RATE' => $lang['Rate'], ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( this_kb_mxurl() ), ! 'U_FILE_NAME' => append_sid( this_kb_mxurl( 'mode=article&k=' . $article_id ) ), ! 'FILE_NAME' => $article_data['file_name'], ! 'DOWNLOAD' => $kb_config['module_name'] ! )); ! if ( isset( $_POST['submit'] ) ) ! { ! $result_msg = str_replace( "{filename}", $article_data['article_title'], $lang['Rconf'] ); ! $result_msg = str_replace( "{rate}", $rating, $result_msg ); ! if ( ( $rating <= 0 ) or ( $rating > 10 ) ) { ! mx_message_die( GENERAL_ERROR, 'Bad submited value' ); } ! $mx_kb_user->update_voter_info( $article_id, $rating, $article_data['article_category_id'] ); ! $rate_info = $mx_kb_functions->get_rating( $article_id ); ! $result_msg = str_replace( "{newrating}", $rate_info, $result_msg ); + $message = $result_msg . '<br /><br />' . sprintf( $lang['Click_return'], "<a href=\"" . append_sid( this_kb_mxurl( "action=link&link_id=$article_id" ) ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } else { ! $rate_info = str_replace( "{filename}", $article_data['article_title'], $lang['Rateinfo'] ); $template->assign_vars( array( ! 'S_RATE_ACTION' => append_sid( this_kb_mxurl( 'mode=rate&k=' . $article_id ) ), 'L_RATE' => $lang['Rate'], 'L_RERROR' => $lang['Rerror'], *************** *** 192,197 **** 'L_R9' => $lang['R9'], 'L_R10' => $lang['R10'], ! 'RATEINFO' => $rateinfo, ! 'PATH' => '» ' . $path_kb, 'ID' => $article_id ) ); --- 118,122 ---- 'L_R9' => $lang['R9'], 'L_R10' => $lang['R10'], ! 'RATEINFO' => $rate_info, 'ID' => $article_id ) ); *************** *** 199,215 **** // =================================================== ! // 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 ); } } --- 124,131 ---- // =================================================== ! // assign var for navigation // =================================================== ! $this->generate_navigation( $article_data['article_category_id'] ); ! $template->set_filenames( array( 'body' => 'kb_rate_body.tpl' ) ); } } Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_article.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_article.php 28 Jun 2006 13:58:08 -0000 1.8 --- kb_article.php 4 Jul 2006 22:33:32 -0000 1.9 *************** *** 45,51 **** mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); } ! $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = $article_id"; if ( !( $result = $db->sql_query( $sql ) ) ) { --- 45,75 ---- mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); } ! ! // ======================================================= ! // article id is not set, give him/her a nice error message ! // ======================================================= ! switch ( SQL_LAYER ) ! { ! case 'oracle': ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username ! FROM " . KB_ARTICLES_TABLE . " AS f, " . KB_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u ! WHERE f.article_id = r.votes_article(+) ! AND f.article_author_id = u.user_id(+) ! AND f.article_id = $article_id ! AND f.approved = 1 ! GROUP BY f.article_id "; ! break; ! ! default: ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username ! FROM " . KB_ARTICLES_TABLE . " AS f ! LEFT JOIN " . KB_VOTES_TABLE . " AS r ON f.article_id = r.votes_article ! LEFT JOIN " . USERS_TABLE . " AS u ON f.article_author_id = u.user_id ! WHERE f.article_id = $article_id ! AND f.approved = 1 ! GROUP BY f.article_id "; ! break; ! } ! if ( !( $result = $db->sql_query( $sql ) ) ) { *************** *** 352,356 **** if ( $this->ratings[$article_category_id]['activated'] ) { ! $article_rating = ( $kb_row['article_rating'] != 0 ) ? round( $kb_row['article_rating'] / $kb_row['article_totalvotes'], 2 ) . ' / 10' : $lang['No_votes']; if ( $this->auth_user[$article_category_id]['auth_rate'] ) --- 376,380 ---- if ( $this->ratings[$article_category_id]['activated'] ) { ! $article_rating = ( $kb_row['rating'] != 0 ) ? round( $kb_row['rating'] / $kb_row['total_votes'], 2 ) . ' / 10' : $lang['No_votes']; if ( $this->auth_user[$article_category_id]['auth_rate'] ) Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_cat.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_cat.php 17 Jun 2006 20:11:24 -0000 1.4 --- kb_cat.php 4 Jul 2006 22:33:32 -0000 1.5 *************** *** 159,163 **** // Get articles // ! $this->display_articles( $category_id, '1', 'articlerow', $start, $kb_config['pagination'] ); // --- 159,164 ---- // Get articles // ! $this->display_articles( $start, $category_id ); ! //$this->display_articles( $category_id, '1', 'articlerow', $start, $kb_config['pagination'] ); // Index: kb_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_search.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_search.php 7 Jun 2006 20:28:54 -0000 1.4 --- kb_search.php 4 Jul 2006 22:33:32 -0000 1.5 *************** *** 95,99 **** break; case 'article_rating': ! $sort_method = 'article_rating'; break; /* --- 95,99 ---- break; case 'article_rating': ! //$sort_method = 'article_rating'; break; /* *************** *** 479,486 **** { case 'oracle': ! $sql = "SELECT a.*, a.article_rating AS rating, a.article_totalvotes AS total_votes, u.user_id, u.username, c.category_id, c.category_name, COUNT(cm.comments_id) AS total_comments FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . KB_CATEGORIES_TABLE . " AS c, " . KB_COMMENTS_TABLE . " AS cm WHERE a.article_id IN ($search_results) ! AND a.article_id = r.votes_file(+) AND a.article_author_id = u.user_id(+) AND a.article_id = cm.article_id(+) --- 479,486 ---- { case 'oracle': ! $sql = "SELECT a.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username, c.category_id, c.category_name, COUNT(cm.comments_id) AS total_comments FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . KB_CATEGORIES_TABLE . " AS c, " . KB_COMMENTS_TABLE . " AS cm WHERE a.article_id IN ($search_results) ! AND a.article_id = r.votes_article(+) AND a.article_author_id = u.user_id(+) AND a.article_id = cm.article_id(+) *************** *** 493,499 **** default: ! $sql = "SELECT a.*, a.article_rating AS rating, a.article_totalvotes AS total_votes, u.user_id, u.username, c.category_id, c.category_name, COUNT(cm.comments_id) AS total_comments FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_CATEGORIES_TABLE . " AS c ! LEFT JOIN " . KB_VOTES_TABLE . " AS r ON a.article_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON a.article_author_id = u.user_id LEFT JOIN " . KB_COMMENTS_TABLE . " AS cm ON a.article_id = cm.article_id --- 493,499 ---- default: ! $sql = "SELECT a.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username, c.category_id, c.category_name, COUNT(cm.comments_id) AS total_comments FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_CATEGORIES_TABLE . " AS c ! LEFT JOIN " . KB_VOTES_TABLE . " AS r ON a.article_id = r.votes_article LEFT JOIN " . USERS_TABLE . " AS u ON a.article_author_id = u.user_id LEFT JOIN " . KB_COMMENTS_TABLE . " AS cm ON a.article_id = cm.article_id |
|
From: Jon O. <jon...@us...> - 2006-07-04 22:34:06
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12783/modules/mx_kb Modified Files: db_install.php db_upgrade.php Log Message: lots of optimizations Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** db_install.php 3 Jul 2006 09:17:01 -0000 1.41 --- db_install.php 4 Jul 2006 22:33:31 -0000 1.42 *************** *** 121,126 **** topic_id mediumint(8) unsigned NOT NULL default '0', views BIGINT(8) NOT NULL DEFAULT '0', - article_rating double(6,4) NOT NULL default '0.0000', - article_totalvotes int(255) NOT NULL default '0', PRIMARY KEY (article_id) --- 121,124 ---- *************** *** 157,163 **** "CREATE TABLE " . $mx_table_prefix . "kb_votes ( ! votes_ip varchar(50) NOT NULL default '0', ! votes_userid varchar(50) NOT NULL default '0', ! votes_file int(50) NOT NULL default '0' )", --- 155,163 ---- "CREATE TABLE " . $mx_table_prefix . "kb_votes ( ! user_id mediumint(8) NOT NULL default '0', ! votes_ip varchar(50) NOT NULL default '0', ! votes_article int(50) NOT NULL default '0', ! rate_point tinyint(3) unsigned NOT NULL default '0', ! KEY user_id (user_id) )", Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** db_upgrade.php 3 Jul 2006 09:17:01 -0000 1.34 --- db_upgrade.php 4 Jul 2006 22:33:31 -0000 1.35 *************** *** 62,66 **** $message = "<b>Upgrading!</b><br/><br/>"; // validate before 1.05 ! if ( !$result = $db->sql_query( "SELECT article_rating from " . $mx_table_prefix . "kb_articles" ) ) { $upgrade_105 = 1; --- 62,67 ---- $message = "<b>Upgrading!</b><br/><br/>"; // validate before 1.05 ! $result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "kb_config WHERE config_name = 'header_banner'" ); ! if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_105 = 1; *************** *** 415,418 **** --- 416,425 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY cat_order int(50) default NULL "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_votes ADD rate_point tinyint(3) unsigned NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_votes CHANGE votes_userid user_id mediumint(8) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_votes CHANGE votes_file votes_article int(50) NOT NULL default '0' "; + + // Delete kb_article table article_rating and article_totalvotes + } else |
|
From: Jon O. <jon...@us...> - 2006-07-04 22:34:05
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12783/modules/mx_kb/language/lang_english Modified Files: lang_main.php Log Message: lots of optimizations Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_main.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** lang_main.php 17 Jun 2006 20:11:24 -0000 1.10 --- lang_main.php 4 Jul 2006 22:33:32 -0000 1.11 *************** *** 109,113 **** $lang['Rerror'] = 'Sorry, you have already rated this article.'; $lang['Rateinfo'] = 'You are about to rate the article <i>{filename}</i>.<br />Please select a rating. 1 is the worst, 10 is the best.'; ! $lang['Rconf'] = 'You have given <i>{filename}</i> a rating of {rate}.<br />This makes the files new rating {newrating}/10.'; $lang['R1'] = '1'; $lang['R2'] = '2'; --- 109,113 ---- $lang['Rerror'] = 'Sorry, you have already rated this article.'; $lang['Rateinfo'] = 'You are about to rate the article <i>{filename}</i>.<br />Please select a rating. 1 is the worst, 10 is the best.'; ! $lang['Rconf'] = 'You have given <i>{filename}</i> a rating of {rate}.<br />This makes the files new rating {newrating}.'; $lang['R1'] = '1'; $lang['R2'] = '2'; |
|
From: Jon O. <jon...@us...> - 2006-07-04 22:33:40
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12783/modules/mx_kb/templates/subSilver Modified Files: kb_rate_body.tpl Log Message: lots of optimizations Index: kb_rate_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_rate_body.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_rate_body.tpl 28 Jun 2006 21:18:14 -0000 1.7 --- kb_rate_body.tpl 4 Jul 2006 22:33:32 -0000 1.8 *************** *** 1,42 **** ! <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> ! <tr> ! <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> {PATH} ! </td> ! </tr> </table> - <!-- BEGIN rate --> - <form action="{S_RATE_ACTION}" method="POST"> <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> ! <tr> ! <th colspan="2" class="thHead"> {L_RATE}</th> ! </tr> ! <tr> ! <td class="row1" width="90%"><span class="genmed">{RATEINFO}</span></td> ! <td class="row2"> ! <select size="1" name="rating" class="forminput"> ! <option value="1">{L_R1}</option> ! <option value="2">{L_R2}</option> ! <option value="3">{L_R3}</option> ! <option value="4">{L_R4}</option> ! <option value="5" selected>{L_R5}</option> ! <option value="6">{L_R6}</option> ! <option value="7">{L_R7}</option> ! <option value="8">{L_R8}</option> ! <option value="9">{L_R9}</option> ! <option value="10">{L_R10}</option> ! </select> ! <input type="hidden" name="mode" value="rate"> ! <input type="hidden" name="k" value="{ID}"> ! <input type="hidden" name="rate" value="dorate"> ! </td> ! </tr> ! <tr> ! <td colspan="2" class="cat" align="center"><input class="liteoption" type="submit" value="{L_RATE}"> ! ! </td> ! </tr> </table> </form> - <!-- END rate --> --- 1,55 ---- ! <script language="JavaScript" type="text/javascript"> ! <!-- ! function checkRateForm() { ! if (document.rateform.rating.value == -1) ! { ! return false; ! } ! else ! { ! return true; ! } ! } ! // --> ! </script> ! ! <table width="100%" cellpadding="2" cellspacing="2"> ! <tr> ! <td valign="bottom"> ! <span class="nav"><a href="{U_KB}" class="nav">{L_KB}</a> » {L_RATE}</span> ! </td> ! </tr> </table> <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> ! <tr> ! <th colspan="2" class="thHead">{L_RATE}</th> ! </tr> ! <tr> ! <td class="row1" width="90%"><span class="genmed">{RATEINFO}</span></td> ! <td class="row2"> ! <form name="rateform" action="{S_RATE_ACTION}" method="post" onsubmit="return checkRateForm();"> ! <select size="1" name="rating" class="forminput"> ! <option value="-1" selected>{L_RATE}</option> ! <option value="1">{L_R1}</option> ! <option value="2">{L_R2}</option> ! <option value="3">{L_R3}</option> ! <option value="4">{L_R4}</option> ! <option value="5">{L_R5}</option> ! <option value="6">{L_R6}</option> ! <option value="7">{L_R7}</option> ! <option value="8">{L_R8}</option> ! <option value="9">{L_R9}</option> ! <option value="10">{L_R10}</option> ! <input type="hidden" name="action" value="rate"> ! <input type="hidden" name="file_id" value="{ID}"> ! </select> ! </td> ! </tr> ! <tr> ! <td colspan="2" class="cat" align="center"><input class="liteoption" type="submit" value="{L_RATE}" name="submit"> ! ! </td> ! </tr> </table> </form> |
|
From: Jon O. <jon...@us...> - 2006-07-04 22:33:39
|
Update of /cvsroot/mxbb/mx_kb/kb/cache In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12783/modules/mx_kb/kb/cache Removed Files: data_global.php Log Message: lots of optimizations --- data_global.php DELETED --- |
|
From: Jon O. <jon...@us...> - 2006-07-04 22:32:35
|
Update of /cvsroot/mxbb/mx_kb/kb/cache In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12365/modules/mx_kb/kb/cache Modified Files: data_global.php Log Message: have to, before removing Index: data_global.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/cache/data_global.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** data_global.php 25 Jun 2006 21:55:11 -0000 1.4 --- data_global.php 4 Jul 2006 22:32:31 -0000 1.5 *************** *** 0 **** --- 1,2 ---- + <?php $this->vars=array('ranks'=>array('0'=>array('rank_id'=>'1','rank_title'=>'Site Admin','rank_min'=>'-1','rank_max'=>'-1','rank_special'=>'1','rank_image'=>'images/smiles/icon_cool.gif'),'1'=>array('rank_id'=>'2','rank_title'=>'Skolledare','rank_min'=>'-1','rank_max'=>'-1','rank_special'=>'1','rank_image'=>''),'2'=>array('rank_id'=>'3','rank_title'=>'Lärare','rank_min'=>'-1','rank_max'=>'-1','rank_special'=>'1','rank_image'=>''),'3'=>array('rank_id'=>'4','rank_title'=>'Ordf. Elevrådet','rank_min'=>'-1','rank_max'=>'-1','rank_special'=>'1','rank_image'=>''),'4'=>array('rank_id'=>'5','rank_title'=>'Redaktör Sambladet','rank_min'=>'-1','rank_max'=>'-1','rank_special'=>'1','rank_image'=>''),'5'=>array('rank_id'=>'6','rank_title'=>'Nätguru','rank_min'=>'-1','rank_max'=>'-1','rank_special'=>'1','rank_image'=>'')),'config'=>array('enable_module'=>'1','module_name'=>'Knowledge Base','wysiwyg_path'=>'modules/mx_shared/','formatting_wordwrap'=>'1','formatting_image_resize'=>'300','formatting_truncate_links'=>'1','allow_wysiwyg'=>'0','allow_html'=>'1','allow_bbcode'=>'1','allow_smilies'=>'1','allowed_html_tags'=>'b,i,u,a','allow_links'=>'1','allow_images'=>'0','no_image_message'=>'[No image please]','no_link_message'=>'[No links please]','max_subject_chars'=>'100','max_desc_chars'=>'500','max_chars'=>'0','stats_list'=>'1','header_banner'=>'0','pagination'=>'10','sort_method'=>'Alphabetic','sort_order'=>'ASC','use_comments'=>'1','internal_comments'=>'0','formatting_comment_wordwrap'=>'1','formatting_comment_image_resize'=>'300','formatting_comment_truncate_links'=>'1','max_comment_subject_chars'=>'50','max_comment_chars'=>'5000','allow_comment_wysiwyg'=>'0','allow_comment_html'=>'1','allow_comment_bbcode'=>'1','allow_comment_smilies'=>'1','allow_comment_links'=>'1','allow_comment_images'=>'0','no_comment_image_message'=>'[No image please]','no_comment_link_message'=>'[No links please]','allowed_comment_html_tags'=>'b,i,u,a','del_topic'=>'1','autogenerate_comments'=>'1','comments_pagination'=>'5','comments_forum_id'=>'2','use_ratings'=>'0','votes_check_userid'=>'0','votes_check_ip'=>'0','show_pretext'=>'0','pt_header'=>'Article Submission Instructions','pt_body'=>'Please check your references and include as much information as you can.','notify'=>'0','notify_group'=>'0')); + $this->vars_ts=array('ranks'=>1151528025,'config'=>1152052272) ?> \ No newline at end of file |
Update of /cvsroot/mxbb/mx_linkdb/linkdb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27490/modules/mx_linkdb/linkdb/modules Modified Files: link_category.php link_link.php link_main.php link_rate.php link_search.php link_user_upload.php link_viewall.php Log Message: mistake Index: link_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_category.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** link_category.php 4 Jul 2006 18:05:47 -0000 1.8 --- link_category.php 4 Jul 2006 18:09:40 -0000 1.9 *************** *** 14,19 **** --- 14,28 ---- } + /** + * Enter description here... + * + */ class linkdb_category extends linkdb_public { + /** + * Enter description here... + * + * @param unknown_type $action + */ function main( $action ) { Index: link_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_user_upload.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** link_user_upload.php 3 Jul 2006 20:11:30 -0000 1.7 --- link_user_upload.php 4 Jul 2006 18:09:40 -0000 1.8 *************** *** 9,14 **** --- 9,28 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + + /** + * Enter description here... + * + */ class linkdb_user_upload extends linkdb_public { + /** + * Enter description here... + * + * @param unknown_type $action + */ function main( $action ) { Index: link_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_rate.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** link_rate.php 4 Jul 2006 18:05:47 -0000 1.9 --- link_rate.php 4 Jul 2006 18:09:40 -0000 1.10 *************** *** 14,19 **** --- 14,28 ---- } + /** + * Enter description here... + * + */ class linkdb_rate extends linkdb_public { + /** + * Enter description here... + * + * @param unknown_type $action + */ function main( $action ) { Index: link_link.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_link.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** link_link.php 4 Jul 2006 18:05:47 -0000 1.6 --- link_link.php 4 Jul 2006 18:09:40 -0000 1.7 *************** *** 14,19 **** --- 14,28 ---- } + /** + * Enter description here... + * + */ class linkdb_link extends linkdb_public { + /** + * Enter description here... + * + * @param unknown_type $action + */ function main( $action ) { Index: link_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_search.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** link_search.php 4 Jul 2006 18:05:47 -0000 1.9 --- link_search.php 4 Jul 2006 18:09:40 -0000 1.10 *************** *** 14,19 **** --- 14,28 ---- } + /** + * Enter description here... + * + */ class linkdb_search extends linkdb_public { + /** + * Enter description here... + * + * @param unknown_type $action + */ function main( $action ) { Index: link_viewall.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_viewall.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** link_viewall.php 4 Jul 2006 18:05:47 -0000 1.6 --- link_viewall.php 4 Jul 2006 18:09:40 -0000 1.7 *************** *** 14,19 **** --- 14,28 ---- } + /** + * Enter description here... + * + */ class linkdb_viewall extends linkdb_public { + /** + * Enter description here... + * + * @param unknown_type $action + */ function main( $action ) { Index: link_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_main.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** link_main.php 4 Jul 2006 18:05:47 -0000 1.7 --- link_main.php 4 Jul 2006 18:09:40 -0000 1.8 *************** *** 14,19 **** --- 14,28 ---- } + /** + * Enter description here... + * + */ class linkdb_main extends linkdb_public { + /** + * Enter description here... + * + * @param unknown_type $action + */ function main( $action ) { |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:07:07
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26247/modules/mx_linkdb/linkdb/admin Added Files: admin_auth_manage.php Log Message: adding permissions --- NEW FILE: admin_auth_manage.php --- <?php /** * * @package mxBB Portal Module - mx_kb * @version $Id: admin_auth_manage.php,v 1.1 2006/07/04 18:07:02 jonohlsson Exp $ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined( 'IN_PORTAL' ) || IN_ADMIN != true ) { die( "Hacking attempt" ); } class linkdb_auth_manage extends linkdb_public { function main( $action ) { global $db, $template, $lang, $phpEx, $linkdb_functions, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // // Includes // include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); // // Start adminCP // if ( !isset( $_POST['submit'] ) ) { $s_auth_cat_list = $this->generate_jumpbox( 0, 0, '', true ); $template->set_filenames( array( 'body' => 'admin/linkdb_admin_select_body.tpl' ) ); $template->assign_vars( array( 'L_LINKDB_AUTH_TITLE' => $lang['Linkdb_Auth_Title'], 'L_LINKDB_AUTH_EXPLAIN' => $lang['Linkdb_Auth_Explain'], 'L_SELECT_CAT' => $lang['Select_a_Category'], 'S_LINKDB_ACTION' => append_sid( "admin_linkdb.$phpEx?action=auth_manage" ), 'L_LOOK_UP_CAT' => $lang['Look_up_Category'], 'CAT_SELECT_TITLE' => $s_auth_cat_list )); $template->pparse( 'body' ); } else { if ( !isset( $_GET['cat_id'] ) ) { $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, ''); $template->set_filenames( array( 'body' => 'admin/linkdb_admin_auth_body.tpl' ) ); $template->assign_vars( array( 'L_LINKDB_AUTH_TITLE' => $lang['Linkdb_Auth_Title'], 'L_LINKDB_AUTH_EXPLAIN' => $lang['Linkdb_Auth_Explain'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_GROUPS' => $lang['Usergroups'], 'L_VIEW' => $lang['View'], 'L_UPLOAD' => $lang['Upload'], 'L_RATE' => $lang['Rate'], 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], // 'L_APPROVAL' => $lang['Approval'], // 'L_APPROVAL_EDIT' => $lang['Approval_edit'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], 'S_ALBUM_ACTION' => append_sid( "admin_linkdb.$phpEx?action=auth_manage&cat_id=$cat_id" ), )); // // Get the list of phpBB usergroups // $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> " . true . " ORDER BY group_name ASC"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not get group list', '', __LINE__, __FILE__, $sql ); } while ( $kb_row = $db->sql_fetchrow( $result ) ) { $groupdata[] = $kb_row; } // // Get info of this cat // $sql = "SELECT cat_id, cat_name, 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, auth_moderator_groups FROM " . LINK_CATEGORIES_TABLE . " WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not get Category information', '', __LINE__, __FILE__, $sql ); } $thiscat = $db->sql_fetchrow( $result ); $view_groups = @explode( ',', $thiscat['auth_view_groups'] ); $post_groups = @explode( ',', $thiscat['auth_post_groups'] ); $rate_groups = @explode( ',', $thiscat['auth_rate_groups'] ); $comment_groups = @explode( ',', $thiscat['auth_comment_groups'] ); $edit_groups = @explode( ',', $thiscat['auth_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['auth_delete_groups'] ); // $approval_groups = @explode( ',', $thiscat['auth_approval_groups'] ); // $approval_edit_groups = @explode( ',', $thiscat['auth_approval_edit_groups'] ); $moderator_groups = @explode( ',', $thiscat['auth_moderator_groups'] ); for ( $i = 0; $i < count( $groupdata ); $i++ ) { $template->assign_block_vars( 'grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', 'POST_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : '', 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', // 'APPROVAL_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_groups ) ) ? 'checked="checked"' : '', // 'APPROVAL_EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_edit_groups ) ) ? 'checked="checked"' : '', 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' )); } $template->pparse( 'body' ); } else { $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, ''); $view_groups = @implode( ',', $_POST['view'] ); $post_groups = @implode( ',', $_POST['post'] ); $rate_groups = @implode( ',', $_POST['rate'] ); $comment_groups = @implode( ',', $_POST['comment'] ); $edit_groups = @implode( ',', $_POST['edit'] ); $delete_groups = @implode( ',', $_POST['delete'] ); // $approval_groups = @implode( ',', $_POST['approval'] ); // $approval_edit_groups = @implode( ',', $_POST['approval_edit'] ); $moderator_groups = @implode( ',', $_POST['moderator'] ); $sql = "UPDATE " . LINK_CATEGORIES_TABLE . " SET auth_view_groups = '$view_groups', auth_post_groups = '$post_groups', auth_rate_groups = '$rate_groups', auth_comment_groups = '$comment_groups', auth_edit_groups = '$edit_groups', auth_delete_groups = '$delete_groups', auth_approval_groups = '$approval_groups', auth_approval_edit_groups = '$approval_edit_groups', auth_moderator_groups = '$moderator_groups' WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not update Linkdb config table', '', __LINE__, __FILE__, $sql ); } $message = $lang['Linkdb_Auth_successfully'] . '<br /><br />' . sprintf( $lang['Click_return_Linkdb_auth'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=auth_manage" ) . '">', '</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 ); } } } } ?> |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:05:51
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25755/modules/mx_linkdb/linkdb/modules Modified Files: link_category.php link_link.php link_main.php link_rate.php link_search.php link_viewall.php Log Message: security Index: link_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_category.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** link_category.php 4 Jul 2006 18:00:33 -0000 1.7 --- link_category.php 4 Jul 2006 18:05:47 -0000 1.8 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + class linkdb_category extends linkdb_public { Index: link_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_rate.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** link_rate.php 4 Jul 2006 18:00:33 -0000 1.8 --- link_rate.php 4 Jul 2006 18:05:47 -0000 1.9 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + class linkdb_rate extends linkdb_public { Index: link_link.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_link.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** link_link.php 30 Jun 2006 19:54:15 -0000 1.5 --- link_link.php 4 Jul 2006 18:05:47 -0000 1.6 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + class linkdb_link extends linkdb_public { Index: link_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_search.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** link_search.php 3 Jul 2006 20:11:30 -0000 1.8 --- link_search.php 4 Jul 2006 18:05:47 -0000 1.9 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + class linkdb_search extends linkdb_public { Index: link_viewall.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_viewall.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** link_viewall.php 30 Jun 2006 19:54:15 -0000 1.5 --- link_viewall.php 4 Jul 2006 18:05:47 -0000 1.6 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + class linkdb_viewall extends linkdb_public { Index: link_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_main.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** link_main.php 3 Jul 2006 20:11:30 -0000 1.6 --- link_main.php 4 Jul 2006 18:05:47 -0000 1.7 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + class linkdb_main extends linkdb_public { |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:05:50
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/cache In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25755/modules/mx_linkdb/linkdb/cache Removed Files: data_global.php Log Message: security --- data_global.php DELETED --- |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:05:11
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/cache In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25585/modules/mx_linkdb/linkdb/cache Modified Files: data_global.php Log Message: need to, before removing Index: data_global.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/cache/data_global.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** data_global.php 1 Jul 2006 19:59:27 -0000 1.1 --- data_global.php 4 Jul 2006 18:05:05 -0000 1.2 *************** *** 0 **** --- 1,2 ---- + <?php $this->vars=array('config'=>array('site_logo'=>'http://phpbb2.mxbb.com/phpbb2/linkdb/images/web_logo88a.gif','site_url'=>'http://phpbb2.mxbb.com/phpbb2/','width'=>'88','height'=>'31','settings_link_page'=>'10','display_interval'=>'6000','pagination'=>'10','display_links_logo'=>'1','enable_module'=>'0','notify'=>'0','lock_submit_site'=>'0','allow_no_logo'=>'0','cat_col'=>'2','sort_method'=>'link_time','sort_order'=>'DESC','split_links'=>'1','wysiwyg_path'=>'modules/mx_shared/','module_name'=>'Download Database','use_comments'=>'0','internal_comments'=>'1','formatting_comment_wordwrap'=>'1','formatting_comment_image_resize'=>'300','formatting_comment_truncate_links'=>'1','max_comment_subject_chars'=>'50','max_comment_chars'=>'5000','allow_comment_wysiwyg'=>'0','allow_comment_html'=>'1','allow_comment_bbcode'=>'1','allow_comment_smilies'=>'1','allow_comment_links'=>'1','allow_comment_images'=>'0','no_comment_image_message'=>'[No image please]','no_comment_link_message'=>'[No links please]','allowed_comment_html_tags'=>'b,i,u,a','del_topic'=>'1','autogenerate_comments'=>'1','comments_pagination'=>'5','comments_forum_id'=>'0','show_pretext'=>'0','pt_header'=>'Link Submission Instructions','pt_body'=>'Please check your references and include as much information as you can.','use_ratings'=>'1','votes_check_userid'=>'0','votes_check_ip'=>'0','settings_newdays'=>'2')); + $this->vars_ts=array('config'=>1152033830) ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:02:16
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24281/modules/mx_pafiledb/pafiledb/includes Modified Files: functions.php functions_pafiledb.php pafiledb_constants.php Log Message: adding a simple style mode, in sync with mx_linkdb templtes Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** functions.php 1 Jul 2006 21:31:06 -0000 1.24 --- functions.php 4 Jul 2006 18:02:11 -0000 1.25 *************** *** 624,633 **** * @return unknown */ ! function sql_query_limit( $query, $total, $offset = 0 ) { global $db; $query .= ' LIMIT ' . ( ( !empty( $offset ) ) ? $offset . ', ' . $total : $total ); ! return $db->sql_query( $query ); } } --- 624,633 ---- * @return unknown */ ! function sql_query_limit( $query, $total, $offset = 0, $sql_cache = false ) { global $db; $query .= ' LIMIT ' . ( ( !empty( $offset ) ) ? $offset . ', ' . $total : $total ); ! return $sql_cache ? $db->sql_query( $query, $sql_cache ) : $db->sql_query( $query ); } } Index: pafiledb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/pafiledb_constants.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pafiledb_constants.php 17 Jun 2006 20:13:22 -0000 1.18 --- pafiledb_constants.php 4 Jul 2006 18:02:11 -0000 1.19 *************** *** 31,34 **** --- 31,52 ---- define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) + // + // Tables + // + define( 'PA_CATEGORY_TABLE', $mx_table_prefix . 'pa_cat' ); + define( 'PA_COMMENTS_TABLE', $mx_table_prefix . 'pa_comments' ); + define( 'PA_CUSTOM_TABLE', $mx_table_prefix . 'pa_custom' ); + define( 'PA_CUSTOM_DATA_TABLE', $mx_table_prefix . 'pa_customdata' ); + define( 'PA_DOWNLOAD_INFO_TABLE', $mx_table_prefix . 'pa_download_info' ); + define( 'PA_FILES_TABLE', $mx_table_prefix . 'pa_files' ); + define( 'PA_LICENSE_TABLE', $mx_table_prefix . 'pa_license' ); + define( 'PA_CONFIG_TABLE', $mx_table_prefix . 'pa_config' ); + define( 'PA_VOTES_TABLE', $mx_table_prefix . 'pa_votes' ); + define( 'PA_AUTH_ACCESS_TABLE', $mx_table_prefix . 'pa_auth' ); + define( 'PA_MIRRORS_TABLE', $mx_table_prefix . 'pa_mirrors' ); + + // + // Switches + // define( 'PAFILEDB_DEBUG', 1 ); // Pafiledb Mod Debugging on define( 'PAFILEDB_QUERY_DEBUG', 1 ); *************** *** 50,54 **** --- 68,74 ---- define( 'PA_AUTH_COMMENT_DELETE', 11 ); + // // Field Types + // define( 'INPUT', 0 ); define( 'TEXTAREA', 1 ); *************** *** 60,75 **** define( 'ICONS_DIR', 'pafiledb/images/icons/' ); - define( 'PA_CATEGORY_TABLE', $mx_table_prefix . 'pa_cat' ); - define( 'PA_COMMENTS_TABLE', $mx_table_prefix . 'pa_comments' ); - define( 'PA_CUSTOM_TABLE', $mx_table_prefix . 'pa_custom' ); - define( 'PA_CUSTOM_DATA_TABLE', $mx_table_prefix . 'pa_customdata' ); - define( 'PA_DOWNLOAD_INFO_TABLE', $mx_table_prefix . 'pa_download_info' ); - define( 'PA_FILES_TABLE', $mx_table_prefix . 'pa_files' ); - define( 'PA_LICENSE_TABLE', $mx_table_prefix . 'pa_license' ); - define( 'PA_CONFIG_TABLE', $mx_table_prefix . 'pa_config' ); - define( 'PA_VOTES_TABLE', $mx_table_prefix . 'pa_votes' ); - define( 'PA_AUTH_ACCESS_TABLE', $mx_table_prefix . 'pa_auth' ); - define( 'PA_MIRRORS_TABLE', $mx_table_prefix . 'pa_mirrors' ); - if ( !MXBB_MODULE || MXBB_27x ) { --- 80,83 ---- Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** functions_pafiledb.php 1 Jul 2006 21:31:06 -0000 1.31 --- functions_pafiledb.php 4 Jul 2006 18:02:11 -0000 1.32 *************** *** 24,30 **** /** ! * Enter description here... * ! * @param unknown_type $module_name */ function adminmodule( $module_name ) --- 24,30 ---- /** ! * load admin module * ! * @param unknown_type $module_name send module name to load it */ function adminmodule( $module_name ) *************** *** 55,60 **** if ( !class_exists( 'pafiledb_' . $module_name ) ) { ! global $phpbb_root_path, $phpEx; ! global $mx_root_path, $module_root_path, $is_block, $phpEx; $this->module_name = $module_name; --- 55,59 ---- if ( !class_exists( 'pafiledb_' . $module_name ) ) { ! global $module_root_path, $phpEx; $this->module_name = $module_name; *************** *** 92,98 **** pafiledb_page_header( $page_title ); - $pafiledb_template->set_filenames( array( 'body' => $tpl_name ) ); - pafiledb_page_footer(); } --- 91,95 ---- *************** *** 343,347 **** if ( $this->cat_rowset[$cat_id]['cat_files'] == -1 || $this->modified ) { ! global $db, $db; $sql = 'SELECT COUNT(file_id) as total_files --- 340,344 ---- if ( $this->cat_rowset[$cat_id]['cat_files'] == -1 || $this->modified ) { ! global $db; $sql = 'SELECT COUNT(file_id) as total_files *************** *** 468,471 **** --- 465,518 ---- if ( !empty( $this->subcat_rowset[$cat_id] ) ) { + $class = "gensmall"; + $init_link_max = ( count( $this->subcat_rowset[$cat_id] ) > 3 ) ? 3 : count( $this->subcat_rowset[$cat_id] ); + $truncate = false; + $i = 0; + foreach( $this->subcat_rowset[$cat_id] as $cat_id => $cat_row ) + { + if ( $cat_row['cat_allow_file'] || !empty( $this->subcat_rowset[$cat_row['cat_id']] ) ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a>'; + } + /* + else + { + if ( !empty( $this->subcat_rowset[$cat_row['cat_id']] ) ) + { + foreach( $this->subcat_rowset[$cat_row['cat_id']] as $sub_cat_id => $sub_cat_row ) + { + if ( $sub_cat_row['cat_allow_file'] ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a>'; + } + } + } + } + */ + } + + if ($truncate) + { + $cat_sub .= '<span class=' . $class . '>, ...</span>'; + } + } + return $cat_sub; + + /* + $cat_sub = ''; + if ( !empty( $this->subcat_rowset[$cat_id] ) ) + { foreach( $this->subcat_rowset[$cat_id] as $cat_id => $cat_row ) { *************** *** 489,493 **** } } ! return $cat_sub; } --- 536,540 ---- } } ! */ } *************** *** 500,504 **** { global $pafiledb_template, $db; - global $mx_root_path, $module_root_path, $is_block, $phpEx; if ( $this->cat_rowset[$cat_id]['parents_data'] == '' ) --- 547,550 ---- *************** *** 525,537 **** foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $pafiledb_template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ! ); } } ! $pafiledb_template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; --- 571,585 ---- foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $pafiledb_template->assign_block_vars( 'navlinks', array( ! 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ! ); } } ! $pafiledb_template->assign_block_vars( 'navlinks', array( ! 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; *************** *** 649,656 **** global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; - global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; if ( $this->cat_empty() ) { mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); } --- 697,708 ---- global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; if ( $this->cat_empty() ) { + if ( !$userdata['session_logged_in'] ) + { + $redirect = ( $cat_id != PA_ROOT_CAT ) ? pa_this_mxurl( "action=category&cat_id=$cat_id" ) : pa_this_mxurl(); + redirect( append_sid( "login.$phpEx?redirect=$redirect", true ) ); + } mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); } *************** *** 665,669 **** // ! // output the root level category that allow file // if ( isset( $this->subcat_rowset[$cat_id] ) ) --- 717,812 ---- // ! // Output the categories ! // ! if ( isset( $this->subcat_rowset[$cat_id] ) ) ! { ! $pafiledb_config['cat_col'] = 2; ! $catnum = count($this->subcat_rowset[$cat_id]); ! $catcol = $pafiledb_config['cat_col'] > 0 ? $pafiledb_config['cat_col'] : 1; ! $num_of_rows = intval( $catnum / $catcol ); ! ! if ( $catnum % $catcol ) ! { ! $num_of_rows++; ! } ! ! $pafiledb_template->assign_vars( array( 'LINK_WIDTH' => 100 / $catcol ) ); ! ! $i = 0; ! foreach( $this->subcat_rowset[$cat_id] as $subcat_id => $subcat_row ) ! { ! if ( $i == 0 || $i == $catcol) ! { ! $pafiledb_template->assign_block_vars( 'catcol', array() ); ! $i = 0; ! } ! $i++; ! ! $last_file_info = array(); ! $this->last_file_in_cat( $subcat_id, $last_file_info ); ! ! if ( !empty( $last_file_info['file_id'] ) && $this->auth[$subcat_id]['auth_read'] ) ! { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); ! $last_file = $last_file_time . '<br />'; ! $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; ! } ! else ! { ! $last_file = $lang['No_file']; ! } ! ! $is_new = false; ! if ( $this->new_file_in_cat( $subcat_id ) ) ! { ! $is_new = true; ! } ! ! $sub_cat = $this->get_sub_cat( $subcat_id ); ! $pafiledb_template->assign_block_vars( 'catcol.no_cat_parent', array( ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); ! } ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $cat_id ! */ ! function display_categories_original( $cat_id = PA_ROOT_CAT ) ! { ! global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; ! global $pafiledb_config, $board_config, $debug; ! global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; ! ! if ( $this->cat_empty() ) ! { ! if ( !$userdata['session_logged_in'] ) ! { ! $redirect = ( $cat_id != PA_ROOT_CAT ) ? pa_this_mxurl( "action=category&cat_id=$cat_id" ) : pa_this_mxurl(); ! redirect( append_sid( "login.$phpEx?redirect=$redirect", true ) ); ! } ! mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); ! } ! ! $pafiledb_template->assign_vars( array( ! 'CAT_PARENT_ORIGINAL' => true, ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ! ); ! ! // ! // Category navigation for cat_id that allow files ! // - used in cat pages without files // if ( isset( $this->subcat_rowset[$cat_id] ) ) *************** *** 697,713 **** $sub_cat = $this->get_sub_cat( $subcat_id ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } if ( isset( $this->subcat_rowset[$cat_id] ) ) { --- 840,862 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } + + // + // Category navigation for cat_id that doesn't allow files + // - used in cat pages with files + // if ( isset( $this->subcat_rowset[$cat_id] ) ) { *************** *** 727,739 **** } if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } for( $k = 0; $k < $total_sub_cat; $k++ ) { --- 876,893 ---- } + // + // This is a container category + // if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } + for( $k = 0; $k < $total_sub_cat; $k++ ) { *************** *** 765,778 **** $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category --- 919,933 ---- $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category *************** *** 792,796 **** global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; - // MX global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; --- 947,950 ---- *************** *** 800,810 **** } ! $pafiledb_template->assign_vars( array( 'CAT_PARENT' => true, ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category that allow file if ( isset( $this->subcat_rowset[$cat_id] ) ) { --- 954,968 ---- } ! $pafiledb_template->assign_vars( array( ! 'CAT_PARENT' => true, ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ! ); ! ! // // output the root level category that allow file + // if ( isset( $this->subcat_rowset[$cat_id] ) ) { *************** *** 839,855 **** $map_xtra = !empty( $pa_get_dynamic[$subcat_id] ) ? '&dynamic_block=' . $pa_get_dynamic[$subcat_id] : ''; ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=quickdl&cat_id=' . $subcat_id . $map_xtra ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } if ( isset( $this->subcat_rowset[$cat_id] ) ) { --- 997,1015 ---- $map_xtra = !empty( $pa_get_dynamic[$subcat_id] ) ? '&dynamic_block=' . $pa_get_dynamic[$subcat_id] : ''; ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=quickdl&cat_id=' . $subcat_id . $map_xtra ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } + if ( isset( $this->subcat_rowset[$cat_id] ) ) { *************** *** 869,880 **** } if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } for( $k = 0; $k < $total_sub_cat; $k++ ) --- 1029,1044 ---- } + // + // Category container + // if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } for( $k = 0; $k < $total_sub_cat; $k++ ) *************** *** 907,920 **** $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category --- 1071,1085 ---- $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category *************** *** 950,1006 **** } - switch ( SQL_LAYER ) - { - case 'oracle': - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments - FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat - WHERE f1.file_id = r.votes_file(+) - AND f1.user_id = u.user_id(+) - AND f1.file_id = c.file_id(+) - AND f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - AND f1.file_catid = cat.cat_id - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - - default: - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments - FROM " . PA_FILES_TABLE . " AS f1 - LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file - LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id - LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id - LEFT JOIN " . PA_CATEGORY_TABLE . " AS cat ON f1.file_catid = cat.cat_id - WHERE f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - } - - if ( !( $result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info for this category', '', __LINE__, __FILE__, $sql ); - } - $file_rowset = array(); $total_file = 0; - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $this->auth[$row['file_catid']]['auth_read'] ) - { - $file_rowset[] = $row; - } - } - - $db->sql_freeresult( $result ); - switch ( SQL_LAYER ) { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id), cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat WHERE f1.file_id = r.votes_file(+) --- 1115,1125 ---- } $file_rowset = array(); $total_file = 0; switch ( SQL_LAYER ) { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat WHERE f1.file_id = r.votes_file(+) *************** *** 1016,1020 **** default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id), cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file --- 1135,1139 ---- default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file *************** *** 1062,1065 **** --- 1181,1187 ---- unset( $row ); + // + // Ratings + // $pa_use_ratings = false; for ( $i = 0; $i < count( $file_rowset ); $i++ ) *************** *** 1116,1140 **** // =================================================== ! $pafiledb_template->assign_block_vars( "file_rows", array( 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $posticon, ! 'FILE_NEW_IMAGE' => $images['pa_file_new'], ! 'HAS_SCREENSHOTS' => ( !empty( $file_rowset[$i]['file_ssurl'] ) ) ? true : false, ! 'SS_AS_LINK' => ( $file_rowset[$i]['file_sshot_link'] ) ? true : false, ! 'FILE_SCREENSHOT' => $file_rowset[$i]['file_ssurl'], ! 'FILE_SCREENSHOT_URL' => $module_root_path . 'pafiledb/images/lwin.gif', ! 'FILE_NAME' => $file_rowset[$i]['file_name'], ! 'FILE_DESC' => $file_rowset[$i]['file_desc'], ! 'DATE' => $date, ! 'UPDATED' => $date_updated, ! 'RATING' => ( $this->ratings[$file_rowset[$i]['file_catid']]['activated'] ? $rating : $lang['kb_no_ratings'] ), ! 'FILE_DLS' => $file_rowset[$i]['file_dls'], ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, - 'U_CAT' => $cat_url, - 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), - 'U_FILE' => append_sid( pa_this_mxurl( 'action=file&file_id=' . $file_rowset[$i]['file_id'] ) ) ) - ); $filelist = true; $pa_use_ratings = $this->ratings[$file_rowset[$i]['file_catid']]['activated']; --- 1238,1264 ---- // =================================================== ! $pafiledb_template->assign_block_vars( "file_rows", array( ! 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $posticon, ! 'FILE_NAME' => $file_rowset[$i]['file_name'], ! 'FILE_DESC' => $file_rowset[$i]['file_desc'], ! 'DATE' => $date, ! 'UPDATED' => $date_updated, ! 'RATING' => ( $this->ratings[$file_rowset[$i]['file_catid']]['activated'] ? $rating : $lang['kb_no_ratings'] ), ! 'FILE_DLS' => $file_rowset[$i]['file_dls'], ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, ! 'U_CAT' => $cat_url, ! 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), ! 'U_FILE' => append_sid( pa_this_mxurl( 'action=file&file_id=' . $file_rowset[$i]['file_id'] ) ), ! ! 'FILE_NEW_IMAGE' => $images['pa_file_new'], ! 'HAS_SCREENSHOTS' => ( !empty( $file_rowset[$i]['file_ssurl'] ) ) ? true : false, ! 'SS_AS_LINK' => ( $file_rowset[$i]['file_sshot_link'] ) ? true : false, ! 'FILE_SCREENSHOT' => $file_rowset[$i]['file_ssurl'], ! 'FILE_SCREENSHOT_URL' => $module_root_path . 'pafiledb/images/lwin.gif', ! )); $filelist = true; $pa_use_ratings = $this->ratings[$file_rowset[$i]['file_catid']]['activated']; *************** *** 1145,1197 **** $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'file_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'file_time' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'file_dls' ) ? 'selected="selected"' : '', ! 'SORT_UPDATE_TIME' => ( $sort_method == 'file_update_time' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( pa_this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $pafiledb_config['pagination'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_file / $pafiledb_config['pagination'] ) ), ! 'FILELIST' => $filelist, ! 'ID' => $cat_id, ! 'START' => $start, ! 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, ! 'S_ACTION_SORT' => append_sid( pa_this_mxurl( "action=$action" ) ) ) ! ); } else { $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_files'], ! 'L_NO_FILES_CAT' => $lang['No_files_cat'] ) ! ); } } --- 1269,1321 ---- $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'file_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'file_time' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'file_dls' ) ? 'selected="selected"' : '', ! 'SORT_UPDATE_TIME' => ( $sort_method == 'file_update_time' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( pa_this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $pafiledb_config['pagination'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_file / $pafiledb_config['pagination'] ) ), ! 'FILELIST' => $filelist, ! 'ID' => $cat_id, ! 'START' => $start, ! 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, ! 'S_ACTION_SORT' => append_sid( pa_this_mxurl( "action=$action" ) ) ) ! ); } else { $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_files'], ! 'L_NO_FILES_CAT' => $lang['No_files_cat'] ) ! ); } } *************** *** 1231,1281 **** AND f1.user_id = u.user_id(+) AND f1.file_id = c.file_id(+) - AND f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - - default: - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments - FROM " . PA_FILES_TABLE . " AS f1 - LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file - LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id - LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id - WHERE f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - } - - if ( !( $result = $db->sql_query( $sql, 300 ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info for this category', '', __LINE__, __FILE__, $sql ); - } - - $file_rowset = array(); - $total_file = 0; - - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $this->auth[$row['file_catid']]['auth_read'] ) - { - $file_rowset[] = $row; - } - } - - $db->sql_freeresult( $result ); - - switch ( SQL_LAYER ) - { - case 'oracle': - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) - FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c - WHERE f1.file_id = r.votes_file(+) - AND f1.user_id = u.user_id(+) - AND f1.file_id = c.file_id(+) AND f1.file_pin <> " . FILE_PINNED . " AND f1.file_approved = 1 --- 1355,1358 ---- *************** *** 1286,1290 **** default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file --- 1363,1367 ---- default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file *************** *** 1749,1753 **** global $db; ! if ( count( $this->subcat_rowset[$cat_id] ) <= 0 ) { return; --- 1826,1830 ---- global $db; ! if ( empty( $this->subcat_rowset[$cat_id] ) || count( $this->subcat_rowset[$cat_id] ) <= 0 ) { return; *************** *** 1869,1873 **** function update_add_file( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $_POST, $userdata, $pafiledb_config, $_FILES, $_REQUEST, $pafiledb_functions, $user_ip, $auth, $module_root_path, $pafiledb; $ss_upload = ( empty( $_POST['screen_shot_url'] ) ) ? true : false; --- 1946,1950 ---- function update_add_file( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $userdata, $pafiledb_config, $_FILES, $pafiledb_functions, $user_ip, $auth, $module_root_path, $pafiledb; $ss_upload = ( empty( $_POST['screen_shot_url'] ) ) ? true : false; *************** *** 1885,1900 **** $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; - $file_name = ( isset( $_POST['name'] ) ) ? addslashes( htmlspecialchars( $_POST['name'] ) ) : ''; - $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['long_desc'] ) ) : ''; - $file_short_desc = ( isset( $_POST['short_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['short_desc'] ) ) : ( ( !empty( $_POST['long_desc'] ) ) ? substr( addslashes( htmlspecialchars( $_POST['long_desc'] ) ), 0, 50 ) . '...' : '' ); - $file_author = ( isset( $_POST['author'] ) ) ? addslashes( htmlspecialchars( $_POST['author'] ) ) : ( ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '' ); - $file_version = ( isset( $_POST['version'] ) ) ? addslashes( htmlspecialchars( $_POST['version'] ) ) : ''; - $file_website = ( isset( $_POST['website'] ) ) ? addslashes( htmlspecialchars( $_POST['website'] ) ) : ''; if ( !empty( $file_website ) ) { --- 1962,1972 ---- $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $file_name = ( isset( $_POST['name'] ) ) ? addslashes( htmlspecialchars( $_POST['name'] ) ) : ''; $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['long_desc'] ) ) : ''; $file_short_desc = ( isset( $_POST['short_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['short_desc'] ) ) : ( ( !empty( $_POST['long_desc'] ) ) ? substr( addslashes( htmlspecialchars( $_POST['long_desc'] ) ), 0, 50 ) . '...' : '' ); $file_author = ( isset( $_POST['author'] ) ) ? addslashes( htmlspecialchars( $_POST['author'] ) ) : ( ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '' ); $file_version = ( isset( $_POST['version'] ) ) ? addslashes( htmlspecialchars( $_POST['version'] ) ) : ''; $file_website = ( isset( $_POST['website'] ) ) ? addslashes( htmlspecialchars( $_POST['website'] ) ) : ''; + if ( !empty( $file_website ) ) { *************** *** 1904,1913 **** $file_posticon = ( isset( $_POST['posticon'] ) ) ? htmlspecialchars( $_POST['posticon'] ) : ''; - $file_license = ( isset( $_POST['license'] ) ) ? intval( $_POST['license'] ) : 0; $file_pin = ( isset( $_POST['pin'] ) ) ? intval( $_POST['pin'] ) : 0; $file_ss_link = ( isset( $_POST['sshot_link'] ) ) ? intval( $_POST['sshot_link'] ) : 0; $file_dls = ( isset( $_POST['file_download'] ) ) ? intval( $_POST['file_download'] ) : 0; - $file_time = time(); --- 1976,1983 ---- *************** *** 1933,1937 **** $forbidden_extensions = array_map( 'trim', @explode( ',', $pafiledb_config['forbidden_extensions'] ) ); - $file_extension = $pafiledb_functions->get_extension( $file_realname ); --- 2003,2006 ---- |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:02:15
|
Update of /cvsroot/mxbb/mx_pafiledb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24281/modules/mx_pafiledb/templates/subSilver Modified Files: pa_category_body.tpl pa_main_body.tpl Log Message: adding a simple style mode, in sync with mx_linkdb templtes Index: pa_main_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_main_body.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pa_main_body.tpl 27 Jun 2006 21:38:43 -0000 1.6 --- pa_main_body.tpl 4 Jul 2006 18:02:12 -0000 1.7 *************** *** 8,37 **** </table> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop"> {L_CATEGORY} </th> ! <th class="thCornerR" width="10%"> {L_LAST_FILE} </th> ! <th class="thCornerR" width="8%"> {L_FILES} </th> ! </tr> ! <!-- BEGIN no_cat_parent --> <!-- IF no_cat_parent.IS_HIGHER_CAT --> ! <tr> ! <td class="cat" colspan="2" valign="middle"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a></td> ! <td class="rowpic" colspan="2" align="right"> </td> ! </tr> <!-- ELSE --> ! <tr> ! <td class="row1" valign="middle" align="center"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}"><img src="{no_cat_parent.CAT_IMAGE}" border="0" alt="{no_cat_parent.CAT_NEW_FILE}"></a></td> ! <td class="row1" valign="middle" onmouseout="this.className='row1';" onmouseover="this.className='row2';" onclick="window.location.href='{no_cat_parent.U_CAT}';"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a><br><span class="genmed">{no_cat_parent.CAT_DESC}</span><span class="gensmall">{no_cat_parent.SUB_CAT}</span></b></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{no_cat_parent.LAST_FILE}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{no_cat_parent.FILECAT}</span></td> ! </tr> <!-- ENDIF --> ! <!-- END no_cat_parent --> ! <tr> ! <td class="cat" colspan="4"> </td> ! </tr> </table> <!-- INCLUDE pa_footer.tpl --> \ No newline at end of file --- 8,73 ---- </table> + <!-- IF CAT_PARENT_ORIGINAL --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop"> {L_CATEGORY} </th> ! <th class="thCornerR" width="10%"> {L_LAST_FILE} </th> ! <th class="thCornerR" width="8%"> {L_FILES} </th> ! </tr> ! <!-- BEGIN no_cat_parent --> <!-- IF no_cat_parent.IS_HIGHER_CAT --> ! <tr> ! <td class="cat" colspan="2" valign="middle"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a></td> ! <td class="rowpic" colspan="2" align="right"> </td> ! </tr> <!-- ELSE --> ! <tr> ! <td class="row1" valign="middle" align="center"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}"><img src="{no_cat_parent.CAT_IMAGE}" border="0" alt="{no_cat_parent.CAT_NEW_FILE}"></a></td> ! <td class="row1" valign="middle" onmouseout="this.className='row1';" onmouseover="this.className='row2';" onclick="window.location.href='{no_cat_parent.U_CAT}';"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a><br><span class="genmed">{no_cat_parent.CAT_DESC}</span><span class="gensmall">{no_cat_parent.SUB_CAT}</span></b></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{no_cat_parent.LAST_FILE}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{no_cat_parent.FILECAT}</span></td> ! </tr> <!-- ENDIF --> ! <!-- END no_cat_parent --> ! <tr> ! <td class="cat" colspan="4"> </td> ! </tr> ! </table> ! <!-- ENDIF --> ! ! <!-- IF CAT_PARENT --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead" colspan="2">{L_CATEGORY}</th> ! </tr> ! <tr> ! <td class="row1" colspan="2"> ! <table border="0" cellpadding="2" cellspacing="1" width="100%" > ! <!-- BEGIN catcol --> ! <tr> ! <!-- BEGIN no_cat_parent --> ! <td width="{LINK_WIDTH}%"> ! <table border="0" cellpadding="2" cellspacing="2" width="100%"> ! <tr> ! <td> ! <a href="{catcol.no_cat_parent.U_CAT}"><img src="{catcol.no_cat_parent.CAT_IMAGE}" alt="{catcol.no_cat_parent.CAT_NAME}" align="absmiddle" border="0" /></a> ! </td> ! <td width="100%" valign="middle" nowrap="nowrap"> ! <a href="{catcol.no_cat_parent.U_CAT}" class="cattitle">{catcol.no_cat_parent.CAT_NAME}</a> <span class="gensmall">({catcol.no_cat_parent.FILECAT})</span><br> ! {catcol.no_cat_parent.SUB_CAT} ! </td> ! </tr> ! </table> ! </td> ! <!-- END no_cat_parent --> ! </tr> ! <!-- END catcol --> ! </table> ! </td> ! </tr> </table> + <!-- ENDIF --> + <!-- INCLUDE pa_footer.tpl --> \ No newline at end of file Index: pa_category_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_category_body.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pa_category_body.tpl 27 Jun 2006 21:38:43 -0000 1.8 --- pa_category_body.tpl 4 Jul 2006 18:02:12 -0000 1.9 *************** *** 8,38 **** </table> ! <!-- IF CAT_PARENT --> ! <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop">{L_CATEGORY}</th> ! <th class="thTop" width="10%">{L_LAST_FILE}</th> ! <th class="thCornerR" width="8%">{L_FILES}</th> ! </tr> ! <!-- BEGIN no_cat_parent --> <!-- IF no_cat_parent.IS_HIGHER_CAT --> ! <tr> ! <td class="cat" colspan="2" valign="middle"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a></td> ! <td class="rowpic" colspan="2" align="right"> </td> ! </tr> <!-- ELSE --> ! <tr> ! <td class="row1" align="center" valign="middle"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}"><img src="{no_cat_parent.CAT_IMAGE}" border="0" alt="{no_cat_parent.CAT_NEW_FILE}"></a></td> ! <td class="row1" valign="middle" onmouseout="this.className='row1';" onmouseover="this.className='row2';" onclick="window.location.href='{no_cat_parent.U_CAT}';"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a><br><span class="genmed">{no_cat_parent.CAT_DESC}</span><span class="gensmall"> </span><span class="gensmall">{no_cat_parent.SUB_CAT}</span></b></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{no_cat_parent.LAST_FILE}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{no_cat_parent.FILECAT}</span></td> ! </tr> <!-- ENDIF --> ! <!-- END no_cat_parent --> ! <tr> ! <td class="cat" colspan="4"> </td> ! </tr> </table> <br /> --- 8,72 ---- </table> ! <!-- IF CAT_PARENT_ORIGINAL --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop"> {L_CATEGORY} </th> ! <th class="thCornerR" width="10%"> {L_LAST_FILE} </th> ! <th class="thCornerR" width="8%"> {L_FILES} </th> ! </tr> ! <!-- BEGIN no_cat_parent --> <!-- IF no_cat_parent.IS_HIGHER_CAT --> ! <tr> ! <td class="cat" colspan="2" valign="middle"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a></td> ! <td class="rowpic" colspan="2" align="right"> </td> ! </tr> <!-- ELSE --> ! <tr> ! <td class="row1" valign="middle" align="center"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}"><img src="{no_cat_parent.CAT_IMAGE}" border="0" alt="{no_cat_parent.CAT_NEW_FILE}"></a></td> ! <td class="row1" valign="middle" onmouseout="this.className='row1';" onmouseover="this.className='row2';" onclick="window.location.href='{no_cat_parent.U_CAT}';"><a href="{no_cat_parent.U_CAT}" class="cattitle ask target-block_{BLOCK_ID}">{no_cat_parent.CAT_NAME}</a><br><span class="genmed">{no_cat_parent.CAT_DESC}</span><span class="gensmall">{no_cat_parent.SUB_CAT}</span></b></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{no_cat_parent.LAST_FILE}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{no_cat_parent.FILECAT}</span></td> ! </tr> <!-- ENDIF --> ! <!-- END no_cat_parent --> ! <tr> ! <td class="cat" colspan="4"> </td> ! </tr> ! </table> ! <br /> ! <!-- ENDIF --> ! ! <!-- IF CAT_PARENT --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead" colspan="2">{L_CATEGORY}</th> ! </tr> ! <tr> ! <td class="row1" colspan="2"> ! <table border="0" cellpadding="2" cellspacing="1" width="100%" > ! <!-- BEGIN catcol --> ! <tr> ! <!-- BEGIN no_cat_parent --> ! <td width="{LINK_WIDTH}%"> ! <table border="0" cellpadding="2" cellspacing="2" width="100%"> ! <tr> ! <td> ! <a href="{catcol.no_cat_parent.U_CAT}"><img src="{catcol.no_cat_parent.CAT_IMAGE}" alt="{catcol.no_cat_parent.CAT_NAME}" align="absmiddle" border="0" /></a> ! </td> ! <td width="100%" valign="middle" nowrap="nowrap"> ! <a href="{catcol.no_cat_parent.U_CAT}" class="cattitle">{catcol.no_cat_parent.CAT_NAME}</a> <span class="gensmall">({catcol.no_cat_parent.FILECAT})</span><br> ! {catcol.no_cat_parent.SUB_CAT} ! </td> ! </tr> ! </table> ! </td> ! <!-- END no_cat_parent --> ! </tr> ! <!-- END catcol --> ! </table> ! </td> ! </tr> </table> <br /> |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:02:15
|
Update of /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24281/modules/mx_pafiledb/templates/subSilver/admin Modified Files: pa_admin_cat_edit.tpl Log Message: adding a simple style mode, in sync with mx_linkdb templtes Index: pa_admin_cat_edit.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin/pa_admin_cat_edit.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pa_admin_cat_edit.tpl 8 Dec 2005 15:15:13 -0000 1.5 --- pa_admin_cat_edit.tpl 4 Jul 2006 18:02:12 -0000 1.6 *************** *** 2,6 **** <!-- var error_msg = ""; ! function checkAddForm() { error_msg = ""; --- 2,6 ---- <!-- var error_msg = ""; ! function checkAddForm() { error_msg = ""; *************** *** 10,14 **** error_msg += "{L_CAT_NAME_FIELD_EMPTY}"; } ! if(error_msg != "") { --- 10,14 ---- error_msg += "{L_CAT_NAME_FIELD_EMPTY}"; } ! if(error_msg != "") { *************** *** 31,35 **** <p>{L_CAT_EXPLAIN}</p> ! <!-- IF ERROR neq '' --> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> --- 31,35 ---- <p>{L_CAT_EXPLAIN}</p> ! <!-- BEGIN pafiledb_error --> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> *************** *** 38,42 **** </table> <br /> ! <!-- ENDIF --> <form action="{S_CAT_ACTION}" method="post" name="form" onsubmit="return checkAddForm();"> --- 38,42 ---- </table> <br /> ! <!-- END pafiledb_error --> <form action="{S_CAT_ACTION}" method="post" name="form" onsubmit="return checkAddForm();"> *************** *** 63,75 **** <input type="radio" name="cat_allow_file" value="0" {CHECKED_NO}>{L_NO} </td> ! </tr> <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> --- 63,75 ---- <input type="radio" name="cat_allow_file" value="0" {CHECKED_NO}>{L_NO} </td> ! </tr> <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> *************** *** 79,86 **** <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> --- 79,86 ---- <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> *************** *** 91,95 **** <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 ------------------------------------------------------------------------------------------- --> --- 91,95 ---- <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 ------------------------------------------------------------------------------------------- --> *************** *** 99,103 **** <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 ------------------------------------------------------------------------------------------- --> --- 99,103 ---- <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 ------------------------------------------------------------------------------------------- --> |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:02:15
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24281/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_category.php pa_main.php Log Message: adding a simple style mode, in sync with mx_linkdb templtes Index: pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_category.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pa_category.php 7 Jun 2006 20:29:52 -0000 1.13 --- pa_category.php 4 Jul 2006 18:02:12 -0000 1.14 *************** *** 142,146 **** $no_file_message = false; ! $this->display_categories( $cat_id ); } --- 142,154 ---- $no_file_message = false; ! $pafiledb_config['template_style_original'] = false; ! if ($pafiledb_config['template_style_original']) ! { ! $this->display_categories_original($cat_id); ! } ! else ! { ! $this->display_categories($cat_id); ! } } Index: pa_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_main.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pa_main.php 17 Jun 2006 20:13:22 -0000 1.14 --- pa_main.php 4 Jul 2006 18:02:12 -0000 1.15 *************** *** 41,45 **** // Show the Category for the download database index // =================================================== ! $this->display_categories(); $this->display( $lang['Download'], 'pa_main_body.tpl' ); } --- 41,53 ---- // Show the Category for the download database index // =================================================== ! $pafiledb_config['template_style_original'] = false; ! if ($pafiledb_config['template_style_original']) ! { ! $this->display_categories_original(); ! } ! else ! { ! $this->display_categories(); ! } $this->display( $lang['Download'], 'pa_main_body.tpl' ); } |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:02:14
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24281/modules/mx_pafiledb/admin Modified Files: admin_pa_category.php Log Message: adding a simple style mode, in sync with mx_linkdb templtes Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** admin_pa_category.php 17 Jun 2006 20:13:21 -0000 1.17 --- admin_pa_category.php 4 Jul 2006 18:02:11 -0000 1.18 *************** *** 93,114 **** if ( $mode == 'do_add' && !$cat_id ) { ! $cat_id = $pafiledb->update_add_cat(); $mode = 'add'; if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } elseif ( $mode == 'do_add' && $cat_id ) { ! $cat_id = $pafiledb->update_add_cat( $cat_id ); if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } elseif ( $mode == 'do_delete' ) --- 93,116 ---- if ( $mode == 'do_add' && !$cat_id ) { ! $new_cat_id = $pafiledb->update_add_cat(); $mode = 'add'; if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } + $mode = 'add'; } elseif ( $mode == 'do_add' && $cat_id ) { ! $new_cat_id = $pafiledb->update_add_cat( $cat_id ); if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } + $mode = 'edit'; } elseif ( $mode == 'do_delete' ) *************** *** 169,172 **** --- 171,176 ---- $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); + if ( sizeof( $pafiledb->error ) ) $pafiledb_template->assign_block_vars( 'pafiledb_error', array() ); + $pafiledb_template->assign_vars( array( 'L_CAT_TITLE' => $l_title, *************** *** 204,208 **** } ! $cat_list .= ( !$_POST['cat_parent'] ) ? $pafiledb->generate_jumpbox() : $pafiledb-generate_jumpboxn( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; --- 208,212 ---- } ! $cat_list .= ( !$_POST['cat_parent'] ) ? $pafiledb->generate_jumpbox() : $pafiledb->generate_jumpbox( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:00:42
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23430/modules/mx_linkdb/linkdb/includes Modified Files: functions.php functions_linkdb.php Log Message: working... Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** functions.php 3 Jul 2006 20:11:30 -0000 1.9 --- functions.php 4 Jul 2006 18:00:33 -0000 1.10 *************** *** 18,22 **** function set_config( $config_name, $config_value ) { ! global $db, $linkdb_config; $sql = "UPDATE " . LINK_CONFIG_TABLE . " SET --- 18,22 ---- function set_config( $config_name, $config_value ) { ! global $linkdb_cache, $db, $linkdb_config; $sql = "UPDATE " . LINK_CONFIG_TABLE . " SET *************** *** 40,43 **** --- 40,45 ---- $linkdb_config[$config_name] = $config_value; + $linkdb_cache->destroy( 'config' ); + } *************** *** 1527,1531 **** $template->assign_vars( array( 'L_JUMP' => $lang['Jump'], ! 'JUMPMENU' => $linkdb->modules[$linkdb->module_name]->generate_jumpbox(), 'S_JUMPBOX_ACTION' => append_sid( linkdb_this_mxurl() ), 'MX_PAGE' => $page_id, --- 1529,1533 ---- $template->assign_vars( array( 'L_JUMP' => $lang['Jump'], ! 'JUMPMENU' => $linkdb->modules[$linkdb->module_name]->generate_jumpbox( 0, 0, array( $_GET['cat_id'] => 1 ) ), 'S_JUMPBOX_ACTION' => append_sid( linkdb_this_mxurl() ), 'MX_PAGE' => $page_id, Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** functions_linkdb.php 3 Jul 2006 20:11:30 -0000 1.11 --- functions_linkdb.php 4 Jul 2006 18:00:33 -0000 1.12 *************** *** 275,279 **** $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_links = '-1' cat_last_link_id = '0', cat_last_link_name = '', --- 275,279 ---- $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_links = '-1', cat_last_link_id = '0', cat_last_link_name = '', *************** *** 589,603 **** function new_file_in_cat( $cat_id ) { ! global $linkdb_config, $board_config, $db, $_COOKIE; $cat_array = explode(',', $this->gen_cat_ids( $cat_id )); $files_new = 0; - $time = time() - ( $linkdb_config['settings_newdays'] * 24 * 60 * 60 ); foreach ( $cat_array as $key => $cat_id ) { ! if ( $this->auth_user[$cat_id]['auth_view'] && $this->cat_rowset[$cat_id]['cat_last_link_time'] > $time) { $files_new++; --- 589,602 ---- function new_file_in_cat( $cat_id ) { ! global $linkdb_config, $board_config, $db; $cat_array = explode(',', $this->gen_cat_ids( $cat_id )); $files_new = 0; $time = time() - ( $linkdb_config['settings_newdays'] * 24 * 60 * 60 ); foreach ( $cat_array as $key => $cat_id ) { ! if ( $this->auth_user[$cat_id]['auth_read'] && $this->cat_rowset[$cat_id]['cat_last_link_time'] > $time) { $files_new++; *************** *** 616,632 **** function last_file_in_cat( $cat_id, &$file_info ) { ! if ( ( empty( $this->cat_rowset[$cat_id]['cat_last_file_id'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_file_name'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_file_time'] ) ) || $this->modified ) { global $db; ! $sql = 'SELECT file_time, file_id, file_name, file_catid FROM ' . LINKS_TABLE . " ! WHERE file_approved = '1' ! AND file_catid IN (" . $this->gen_cat_ids( $cat_id ) . ") ! ORDER BY file_time DESC"; if ( !( $result = $db->sql_query( $sql, 300 ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query Files info', '', __LINE__, __FILE__, $sql ); } --- 615,631 ---- function last_file_in_cat( $cat_id, &$file_info ) { ! if ( ( empty( $this->cat_rowset[$cat_id]['cat_last_link_id'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_link_name'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_link_time'] ) ) || $this->modified ) { global $db; ! $sql = 'SELECT link_time, link_id, link_name, link_catid FROM ' . LINKS_TABLE . " ! WHERE link_approved = '1' ! AND link_catid IN (" . $this->gen_cat_ids( $cat_id ) . ") ! ORDER BY link_time DESC"; if ( !( $result = $db->sql_query( $sql, 300 ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query links info', '', __LINE__, __FILE__, $sql ); } *************** *** 640,651 **** { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_last_file_id = " . intval( $file_info['file_id'] ) . ", ! cat_last_file_name = '" . addslashes( $file_info['file_name'] ) . "', ! cat_last_file_time = " . intval( $file_info['file_time'] ) . " WHERE cat_id = $cat_id"; if ( !( $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query Files info', '', __LINE__, __FILE__, $sql ); } } --- 639,650 ---- { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_last_link_id = " . intval( $file_info['link_id'] ) . ", ! cat_last_link_name = '" . addslashes( $file_info['link_name'] ) . "', ! cat_last_link_time = " . intval( $file_info['link_time'] ) . " WHERE cat_id = $cat_id"; if ( !( $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query links info', '', __LINE__, __FILE__, $sql ); } } *************** *** 653,659 **** else { ! $file_info['file_id'] = $this->cat_rowset[$cat_id]['cat_last_file_id']; ! $file_info['file_name'] = $this->cat_rowset[$cat_id]['cat_last_file_name']; ! $file_info['file_time'] = $this->cat_rowset[$cat_id]['cat_last_file_time']; } } --- 652,658 ---- else { ! $file_info['link_id'] = $this->cat_rowset[$cat_id]['cat_last_link_id']; ! $file_info['link_name'] = $this->cat_rowset[$cat_id]['cat_last_link_name']; ! $file_info['link_time'] = $this->cat_rowset[$cat_id]['cat_last_link_time']; } } *************** *** 691,695 **** { global $db, $template, $lang, $userdata, $phpEx, $images; ! global $linkdb_config, $board_config, $debug, $phpbb_root_path; if ( $this->cat_empty() ) --- 690,694 ---- { global $db, $template, $lang, $userdata, $phpEx, $images; ! global $linkdb_config, $board_config, $debug; if ( $this->cat_empty() ) *************** *** 712,750 **** // ! // output the root level category // if ( isset( $this->subcat_rowset[$cat_id] ) ) { ! // ! // Separate link categories into $catcol columns, script by CRLin ! // ! $catnum = count( $this->subcat_rowset[$cat_id] ); ! $catcol = $linkdb_config['cat_col']; ! $num = intval( $catnum / $catcol ); ! if ( $catnum % $catcol ) $num++; $template->assign_vars( array( 'LINK_WIDTH' => 100 / $catcol ) ); ! for( $i = 0;$i < $num; $i++ ) { ! $template->assign_block_vars( 'CAT_PARENT.catcol', array() ); ! if ( ( $catnum % $catcol ) && ( $i == $num-1 ) ) $catcol = $catnum % $catcol; ! for( $j = 0;$j < $catcol; $j++ ) { ! list( $subcat_id, $subcat_row ) = each ( $this->subcat_rowset[$cat_id] ); ! $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( ! 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'CAT_IMAGE' => $images['linkdb_folder'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); } } } } function display_files( $sort_method, $sort_order, $start, $show_file_message, $cat_id = false ) { --- 711,782 ---- // ! // Output the categories // if ( isset( $this->subcat_rowset[$cat_id] ) ) { ! $catnum = count($this->subcat_rowset[$cat_id]); ! $catcol = $linkdb_config['cat_col'] > 0 ? $linkdb_config['cat_col'] : 1; ! $num_of_rows = intval( $catnum / $catcol ); ! ! if ( $catnum % $catcol ) ! { ! $num_of_rows++; ! } $template->assign_vars( array( 'LINK_WIDTH' => 100 / $catcol ) ); ! $i = 0; ! foreach( $this->subcat_rowset[$cat_id] as $subcat_id => $subcat_row ) { ! if ( $i == 0 || $i == $catcol) { ! $template->assign_block_vars( 'CAT_PARENT.catcol', array() ); ! $i = 0; ! } ! $i++; ! $last_file_info = array(); ! $this->last_file_in_cat( $subcat_id, $last_file_info ); ! ! if ( !empty( $last_file_info['file_id'] ) && $this->auth[$subcat_id]['auth_read'] ) ! { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); ! $last_file = $last_file_time . '<br />'; ! $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( linkdb_this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( linkdb_this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; ! } ! else ! { ! $last_file = $lang['No_file']; ! } ! ! $is_new = false; ! if ( $this->new_file_in_cat( $subcat_id ) ) ! { ! $is_new = true; } + + $sub_cat = $this->get_sub_cat( $subcat_id ); + $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( + 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), + 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", + 'CAT_IMAGE' => ( $is_new ) ? $images['linkdb_folder_new'] : $images['linkdb_folder'], + 'CAT_NAME' => $subcat_row['cat_name'], + 'FILECAT' => $this->file_in_cat( $subcat_id ) ) + ); } } } + /** + * Enter description here... + * + * @param unknown_type $sort_method + * @param unknown_type $sort_order + * @param unknown_type $start + * @param unknown_type $show_file_message + * @param unknown_type $cat_id + */ function display_files( $sort_method, $sort_order, $start, $show_file_message, $cat_id = false ) { *************** *** 752,755 **** --- 784,789 ---- global $images, $lang, $phpEx, $linkdb_functions, $phpbb_root_path; + $filelist = false; + if ( empty( $cat_id ) ) { *************** *** 796,800 **** while ( $row = $db->sql_fetchrow( $result ) ) { ! $file_rowset[] = $row; } --- 830,837 ---- while ( $row = $db->sql_fetchrow( $result ) ) { ! if ( $this->auth_user[$row['link_catid']]['auth_view'] ) ! { ! $file_rowset[] = $row; ! } } *************** *** 802,806 **** $where_sql = ( !empty( $cat_id ) ) ? "AND link_catid = $cat_id" : ''; ! $sql = "SELECT COUNT(link_id) as total_file FROM " . LINKS_TABLE . " WHERE link_approved='1' --- 839,843 ---- $where_sql = ( !empty( $cat_id ) ) ? "AND link_catid = $cat_id" : ''; ! $sql = "SELECT COUNT(link_id) as total_links FROM " . LINKS_TABLE . " WHERE link_approved='1' *************** *** 815,825 **** $db->sql_freeresult( $result ); ! $total_file = $row['total_file']; unset( $row ); ! if ( count( $file_rowset ) ) { $template->assign_block_vars( 'FILELIST', array() ); $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; $template->assign_vars( array( --- 852,937 ---- $db->sql_freeresult( $result ); ! $total_file = $row['total_links']; unset( $row ); ! if (count( $file_rowset ) > 0) { $template->assign_block_vars( 'FILELIST', array() ); + if ( !$linkdb_config['split_links'] ) + { + $template->assign_block_vars( "FILELIST.no_split_links", array() ); + } + $filelist = true; + } + + for ( $i = 0; $i < count( $file_rowset ); $i++ ) + { + // + // Format the date for the given file + // + $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); + //$date_updated = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_update_time'], $board_config['board_timezone'] ); + // =================================================== + // Get rating for the file and format it + // =================================================== + $file_rating = ( $file_rowset[$i]['rating'] != 0 ) ? round( $file_rowset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; + // + // If the file is new then put a new image in front of it + // + $is_new = FALSE; + if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $file_rowset[$i]['link_time']) + { + $is_new = TRUE; + } + + $cat_name = ( empty( $cat_id ) ) ? $this->cat_rowset[$file_rowset[$i]['link_catid']]['cat_name'] : ''; + $cat_url = append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $file_rowset[$i]['link_catid'] ) ); + + // + // Poster + // + $file_poster = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; + $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; + $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; + + // + // Assign Vars + // + $template->assign_block_vars( "FILELIST.file_rows", array( + 'L_NEW_FILE' => $lang['New_file'], + 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), + 'FILE_NAME' => $file_rowset[$i]['link_name'], + 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], + 'DATE' => $date, + 'FILE_DLS' => $file_rowset[$i]['link_hits'], + 'FILE_VOTES' => $file_rowset[$i]['total_votes'], + 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', + 'RATING' => $file_rating, + + 'CAT_NAME' => $cat_name, + 'IS_NEW_FILE' => $is_new, + + 'U_CAT' => $cat_url, + 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ), + + 'POSTER' => $file_poster, + 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], + 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), + )); + + if ( $this->ratings[$file_rowset[$i]['link_catid']]['activated'] ) + { + $template->assign_block_vars( "FILELIST.file_rows.LINK_VOTE", array() ); + } + + if ( $linkdb_config['split_links'] ) + { + $template->assign_block_vars( "FILELIST.file_rows.split_links", array() ); + } + } + + if ( $filelist ) + { $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; $template->assign_vars( array( *************** *** 854,919 **** 'S_ACTION_SORT' => append_sid( linkdb_this_mxurl( "action=$action" ) ) ) ); - - if ( !$linkdb_config['split_links'] ) - { - $template->assign_block_vars( "FILELIST.no_split_links", array() ); - } - for ( $i = 0; $i < count( $file_rowset ); $i++ ) - { - // - // Format the date for the given file - // - $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); - - // - // If the file is new then put a new image in front of it - // - /*$is_new = FALSE; - if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $file_rowset[$i]['link_time']) - { - $is_new = TRUE; - }*/ - - $cat_name = ( empty( $cat_id ) ) ? $this->cat_rowset[$file_rowset[$i]['link_catid']]['cat_name'] : ''; - $cat_url = append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $file_rowset[$i]['link_catid'] ) ); - - $file_poster = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; - $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; - $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; - $file_rating = ( $file_rowset[$i]['rating'] != 0 ) ? round( $file_rowset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; - - // Assign Vars - - $template->assign_block_vars( "FILELIST.file_rows", array( - 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), - 'L_NEW_FILE' => $lang['New_file'], - - 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), - 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], - 'FILE_NAME' => $file_rowset[$i]['link_name'], - 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], - 'DATE' => $date, - 'POSTER' => $file_poster, - 'FILE_DLS' => $file_rowset[$i]['link_hits'], - 'FILE_VOTES' => $file_rowset[$i]['total_votes'], - 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', - 'RATING' => $file_rating, - - 'CAT_NAME' => $cat_name, - 'IS_NEW_FILE' => $is_new, - - 'U_CAT' => $cat_url, - 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ) ) - ); - - if ( UPDATEUPDATE ) - { - $template->assign_block_vars( "FILELIST.file_rows.LINK_VOTE", array() ); - } - if ( $linkdb_config['split_links'] ) - { - $template->assign_block_vars( "FILELIST.file_rows.split_links", array() ); - } - } } else --- 966,969 ---- *************** *** 928,931 **** --- 978,988 ---- } + /** + * Enter description here... + * + * @param unknown_type $link_rowset + * @param unknown_type $row + * @return unknown + */ function display_banner( $link_rowset, $row ) { *************** *** 954,959 **** } ! // Admin and mod functions ! function update_add_cat( $cat_id = false ) { --- 1011,1020 ---- } ! /** ! * Enter description here... ! * ! * @param unknown_type $cat_id ! * @return unknown ! */ function update_add_cat( $cat_id = false ) { *************** *** 1063,1066 **** --- 1124,1132 ---- } + /** + * Enter description here... + * + * @param unknown_type $cat_id + */ function delete_cat( $cat_id = false ) { *************** *** 1124,1127 **** --- 1190,1199 ---- } + /** + * Enter description here... + * + * @param unknown_type $id + * @param unknown_type $mode + */ function delete_links( $id, $mode = 'file' ) { *************** *** 1193,1196 **** --- 1265,1274 ---- } + /** + * Enter description here... + * + * @param unknown_type $from_cat + * @param unknown_type $to_cat + */ function move_links( $from_cat, $to_cat ) { *************** *** 1209,1217 **** } function delete_subcat( $cat_id, $file_mode = 'delete', $to_cat = false ) { global $db; ! if ( empty( $this->subcat_rowset[$cat_id] ) ) return; foreach( $this->subcat_rowset[$cat_id] as $sub_cat_id => $subcat_data ) { --- 1287,1306 ---- } + /** + * Enter description here... + * + * @param unknown_type $cat_id + * @param unknown_type $file_mode + * @param unknown_type $to_cat + */ function delete_subcat( $cat_id, $file_mode = 'delete', $to_cat = false ) { global $db; ! if ( empty( $this->subcat_rowset[$cat_id] ) || count( $this->subcat_rowset[$cat_id] ) <= 0 ) ! { ! return; ! } ! foreach( $this->subcat_rowset[$cat_id] as $sub_cat_id => $subcat_data ) { *************** *** 1239,1242 **** --- 1328,1337 ---- } + /** + * Enter description here... + * + * @param unknown_type $from_cat + * @param unknown_type $to_cat + */ function move_subcat( $from_cat, $to_cat ) { *************** *** 1255,1258 **** --- 1350,1358 ---- } + /** + * Enter description here... + * + * @param unknown_type $cat_parent + */ function reorder_cat( $cat_parent ) { *************** *** 1285,1288 **** --- 1385,1393 ---- } + /** + * Enter description here... + * + * @param unknown_type $cat_id + */ function order_cat( $cat_id ) { *************** *** 1305,1332 **** } function update_add_link( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $_POST, $userdata, $linkdb_config, $_FILES, $_REQUEST, $linkdb_functions, $user_ip; $link_poster = ( !empty( $_POST['post_username'] ) ) ? $_POST['post_username'] : ''; $file_remote_url = ( !empty( $_POST['download_url'] ) ) ? $_POST['download_url'] : ''; $link_logo_src = ( !empty( $_POST['link_logo_src'] ) ) ? $_POST['link_logo_src'] : ''; - if ( substr( $link_logo_src, -17 ) == 'weblink_88x31.png' ) $link_logo_src = ''; - $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; - $file_name = ( isset( $_POST['name'] ) ) ? htmlspecialchars( $_POST['name'] ) : ''; - - $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? $_POST['long_desc'] : ''; ! if ( UPDATEUPDATE ) ! { ! $file_approved = ( isset( $_POST['approved'] ) ) ? intval( $_POST['approved'] ) : 0; ! } ! else { ! $file_approved = 1; } ! $file_dls = ( isset( $_POST['file_download'] ) ) ? intval( $_POST['file_download'] ) : 0; $file_time = time(); --- 1410,1437 ---- } + /** + * Enter description here... + * + * @param unknown_type $file_id + * @return unknown + */ function update_add_link( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $userdata, $linkdb_config, $_FILES, $linkdb_functions, $user_ip; $link_poster = ( !empty( $_POST['post_username'] ) ) ? $_POST['post_username'] : ''; $file_remote_url = ( !empty( $_POST['download_url'] ) ) ? $_POST['download_url'] : ''; $link_logo_src = ( !empty( $_POST['link_logo_src'] ) ) ? $_POST['link_logo_src'] : ''; ! if ( substr( $link_logo_src, -17 ) == 'weblink_88x31.png' ) { ! $link_logo_src = ''; } ! $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; ! $file_name = ( isset( $_POST['name'] ) ) ? htmlspecialchars( $_POST['name'] ) : ''; ! $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? $_POST['long_desc'] : ''; + $file_dls = ( isset( $_POST['file_download'] ) ) ? intval( $_POST['file_download'] ) : 0; $file_time = time(); *************** *** 1351,1354 **** --- 1456,1491 ---- } + if ( $file_id ) + { + $sql = 'SELECT * + FROM ' . LINKS_TABLE . " + WHERE link_id = '$file_id'"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt query Download URL', '', __LINE__, __FILE__, $sql ); + } + + $file_data = $db->sql_fetchrow( $result ); + + $db->sql_freeresult( $result ); + } + + if ( $linkdb->modules[$linkdb->module_name]->auth_user[$cat_id]['auth_approval'] || ( $linkdb->modules[$linkdb->module_name]->auth_user[$cat_id]['auth_mod'] && $userdata['session_logged_in'] ) ) + { + if ( !$file_id ) + { + $file_approved = 1; + } + else + { + $file_approved = isset( $file_data['file_approved'] ) && !( $linkdb->modules[$linkdb->module_name]->auth_user[$cat_id]['auth_mod'] && $userdata['session_logged_in'] ) ? $file_data['file_approved'] : 1; + } + } + else + { + $file_approved = 0; + } + if ( !$file_id ) { *************** *** 1386,1389 **** --- 1523,1622 ---- } + /** + * Enter description here... + * + * @param unknown_type $file_id + * @param unknown_type $cat_id + * @param unknown_type $mode_notification + */ + function update_add_link_notify( $file_id = false, $mode_notification = 'edit' ) + { + global $db; + + if ( in_array( $mode_notification, array( 'add', 'edit', 'do_approve', 'do_unapprove', 'delete' ) ) ) + { + if (!$file_id) + { + die('bad update_add_file_notify arg'); + } + + if (is_array( $file_id ) && !empty( $file_id )) + { + $fileIdsArray = $file_id; + } + else + { + $fileIdsArray[] = $file_id; + } + + foreach($fileIdsArray as $fileId) + { + $sql = "SELECT link_catid + FROM " . LINKS_TABLE . " + WHERE link_id = '" . $fileId . "'"; + + if ( !$result = $db->sql_query( $sql ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldn\'t get link info', '', __LINE__, __FILE__, $sql ); + } + + $row = $db->sql_fetchrow( $result ); + $catId = $row['link_catid']; + + // + // Notification + // + if ( $this->notification[$catId]['activated'] > 0 ) // -1, 0, 1, 2 + { + // + // Instatiate notification + // + $mx_link_notification = new mx_link_notification(); + $mx_link_notification->init( $fileId ); + + // + // Now send notification + // + $mx_notification_mode = $this->notification[$catId]['activated'] == 1 ? MX_PM_MODE : MX_MAIL_MODE; + + switch ( $mode_notification ) + { + case 'add': + $mx_notification_action = MX_NEW_NOTIFICATION; + break; + case 'edit': + $mx_notification_action = MX_EDITED_NOTIFICATION; + break; + case 'do_approve': + $mx_notification_action = MX_APPROVED_NOTIFICATION; + break; + case 'do_unapprove': + $mx_notification_action = MX_UNAPPROVED_NOTIFICATION; + break; + case 'delete': + $mx_notification_action = MX_DELETED_NOTIFICATION; + break; + } + + $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#'); + $html_entities_replace = array('&', '<', '>', '"'); + + $mx_link_notification->notify( $mx_notification_mode, $mx_notification_action ); + + if ( $this->notification[$cat_id]['notify_group'] > 0 ) + { + $mx_link_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); + } + } + } + } + } + + /** + * Enter description here... + * + * @param unknown_type $mode + * @param unknown_type $link_id + */ function link_approve( $mode = 'do_approve', $link_id ) { *************** *** 1556,1560 **** global $lang; ! $this->auth_can_list = '<br />' . ( ( $this->auth[$cat_id]['auth_upload'] ) ? $lang['PA_Rules_upload_can'] : $lang['PA_Rules_upload_cannot'] ) . '<br />'; $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_view_file'] ) ? $lang['PA_Rules_view_file_can'] : $lang['PA_Rules_view_file_cannot'] ) . '<br />'; $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_edit_file'] ) ? $lang['PA_Rules_edit_file_can'] : $lang['PA_Rules_edit_file_cannot'] ) . '<br />'; --- 1789,1793 ---- global $lang; ! $this->auth_can_list = '<br />' . ( ( $this->auth_user[$cat_id]['auth_upload'] ) ? $lang['PA_Rules_upload_can'] : $lang['PA_Rules_upload_cannot'] ) . '<br />'; $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_view_file'] ) ? $lang['PA_Rules_view_file_can'] : $lang['PA_Rules_view_file_cannot'] ) . '<br />'; $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_edit_file'] ) ? $lang['PA_Rules_edit_file_can'] : $lang['PA_Rules_edit_file_cannot'] ) . '<br />'; |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:00:41
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23430/modules/mx_linkdb/linkdb/modules Modified Files: link_category.php link_rate.php Log Message: working... Index: link_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_category.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** link_category.php 1 Jul 2006 21:32:19 -0000 1.6 --- link_category.php 4 Jul 2006 18:00:33 -0000 1.7 *************** *** 42,48 **** $sort_method = 'link_hits'; break; - case 'link_longdesc': - $sort_method = 'link_longdesc'; - break; default: $sort_method = $linkdb_config['sort_method']; --- 42,45 ---- Index: link_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_rate.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** link_rate.php 3 Jul 2006 20:11:30 -0000 1.7 --- link_rate.php 4 Jul 2006 18:00:33 -0000 1.8 *************** *** 16,24 **** global $_REQUEST, $_POST, $phpbb_root_path, $linkdb_functions; - if ( UPDATEUPDATE ) - { - mx_message_die( GENERAL_MESSAGE, $lang['Not_allow_vote'] ); - } - if ( isset( $_REQUEST['link_id'] ) ) { --- 16,19 ---- *************** *** 50,53 **** --- 45,53 ---- $db->sql_freeresult( $result ); + if ( !$this->auth_user[$link_data['link_catid']]['auth_rate'] ) + { + mx_message_die( GENERAL_MESSAGE, $lang['Not_allow_vote'] ); + } + if ( !$userdata['session_logged_in'] ) { |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:00:40
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23430/modules/mx_linkdb/linkdb/admin Modified Files: admin_setting.php Log Message: working... Index: admin_setting.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_setting.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_setting.php 3 Jul 2006 20:11:30 -0000 1.8 --- admin_setting.php 4 Jul 2006 18:00:32 -0000 1.9 *************** *** 71,75 **** $sort_method_options = array(); ! $sort_method_options = array( "file_name", "file_time", "file_rating", "file_dls", "file_update_time" ); $sort_method_list = '<select name="sort_method">'; --- 71,75 ---- $sort_method_options = array(); ! $sort_method_options = array( "link_name", "link_time", "link_hits" ); $sort_method_list = '<select name="sort_method">'; |
|
From: Jon O. <jon...@us...> - 2006-07-04 18:00:38
|
Update of /cvsroot/mxbb/mx_linkdb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23430/modules/mx_linkdb/templates/subSilver Modified Files: link_main_body.tpl subSilver.cfg Log Message: working... Index: subSilver.cfg =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/subSilver.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** subSilver.cfg 5 Apr 2006 21:25:22 -0000 1.1 --- subSilver.cfg 4 Jul 2006 18:00:33 -0000 1.2 *************** *** 14,19 **** // the {LANG} place holder is available. This will be replaced // with xxx where xxx is the users selected language. If ! // that language isn't available it will default to english. ! // Therefore you MUST ensure you have at least a english // directory if you choose to localise your template // --- 14,19 ---- // the {LANG} place holder is available. This will be replaced // with xxx where xxx is the users selected language. If ! // that language isn't available it will default to english. ! // Therefore you MUST ensure you have at least a english // directory if you choose to localise your template // *************** *** 38,41 **** // ------------------------------------------------------------------------- $mx_images['linkdb_folder'] = $images['folder']; ! $mx_images['linkdb_link_new'] = $images['pa_file_new']; //???? ?> \ No newline at end of file --- 38,41 ---- // ------------------------------------------------------------------------- $mx_images['linkdb_folder'] = $images['folder']; ! $mx_images['linkdb_link_new'] = $images['pa_file_new']; ?> \ No newline at end of file Index: link_main_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/link_main_body.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** link_main_body.tpl 5 Apr 2006 21:25:22 -0000 1.3 --- link_main_body.tpl 4 Jul 2006 18:00:33 -0000 1.4 *************** *** 7,37 **** </table> - <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <!-- BEGIN CAT_PARENT --> ! <tr> ! <th class="thHead" colspan="2">{L_CATEGORY}</th> ! </tr> ! <tr><td class="row1" colspan="2"> ! <table border="0" cellpadding="2" cellspacing="1" width="100%" > ! <!-- BEGIN catcol --> ! <tr> ! <!-- BEGIN no_cat_parent --> ! <td width="{LINK_WIDTH}%"> ! <table border="0" cellpadding="2" cellspacing="2" width="100%"> ! <tr> ! <td><a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}"><img src="{CAT_PARENT.catcol.no_cat_parent.CAT_IMAGE}" alt="{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}" align="absmiddle" border="0" /></a></td> ! <td width="100%" valign="middle" nowrap="nowrap"><a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}" class="cattitle">{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}</a> <span class="gensmall">({CAT_PARENT.catcol.no_cat_parent.FILECAT})</span><br> ! {CAT_PARENT.catcol.no_cat_parent.SUB_CAT} ! </tr></table> ! </td> ! <!-- END no_cat_parent --> ! </tr> ! <!-- END catcol --> ! </table> ! </td></tr> ! <!-- END CAT_PARENT --> </table> - <br /> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> --- 7,44 ---- </table> <!-- BEGIN CAT_PARENT --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead" colspan="2">{L_CATEGORY}</th> ! </tr> ! <tr> ! <td class="row1" colspan="2"> ! <table border="0" cellpadding="2" cellspacing="1" width="100%" > ! <!-- BEGIN catcol --> ! <tr> ! <!-- BEGIN no_cat_parent --> ! <td width="{LINK_WIDTH}%"> ! <table border="0" cellpadding="2" cellspacing="2" width="100%"> ! <tr> ! <td> ! <a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}"><img src="{CAT_PARENT.catcol.no_cat_parent.CAT_IMAGE}" alt="{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}" align="absmiddle" border="0" /></a> ! </td> ! <td width="100%" valign="middle" nowrap="nowrap"> ! <a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}" class="cattitle">{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}</a> <span class="gensmall">({CAT_PARENT.catcol.no_cat_parent.FILECAT})</span><br> ! {CAT_PARENT.catcol.no_cat_parent.SUB_CAT} ! </td> ! </tr> ! </table> ! </td> ! <!-- END no_cat_parent --> ! </tr> ! <!-- END catcol --> ! </table> ! </td> ! </tr> </table> <br /> + <!-- END CAT_PARENT --> + <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> *************** *** 39,47 **** <th colspan="2" class="thHead">{L_LINK_US}</th> </tr> ! <tr> <td class="row1" width="80%"> <span class="gensmall">{L_LINK_US_EXPLAIN}</span><br /> <table width="100%" cellspacing="1" cellpadding="4" border="0" align="center" style="table-layout:fixed;" class="bodyline"> ! <tr> <td style="left:0px;width:100%;word-wrap:break-word;font-size=9px;" class="gensmall">{LINK_US_SYNTAX}</td> </tr> --- 46,54 ---- <th colspan="2" class="thHead">{L_LINK_US}</th> </tr> ! <tr> <td class="row1" width="80%"> <span class="gensmall">{L_LINK_US_EXPLAIN}</span><br /> <table width="100%" cellspacing="1" cellpadding="4" border="0" align="center" style="table-layout:fixed;" class="bodyline"> ! <tr> <td style="left:0px;width:100%;word-wrap:break-word;font-size=9px;" class="gensmall">{LINK_US_SYNTAX}</td> </tr> |
|
From: Jon O. <jon...@us...> - 2006-07-03 20:12:11
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31424/modules/mx_kb/kb/includes Modified Files: functions_kb.php Log Message: fix Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_kb.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** functions_kb.php 1 Jul 2006 21:30:30 -0000 1.10 --- functions_kb.php 3 Jul 2006 20:12:06 -0000 1.11 *************** *** 24,30 **** /** ! * Enter description here... * ! * @param unknown_type $module_name */ function adminmodule( $module_name ) --- 24,30 ---- /** ! * load admin module * ! * @param unknown_type $module_name send module name to load it */ function adminmodule( $module_name ) *************** *** 55,60 **** if ( !class_exists( 'mx_kb_' . $module_name ) ) { ! global $phpbb_root_path, $phpEx; ! global $mx_root_path, $module_root_path, $is_block, $phpEx; $this->module_name = $module_name; --- 55,59 ---- if ( !class_exists( 'mx_kb_' . $module_name ) ) { ! global $module_root_path, $phpEx; $this->module_name = $module_name; |
|
From: Jon O. <jon...@us...> - 2006-07-03 20:11:37
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30987/modules/mx_linkdb Modified Files: db_install.php db_upgrade.php Log Message: Working... Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_install.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** db_install.php 3 Jul 2006 09:18:01 -0000 1.11 --- db_install.php 3 Jul 2006 20:11:30 -0000 1.12 *************** *** 198,201 **** --- 198,203 ---- "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('pagination', '10')", "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('cat_col', '2')", + "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('settings_newdays', '1')", + // New -------------------- Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_upgrade.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** db_upgrade.php 3 Jul 2006 09:18:01 -0000 1.13 --- db_upgrade.php 3 Jul 2006 20:11:30 -0000 1.14 *************** *** 132,135 **** --- 132,138 ---- $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('wysiwyg_path', 'modules/mx_shared/') "; // settings_dbname + // Appearance + $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('settings_newdays', '1') "; // settings_dbname + // Comments $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('use_comments', '0') "; // comments_show |
|
From: Jon O. <jon...@us...> - 2006-07-03 20:11:35
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30987/modules/mx_linkdb/linkdb/includes Modified Files: functions.php functions_auth.php functions_linkdb.php Log Message: Working... Index: functions_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_auth.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_auth.php 1 Jul 2006 21:32:19 -0000 1.1 --- functions_auth.php 3 Jul 2006 20:11:30 -0000 1.2 *************** *** 113,120 **** 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)) ) --- 113,120 ---- if ( empty($f_access) ) { ! $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.cat_id = $cat_id" : ''; ! $sql = "SELECT a.cat_id, $a_sql ! FROM " . LINK_CATEGORIES_TABLE . " a $forum_match_sql"; if ( !($result = $db->sql_query($sql)) ) *************** *** 139,146 **** 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)) ) --- 139,146 ---- if ( empty($f_access_group) ) { ! $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.cat_id = $cat_id" : ''; ! $sql = "SELECT a.cat_id, $a_sql_groups, a.auth_moderator_groups ! FROM " . LINK_CATEGORIES_TABLE . " a $forum_match_sql"; if ( !($result = $db->sql_query($sql)) ) *************** *** 221,225 **** $value_groups = $f_access_group[$k][$key_groups]; ! $f_cat_id = $f_access[$k]['category_id']; --- 221,225 ---- $value_groups = $f_access_group[$k][$key_groups]; ! $f_cat_id = $f_access[$k]['cat_id']; *************** *** 275,279 **** 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; --- 275,279 ---- for($k = 0; $k < count($f_access); $k++) { ! $f_cat_id = $f_access[$k]['cat_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; Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functions.php 1 Jul 2006 21:32:18 -0000 1.8 --- functions.php 3 Jul 2006 20:11:30 -0000 1.9 *************** *** 1534,1538 **** 'S_TIMEZONE' => sprintf( $lang['All_times'], $lang[number_format( $board_config['board_timezone'] )] ), - 'LINKDB_VERSION' => $linkdb_config['linkdb_versions'], //'S_AUTH_LIST' => $mx_kb->modules[$mx_kb->module_name]->auth_can_list, --- 1534,1537 ---- Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** functions_linkdb.php 3 Jul 2006 12:23:30 -0000 1.10 --- functions_linkdb.php 3 Jul 2006 20:11:30 -0000 1.11 *************** *** 23,29 **** /** ! * Enter description here... * ! * @param unknown_type $module_name */ function adminmodule( $module_name ) --- 23,29 ---- /** ! * load admin module * ! * @param unknown_type $module_name send module name to load it */ function adminmodule( $module_name ) *************** *** 46,52 **** /** ! * Enter description here... * ! * @param unknown_type $module_name */ function module( $module_name ) --- 46,52 ---- /** ! * load module * ! * @param unknown_type $module_name send module name to load it */ function module( $module_name ) *************** *** 68,74 **** } ! // ! // this will be replaced by the loaded module ! // function main( $module_id = false ) { --- 68,77 ---- } ! /** ! * this will be replaced by the loaded module ! * ! * @param unknown_type $module_id ! * @return unknown ! */ function main( $module_id = false ) { *************** *** 76,84 **** } ! // ! // go ahead and output the page ! // $page title : send page title ! // $tpl_name : template file name ! // function display( $page_title1, $tpl_name ) { --- 79,88 ---- } ! /** ! * go ahead and output the page ! * ! * @param unknown_type $page_title send page title ! * @param unknown_type $tpl_name template file name ! */ function display( $page_title1, $tpl_name ) { *************** *** 116,123 **** var $debug_msg = array(); - // Specific for linkdb - var $auth = array(); - var $auth_global = array(); - /** * Prepare data --- 120,123 ---- *************** *** 126,130 **** function init() { ! global $db, $userdata, $debug; unset( $this->cat_rowset ); --- 126,130 ---- function init() { ! global $db, $userdata, $debug, $linkdb_config; unset( $this->cat_rowset ); *************** *** 147,155 **** $db->sql_freeresult( $result ); ! //$this->auth( AUTH_ALL, AUTH_LIST_ALL, $userdata, $cat_rowset ); for( $i = 0; $i < count( $cat_rowset ); $i++ ) { ! if ( $this->auth_user[$cat_rowset[$i]['category_id']]['auth_view'] || true) { $this->cat_rowset[$cat_rowset[$i]['cat_id']] = $cat_rowset[$i]; --- 147,155 ---- $db->sql_freeresult( $result ); ! $this->auth( AUTH_ALL, AUTH_LIST_ALL, $userdata, $cat_rowset ); for( $i = 0; $i < count( $cat_rowset ); $i++ ) { ! if ( $this->auth_user[$cat_rowset[$i]['cat_id']]['auth_view'] ) { $this->cat_rowset[$cat_rowset[$i]['cat_id']] = $cat_rowset[$i]; *************** *** 158,174 **** } - /* // // Comments // Note: some settings are category dependent, but may use default config settings // ! $this->comments[$cat_rowset[$i]['category_id']]['activated'] = $cat_rowset[$i]['cat_allow_comments'] == -1 ? ($kb_config['use_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_comments'] == 1 ? true : false ); ! $this->comments[$cat_rowset[$i]['category_id']]['internal_comments'] = $cat_rowset[$i]['internal_comments'] == -1 ? ($kb_config['internal_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['internal_comments'] == 1 ? true : false ); // phpBB or internal comments ! $this->comments[$cat_rowset[$i]['category_id']]['autogenerate_comments'] = $cat_rowset[$i]['autogenerate_comments'] == -1 ? ($kb_config['autogenerate_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['autogenerate_comments'] == 1 ? true : false ); // autocreate comments when updated ! $this->comments[$cat_rowset[$i]['category_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] < 1 ? ( intval($kb_config['comments_forum_id']) ) : ( intval($cat_rowset[$i]['comments_forum_id']) ); // phpBB target forum (only used for phpBB comments) ! if (!$this->comments[$cat_rowset[$i]['category_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['category_id']]['comments_forum_id']) < 1) { ! mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :(<br> Category: ' . $cat_rowset[$i]['category_name'] . ' Forum_id: ' . $this->comments[$cat_rowset[$i]['category_id']]['comments_forum_id']); } --- 158,173 ---- } // // Comments // Note: some settings are category dependent, but may use default config settings // ! $this->comments[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['cat_allow_comments'] == -1 ? ($linkdb_config['use_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_comments'] == 1 ? true : false ); ! $this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] = $cat_rowset[$i]['internal_comments'] == -1 ? ($linkdb_config['internal_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['internal_comments'] == 1 ? true : false ); // phpBB or internal comments ! $this->comments[$cat_rowset[$i]['cat_id']]['autogenerate_comments'] = $cat_rowset[$i]['autogenerate_comments'] == -1 ? ($linkdb_config['autogenerate_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['autogenerate_comments'] == 1 ? true : false ); // autocreate comments when updated ! $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] < 1 ? ( intval($linkdb_config['comments_forum_id']) ) : ( intval($cat_rowset[$i]['comments_forum_id']) ); // phpBB target forum (only used for phpBB comments) ! if (!$this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']) < 1) { ! mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :(<br> Category: ' . $cat_rowset[$i]['cat_name'] . ' Forum_id: ' . $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']); } *************** *** 176,192 **** // Ratings // ! $this->ratings[$cat_rowset[$i]['category_id']]['activated'] = $cat_rowset[$i]['cat_allow_ratings'] == -1 ? ($kb_config['use_ratings'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_ratings'] == 1 ? true : false ); // // Information // ! $this->information[$cat_rowset[$i]['category_id']]['activated'] = $cat_rowset[$i]['show_pretext'] == -1 ? ($kb_config['show_pretext'] == 1 ? true : false ) : ( $cat_rowset[$i]['show_pretext'] == 1 ? true : false ); // phpBB or internal ratings // // Notification // ! $this->notification[$cat_rowset[$i]['category_id']]['activated'] = $cat_rowset[$i]['notify'] == -1 ? (intval($kb_config['notify'])) : ( intval($cat_rowset[$i]['notify']) ); // -1, 0, 1, 2 ! $this->notification[$cat_rowset[$i]['category_id']]['notify_group'] = $cat_rowset[$i]['notify_group'] == -1 || $cat_rowset[$i]['notify_group'] == 0 ? (intval($kb_config['notify_group'])) : ( intval($cat_rowset[$i]['notify_group']) ); // Group_id ! */ } } --- 175,190 ---- // Ratings // ! $this->ratings[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['cat_allow_ratings'] == -1 ? ($linkdb_config['use_ratings'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_ratings'] == 1 ? true : false ); // // Information // ! $this->information[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['show_pretext'] == -1 ? ($linkdb_config['show_pretext'] == 1 ? true : false ) : ( $cat_rowset[$i]['show_pretext'] == 1 ? true : false ); // phpBB or internal ratings // // Notification // ! $this->notification[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['notify'] == -1 ? (intval($linkdb_config['notify'])) : ( intval($cat_rowset[$i]['notify']) ); // -1, 0, 1, 2 ! $this->notification[$cat_rowset[$i]['cat_id']]['notify_group'] = $cat_rowset[$i]['notify_group'] == -1 || $cat_rowset[$i]['notify_group'] == 0 ? (intval($linkdb_config['notify_group'])) : ( intval($cat_rowset[$i]['notify_group']) ); // Group_id } } *************** *** 241,244 **** --- 239,246 ---- } + /** + * Enter description here... + * + */ function sync_all() { *************** *** 250,253 **** --- 252,261 ---- } + /** + * Enter description here... + * + * @param unknown_type $cat_id + * @param unknown_type $init + */ function sync( $cat_id, $init = true ) { *************** *** 268,271 **** --- 276,282 ---- $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " SET cat_links = '-1' + cat_last_link_id = '0', + cat_last_link_name = '', + cat_last_link_time = '0' WHERE cat_id = '" . $cat_id . "'"; *************** *** 281,284 **** --- 292,301 ---- } + /** + * Enter description here... + * + * @param unknown_type $parent_id + * @param unknown_type $cat_nav + */ function category_nav( $parent_id, &$cat_nav ) { *************** *** 291,297 **** } ! // ! // if there is no cat ! // function cat_empty() { --- 308,316 ---- } ! /** ! * if there is no cat ! * ! * @return unknown ! */ function cat_empty() { *************** *** 299,302 **** --- 318,326 ---- } + /** + * Enter description here... + * + * @param unknown_type $true_false + */ function modified( $true_false = false ) { *************** *** 304,307 **** --- 328,337 ---- } + /** + * Enter description here... + * + * @param unknown_type $cat_id + * @return unknown + */ function file_in_cat( $cat_id ) { *************** *** 344,357 **** } ! // ! // Jump menu function ! // $cat_id : to handle parent cat_id ! // $depth : related to function to generate tree ! // $default : the cat you wanted to be selected ! // $for_file: TRUE high category ids will be -1 ! // $check_upload: if true permission for upload will be checked ! // function generate_jumpbox( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { static $cat_rowset = false; --- 374,390 ---- } ! /** ! * Jump menu function. ! * ! * @param unknown_type $cat_id to handle parent cat_id ! * @param unknown_type $depth related to function to generate tree ! * @param unknown_type $default the cat you wanted to be selected ! * @param unknown_type $for_file TRUE high category ids will be -1 ! * @param unknown_type $check_upload if true permission for upload will be checked ! * @return unknown ! */ function generate_jumpbox( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { + global $page_id; static $cat_rowset = false; *************** *** 364,368 **** foreach( $this->cat_rowset as $row ) { ! $cat_rowset[$row['cat_id']] = $row; } } --- 397,404 ---- foreach( $this->cat_rowset as $row ) { ! if ( $this->auth_user[$row['cat_id']]['auth_post'] ) ! { ! $cat_rowset[$row['cat_id']] = $row; ! } } } *************** *** 398,402 **** } - $cat['cat_allow_file'] = 1; // added by CRLin $cat_pre = ( !$cat['cat_allow_file'] ) ? '+ ' : '- '; $sub_cat_id = ( $for_file ) ? ( ( !$cat['cat_allow_file'] ) ? -1 : $cat['cat_id'] ) : $cat['cat_id']; --- 434,437 ---- *************** *** 414,428 **** } ! // ! // get all sub category in side certain category ! // $cat_id : category id ! // function get_sub_cat( $cat_id ) { global $mx_root_path, $module_root_path, $is_block, $phpEx; ! $cat_sub .= ''; if ( !empty( $this->subcat_rowset[$cat_id] ) ) { $cat_id1 = $cat_id; $class = "gensmall"; --- 449,512 ---- } ! /** ! * Enter description here... ! * ! * get all sub category in side certain category ! * ! * @param unknown_type $cat_id ! * @return unknown ! */ function get_sub_cat( $cat_id ) { global $mx_root_path, $module_root_path, $is_block, $phpEx; ! $cat_sub = ''; if ( !empty( $this->subcat_rowset[$cat_id] ) ) { + $class = "gensmall"; + $init_link_max = ( count( $this->subcat_rowset[$cat_id] ) > 3 ) ? 3 : count( $this->subcat_rowset[$cat_id] ); + $truncate = false; + $i = 0; + foreach( $this->subcat_rowset[$cat_id] as $cat_id => $cat_row ) + { + if ( $cat_row['cat_allow_file'] ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a> '; + } + else + { + if ( !empty( $this->subcat_rowset[$cat_row['cat_id']] ) ) + { + foreach( $this->subcat_rowset[$cat_row['cat_id']] as $sub_cat_id => $sub_cat_row ) + { + if ( $sub_cat_row['cat_allow_file'] ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a> '; + } + } + } + } + } + + if ($truncate) + { + $cat_sub .= '<span class=' . $class . '>, ...</span>'; + } + } + return $cat_sub; + + /* $cat_id1 = $cat_id; $class = "gensmall"; *************** *** 447,454 **** } } ! } ! return $cat_sub; } function generate_navigation( $cat_id ) { --- 531,542 ---- } } ! */ } + /** + * Enter description here... + * + * @param unknown_type $cat_id + */ function generate_navigation( $cat_id ) { *************** *** 499,506 **** * @return unknown */ - /* function new_file_in_cat( $cat_id ) { ! global $pafiledb_config, $board_config, $db, $_COOKIE; $cat_array = explode(',', $this->gen_cat_ids( $cat_id )); --- 587,593 ---- * @return unknown */ function new_file_in_cat( $cat_id ) { ! global $linkdb_config, $board_config, $db, $_COOKIE; $cat_array = explode(',', $this->gen_cat_ids( $cat_id )); *************** *** 508,516 **** $files_new = 0; ! $time = time() - ( $pafiledb_config['settings_newdays'] * 24 * 60 * 60 ); foreach ( $cat_array as $key => $cat_id ) { ! if ( $this->auth[$cat_id]['auth_read'] && $this->cat_rowset[$cat_id]['cat_last_file_time'] > $time) { $files_new++; --- 595,603 ---- $files_new = 0; ! $time = time() - ( $linkdb_config['settings_newdays'] * 24 * 60 * 60 ); foreach ( $cat_array as $key => $cat_id ) { ! if ( $this->auth_user[$cat_id]['auth_view'] && $this->cat_rowset[$cat_id]['cat_last_link_time'] > $time) { $files_new++; *************** *** 520,528 **** return $files_new; } - */ ! /*function last_file_in_cat($cat_id, &$file_info) { ! if((empty($this->cat_rowset[$cat_id]['cat_last_file_id']) && empty($this->cat_rowset[$cat_id]['cat_last_file_name']) && empty($this->cat_rowset[$cat_id]['cat_last_file_time'])) || $this->modified) { global $db; --- 607,620 ---- return $files_new; } ! /** ! * Enter description here... ! * ! * @param unknown_type $cat_id ! * @param unknown_type $file_info ! */ ! function last_file_in_cat( $cat_id, &$file_info ) { ! if ( ( empty( $this->cat_rowset[$cat_id]['cat_last_file_id'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_file_name'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_file_time'] ) ) || $this->modified ) { global $db; *************** *** 531,543 **** FROM ' . LINKS_TABLE . " WHERE file_approved = '1' ! AND file_catid IN (" . $this->gen_cat_ids($cat_id) . ") ORDER BY file_time DESC"; ! if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Couldnt Query Files info', '', __LINE__, __FILE__, $sql); } ! while($row = $db->sql_fetchrow($result)) { $temp_cat[] = $row; --- 623,635 ---- FROM ' . LINKS_TABLE . " WHERE file_approved = '1' ! AND file_catid IN (" . $this->gen_cat_ids( $cat_id ) . ") ORDER BY file_time DESC"; ! if ( !( $result = $db->sql_query( $sql, 300 ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query Files info', '', __LINE__, __FILE__, $sql ); } ! while ( $row = $db->sql_fetchrow( $result ) ) { $temp_cat[] = $row; *************** *** 545,559 **** $file_info = $temp_cat[0]; ! if(!empty($file_info)) { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_last_file_id = " . intval($file_info['file_id']) . ", ! cat_last_file_name = '" . addslashes($file_info['file_name']) . "', ! cat_last_file_time = " . intval($file_info['file_time']) . " WHERE cat_id = $cat_id"; ! if ( !($db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Couldnt Query Files info', '', __LINE__, __FILE__, $sql); } } --- 637,651 ---- $file_info = $temp_cat[0]; ! if ( !empty( $file_info ) ) { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_last_file_id = " . intval( $file_info['file_id'] ) . ", ! cat_last_file_name = '" . addslashes( $file_info['file_name'] ) . "', ! cat_last_file_time = " . intval( $file_info['file_time'] ) . " WHERE cat_id = $cat_id"; ! if ( !( $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query Files info', '', __LINE__, __FILE__, $sql ); } } *************** *** 565,570 **** $file_info['file_time'] = $this->cat_rowset[$cat_id]['cat_last_file_time']; } ! }*/ function gen_cat_ids( $cat_id, $cat_ids = '' ) { --- 657,669 ---- $file_info['file_time'] = $this->cat_rowset[$cat_id]['cat_last_file_time']; } ! } + /** + * Enter description here... + * + * @param unknown_type $cat_id + * @param unknown_type $cat_ids + * @return unknown + */ function gen_cat_ids( $cat_id, $cat_ids = '' ) { *************** *** 584,587 **** --- 683,691 ---- } + /** + * Enter description here... + * + * @param unknown_type $cat_id + */ function display_categories( $cat_id = LINKDB_ROOT_CAT ) { *************** *** 600,610 **** $template->assign_block_vars( 'CAT_PARENT', array() ); - $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], 'L_CATEGORY' => $lang['Category'], 'L_FILES' => $lang['Files'] ) ); // output the root level category if ( isset( $this->subcat_rowset[$cat_id] ) ) { --- 704,717 ---- $template->assign_block_vars( 'CAT_PARENT', array() ); $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], 'L_CATEGORY' => $lang['Category'], + 'L_LAST_FILE' => $lang['Last_file'], 'L_FILES' => $lang['Files'] ) ); + + // // output the root level category + // if ( isset( $this->subcat_rowset[$cat_id] ) ) { *************** *** 628,634 **** $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( ! 'CAT_PARENT.catcol.no_cat_parent', array( 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! // 'SUB_CAT' => ( !empty($sub_cat) ) ? $sub_cat : $lang['None'], 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", 'CAT_IMAGE' => $images['linkdb_folder'], --- 735,740 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( ! 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", 'CAT_IMAGE' => $images['linkdb_folder'], *************** *** 801,805 **** ); ! if ( $linkdb_config['allow_vote'] ) { $template->assign_block_vars( "FILELIST.file_rows.LINK_VOTE", array() ); --- 907,911 ---- ); ! if ( UPDATEUPDATE ) { $template->assign_block_vars( "FILELIST.file_rows.LINK_VOTE", array() ); *************** *** 920,924 **** $cat_order += 10; ! $sql = 'INSERT INTO ' . LINK_CATEGORIES_TABLE . " (cat_name, cat_desc, cat_parent, cat_order, cat_allow_file, cat_allow_ratings, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, show_pretext, notify, notify_group, 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit') VALUES('$cat_name', '$cat_desc', $cat_parent, $cat_order, $cat_allow_file, $cat_use_ratings, $cat_use_comments, $cat_internal_comments, $cat_autogenerate_comments, $comments_forum_id, $cat_show_pretext, $cat_notify, $cat_notify_group, $view_level, $post_level, $rate_level, $comment_level, $edit_level, $delete_level, $approval_level, $approval_edit_level)"; --- 1026,1030 ---- $cat_order += 10; ! $sql = 'INSERT INTO ' . LINK_CATEGORIES_TABLE . " (cat_name, cat_desc, cat_parent, cat_order, cat_allow_file, cat_allow_ratings, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, show_pretext, notify, notify_group, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit) VALUES('$cat_name', '$cat_desc', $cat_parent, $cat_order, $cat_allow_file, $cat_use_ratings, $cat_use_comments, $cat_internal_comments, $cat_autogenerate_comments, $comments_forum_id, $cat_show_pretext, $cat_notify, $cat_notify_group, $view_level, $post_level, $rate_level, $comment_level, $edit_level, $delete_level, $approval_level, $approval_edit_level)"; *************** *** 1212,1216 **** $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? $_POST['long_desc'] : ''; ! if ( $linkdb_config['link_validation'] == 1 ) { $file_approved = ( isset( $_POST['approved'] ) ) ? intval( $_POST['approved'] ) : 0; --- 1318,1322 ---- $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? $_POST['long_desc'] : ''; ! if ( UPDATEUPDATE ) { $file_approved = ( isset( $_POST['approved'] ) ) ? intval( $_POST['approved'] ) : 0; *************** *** 1311,1315 **** function update_add_comment($file_data = '', $item_id, $cid, $subject = '', $message = '', $html_on = false, $bbcode_on = true, $smilies_on = false) { ! global $pafiledb_template, $pafiledb_functions, $lang, $board_config, $phpEx, $pafiledb_config, $db, $images, $userdata; 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; --- 1417,1421 ---- function update_add_comment($file_data = '', $item_id, $cid, $subject = '', $message = '', $html_on = false, $bbcode_on = true, $smilies_on = false) { ! global $template, $linkdb_functions, $lang, $board_config, $phpEx, $linkdb_config, $db, $images, $userdata; 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; *************** *** 1361,1367 **** $comment_bbcode_uid = $mx_text->bbcode_uid; ! if ( $length > $pafiledb_config['max_comment_chars'] ) { ! mx_message_die( GENERAL_ERROR, 'Your comment is too long!<br/>The maximum length allowed in characters is ' . $pafiledb_config['max_comment_chars'] . '' ); } --- 1467,1473 ---- $comment_bbcode_uid = $mx_text->bbcode_uid; ! if ( $length > $linkdb_config['max_comment_chars'] ) { ! mx_message_die( GENERAL_ERROR, 'Your comment is too long!<br/>The maximum length allowed in characters is ' . $linkdb_config['max_comment_chars'] . '' ); } *************** *** 1384,1392 **** else { ! include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); ! $pafiledb_comments = new pafiledb_comments(); ! $pafiledb_comments->init( $item_id ); ! $return_data = $pafiledb_comments->post( 'update', $cid, $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); } --- 1490,1498 ---- else { ! include( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); ! $linkdb_comments = new linkdb_comments(); ! $linkdb_comments->init( $item_id ); ! $return_data = $linkdb_comments->post( 'update', $cid, $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); } *************** *** 1408,1416 **** else { ! include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); ! $pafiledb_comments = new pafiledb_comments(); ! $pafiledb_comments->init( $item_id ); ! $return_data = $pafiledb_comments->post( 'insert', '', $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); } } --- 1514,1522 ---- else { ! include( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); ! $linkdb_comments = new linkdb_comments(); ! $linkdb_comments->init( $item_id ); ! $return_data = $linkdb_comments->post( 'insert', '', $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); } } *************** *** 1451,1463 **** $this->auth_can_list = '<br />' . ( ( $this->auth[$cat_id]['auth_upload'] ) ? $lang['PA_Rules_upload_can'] : $lang['PA_Rules_upload_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->auth[$cat_id]['auth_view_file'] ) ? $lang['PA_Rules_view_file_can'] : $lang['PA_Rules_view_file_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->auth[$cat_id]['auth_edit_file'] ) ? $lang['PA_Rules_edit_file_can'] : $lang['PA_Rules_edit_file_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->auth[$cat_id]['auth_delete_file'] ) ? $lang['PA_Rules_delete_file_can'] : $lang['PA_Rules_delete_file_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->comments[$cat_id]['activated'] ? ( ( $this->auth[$cat_id]['auth_view_comment'] ? $lang['PA_Rules_view_comment_can'] : $lang['PA_Rules_view_comment_cannot'] ) . '<br />') : '')); ! $this->auth_can_list .= ( ( $this->comments[$cat_id]['activated'] ? ( ( $this->auth[$cat_id]['auth_post_comment'] ? $lang['PA_Rules_post_comment_can'] : $lang['PA_Rules_post_comment_cannot'] ) . '<br />') : '')); ! $this->auth_can_list .= ( ( $this->ratings[$cat_id]['activated'] ? ( ( $this->auth[$cat_id]['auth_rate'] ? $lang['PA_Rules_rate_can'] : $lang['PA_Rules_rate_cannot'] ) . '<br />') : '')); ! $this->auth_can_list .= ( ( $this->auth[$cat_id]['auth_download'] ) ? $lang['PA_Rules_download_can'] : $lang['PA_Rules_download_cannot'] ) . '<br />'; ! if ( $this->auth[$cat_id]['auth_mod'] ) { $this->auth_can_list .= $lang['PA_Rules_moderate_can']; --- 1557,1569 ---- $this->auth_can_list = '<br />' . ( ( $this->auth[$cat_id]['auth_upload'] ) ? $lang['PA_Rules_upload_can'] : $lang['PA_Rules_upload_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_view_file'] ) ? $lang['PA_Rules_view_file_can'] : $lang['PA_Rules_view_file_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_edit_file'] ) ? $lang['PA_Rules_edit_file_can'] : $lang['PA_Rules_edit_file_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_delete_file'] ) ? $lang['PA_Rules_delete_file_can'] : $lang['PA_Rules_delete_file_cannot'] ) . '<br />'; ! $this->auth_can_list .= ( ( $this->comments[$cat_id]['activated'] ? ( ( $this->auth_user[$cat_id]['auth_view_comment'] ? $lang['PA_Rules_view_comment_can'] : $lang['PA_Rules_view_comment_cannot'] ) . '<br />') : '')); ! $this->auth_can_list .= ( ( $this->comments[$cat_id]['activated'] ? ( ( $this->auth_user[$cat_id]['auth_post_comment'] ? $lang['PA_Rules_post_comment_can'] : $lang['PA_Rules_post_comment_cannot'] ) . '<br />') : '')); ! $this->auth_can_list .= ( ( $this->ratings[$cat_id]['activated'] ? ( ( $this->auth_user[$cat_id]['auth_rate'] ? $lang['PA_Rules_rate_can'] : $lang['PA_Rules_rate_cannot'] ) . '<br />') : '')); ! $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_download'] ) ? $lang['PA_Rules_download_can'] : $lang['PA_Rules_download_cannot'] ) . '<br />'; ! if ( $this->auth_user[$cat_id]['auth_mod'] ) { $this->auth_can_list .= $lang['PA_Rules_moderate_can']; |
|
From: Jon O. <jon...@us...> - 2006-07-03 20:11:35
|
Update of /cvsroot/mxbb/mx_linkdb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30987/modules/mx_linkdb/language/lang_english Modified Files: lang_admin.php Log Message: Working... Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/language/lang_english/lang_admin.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang_admin.php 3 Jul 2006 12:23:30 -0000 1.5 --- lang_admin.php 3 Jul 2006 20:11:30 -0000 1.6 *************** *** 12,23 **** // adminCP index // ! $lang['pafileDB_Download'] = 'PafileDB Admin'; $lang['0_Configuration'] = 'General Settings'; $lang['1_Cat_manage'] = 'Category Management'; ! $lang['2_File_manage'] = 'File Management'; $lang['3_Permissions'] = 'Permissions'; $lang['4_License'] = 'License'; $lang['5_Custom_manage'] = 'Custom fields'; - $lang['6_Fchecker'] = 'File checker'; // --- 12,22 ---- // adminCP index // ! $lang['LinkDb_links'] = 'LinkDB Admin'; $lang['0_Configuration'] = 'General Settings'; $lang['1_Cat_manage'] = 'Category Management'; ! $lang['2_Link_manage'] = 'Link Management'; $lang['3_Permissions'] = 'Permissions'; $lang['4_License'] = 'License'; $lang['5_Custom_manage'] = 'Custom fields'; // *************** *** 71,79 **** $lang['Appearance_title'] = 'Appearance'; ! $lang['File_pagination'] = 'File pagination'; ! $lang['File_pagination_explain'] = 'The number of files to show in a category before pagination.'; $lang['Sort_method'] = 'Sorting method'; ! $lang['Sort_method_explain'] = 'Define how files are sorted within its category.'; $lang['Sort_order'] = 'ASC or DESC sorting'; --- 70,78 ---- $lang['Appearance_title'] = 'Appearance'; ! $lang['File_pagination'] = 'Link pagination'; ! $lang['File_pagination_explain'] = 'The number of links to show in a category before pagination.'; $lang['Sort_method'] = 'Sorting method'; ! $lang['Sort_method_explain'] = 'Define how links are sorted within its category.'; $lang['Sort_order'] = 'ASC or DESC sorting'; *************** *** 82,85 **** --- 81,87 ---- $lang['cat_col'] = 'How many column of categories are to be listed'; + $lang['Nfdays'] = 'New File Days'; + $lang['Nfdaysinfo'] = 'How many days a new file is to be listed with a \'New File\' icon. If this is set to 5, then all files added within the past 5 days will have the \'New File\' icon'; + // // Comments *************** *** 89,93 **** $lang['Use_comments'] = 'Comments'; ! $lang['Use_comments_explain'] = 'Enable comments for files, to be inserted in the forum'; $lang['Internal_comments'] = 'Internal or phpBB Comments'; --- 91,95 ---- $lang['Use_comments'] = 'Comments'; ! $lang['Use_comments_explain'] = 'Enable comments for links, to be inserted in the forum'; $lang['Internal_comments'] = 'Internal or phpBB Comments'; *************** *** 103,113 **** $lang['Autogenerate_comments'] = 'Autogenerate comments when fil are managed'; ! $lang['Autogenerate_comments_explain'] = 'When editing/adding a file, a notifying reply is posted in the file topic.'; $lang['Del_topic'] = 'Delete Topic'; ! $lang['Del_topic_explain'] = 'When you delete a file, 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 file before pagination.'; $lang['Allow_Wysiwyg'] = 'Use WYSIWYG editor'; --- 105,115 ---- $lang['Autogenerate_comments'] = 'Autogenerate comments when fil are managed'; ! $lang['Autogenerate_comments_explain'] = 'When editing/adding a link, a notifying reply is posted in the link topic.'; $lang['Del_topic'] = 'Delete Topic'; ! $lang['Del_topic_explain'] = 'When you delete a link, 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 link before pagination.'; $lang['Allow_Wysiwyg'] = 'Use WYSIWYG editor'; *************** *** 160,168 **** $lang['Instructions_title'] = 'User Instructions'; ! $lang['Pre_text_name'] = 'File Submission Instructions'; $lang['Pre_text_explain'] = 'Activate Submission Instructions displayed to users at the top of the submission forum.'; ! $lang['Pre_text_header'] = 'File Submission Instructions Header'; ! $lang['Pre_text_body'] = 'File Submission Instructions Body'; $lang['Show'] = 'Show'; --- 162,170 ---- $lang['Instructions_title'] = 'User Instructions'; ! $lang['Pre_text_name'] = 'Link Submission Instructions'; $lang['Pre_text_explain'] = 'Activate Submission Instructions displayed to users at the top of the submission forum.'; ! $lang['Pre_text_header'] = 'Link Submission Instructions Header'; ! $lang['Pre_text_body'] = 'Link Submission Instructions Body'; $lang['Show'] = 'Show'; *************** *** 175,179 **** $lang['Notify'] = 'Notify admin by'; ! $lang['Notify_explain'] = 'Choose which way to receive notices that new files have been uploaded'; $lang['PM'] = 'PM'; $lang['Notify_group'] = 'and groupmembers '; --- 177,181 ---- $lang['Notify'] = 'Notify admin by'; ! $lang['Notify_explain'] = 'Choose which way to receive notices that new links have been uploaded'; $lang['PM'] = 'PM'; $lang['Notify_group'] = 'and groupmembers '; *************** *** 184,188 **** // $lang['Panel_cat_title'] = 'Category administration'; ! $lang['Panel_cat_explain'] = 'You can use the Category Management section to add, edit, delete and reorder categories. In order to add files to your database, you must have at least one category created. You can select a link below to manage your categories.'; $lang['All_links'] = 'All Links'; --- 186,190 ---- // $lang['Panel_cat_title'] = 'Category administration'; ! $lang['Panel_cat_explain'] = 'You can use the Category Management section to add, edit, delete and reorder categories. In order to add links to your database, you must have at least one category created. You can select a link below to manage your categories.'; $lang['All_links'] = 'All Links'; *************** *** 205,213 **** $lang['Catnameinfo'] = 'This will become the name of the category.'; $lang['Catdesc'] = 'Category Description'; ! $lang['Catdescinfo'] = 'This is a description of the files in the category'; $lang['Catparent'] = 'Parent Category'; $lang['Catparentinfo'] = 'If you want this category to be a sub-category, select the category you want it to be a sub-category of.'; ! $lang['Allow_file'] = 'Allow Adding file'; ! $lang['Allow_file_info'] = 'If you not allow adding file to this category it will be higher level category and you can add category as a sub for this category, like in the forum.'; $lang['None'] = 'None'; $lang['Catedited'] = 'The category you selected has been successfully edited'; --- 207,215 ---- $lang['Catnameinfo'] = 'This will become the name of the category.'; $lang['Catdesc'] = 'Category Description'; ! $lang['Catdescinfo'] = 'This is a description of the links in the category'; $lang['Catparent'] = 'Parent Category'; $lang['Catparentinfo'] = 'If you want this category to be a sub-category, select the category you want it to be a sub-category of.'; ! $lang['Allow_file'] = 'Allow Adding link'; ! $lang['Allow_file_info'] = 'If you not allow adding link to this category it will be higher level category and you can add category as a sub for this category, like in the forum.'; $lang['None'] = 'None'; $lang['Catedited'] = 'The category you selected has been successfully edited'; |
|
From: Jon O. <jon...@us...> - 2006-07-03 20:11:34
|
Update of /cvsroot/mxbb/mx_linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30987/modules/mx_linkdb/admin Modified Files: admin_linkdb.php Log Message: Working... Index: admin_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/admin/admin_linkdb.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_linkdb.php 3 Jul 2006 09:18:00 -0000 1.8 --- admin_linkdb.php 3 Jul 2006 20:11:30 -0000 1.9 *************** *** 14,21 **** { $filename = basename( __FILE__ ); ! $module['LinkDb']['Configuration'] = 'modules/mx_linkdb/admin/' . $filename . "?action=setting"; ! $module['LinkDb']['Link_cat_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=cat_manage"; ! $module['LinkDb']['Link_auth_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=auth_manage"; ! $module['LinkDb']['Link_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=link_manage"; return; } --- 14,22 ---- { $filename = basename( __FILE__ ); ! $module['LinkDb_links']['0_Configuration'] = 'modules/mx_linkdb/admin/' . $filename . "?action=setting"; ! $module['LinkDb_links']['1_Cat_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=cat_manage"; ! $module['LinkDb_links']['2_Link_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=auth_manage"; ! $module['LinkDb_links']['3_Permissions'] = 'modules/mx_linkdb/admin/' . $filename . "?action=link_manage"; ! $module['LinkDb_links']['5_Custom_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=custom_manage"; return; } |