You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2005-05-01 16:39:51
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv651/modules/mx_kb/templates/subSilver/admin Modified Files: kb_cat_admin_body.tpl kb_type_body.tpl Log Message: additional fixes Index: kb_type_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_type_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_type_body.tpl 20 Apr 2005 20:48:24 -0000 1.2 --- kb_type_body.tpl 1 May 2005 16:39:23 -0000 1.3 *************** *** 7,11 **** <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> ! <form action="{S_ACTION}" method="GET"> <td align="{S_CONTENT_DIR_RIGHT}" width="100%">{L_CREATE_TYPE} <input class="post" type="text" name="new_type_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> --- 7,11 ---- <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> ! <form action="{S_ACTION}" method="POST"> <td align="{S_CONTENT_DIR_RIGHT}" width="100%">{L_CREATE_TYPE} <input class="post" type="text" name="new_type_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> Index: kb_cat_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_cat_admin_body.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_cat_admin_body.tpl 20 Apr 2005 20:48:24 -0000 1.3 --- kb_cat_admin_body.tpl 1 May 2005 16:39:23 -0000 1.4 *************** *** 7,11 **** <table width="100%" cellpadding="2" cellspacing="2" border="0"> <tr> ! <form action="{S_ACTION}" method="GET"> <td align="{S_CONTENT_DIR_RIGHT}" width="100%">{L_CREATE_CAT} <input type="text" name="new_cat_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> --- 7,11 ---- <table width="100%" cellpadding="2" cellspacing="2" border="0"> <tr> ! <form action="{S_ACTION}" method="POST"> <td align="{S_CONTENT_DIR_RIGHT}" width="100%">{L_CREATE_CAT} <input type="text" name="new_cat_name"> <input type="submit" value="{L_CREATE}" class="liteoption"></td> </form> |
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv651/modules/mx_kb/admin Modified Files: admin_kb_art.php admin_kb_auth.php admin_kb_cat.php admin_kb_config.php admin_kb_custom.php admin_kb_rebuild_search.php admin_kb_types.php Log Message: additional fixes Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_art.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** admin_kb_art.php 20 Apr 2005 19:30:06 -0000 1.21 --- admin_kb_art.php 1 May 2005 16:39:22 -0000 1.22 *************** *** 25,38 **** define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Art_man'] = $file; return; } - $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; - require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 25,40 ---- define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require_once( $phpbb_root_path . 'extension.inc' ); ! if ( !empty( $setmodules ) ) { + include_once( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['KB_title']['3_Art_man'] = $file; return; } require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 52,69 **** define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); ! if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Art_man'] = 'modules/mx_kb/admin/' . $file; return; } - - $mx_root_path = './../../../'; - $module_root_path = "./../"; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); --- 54,76 ---- define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); ! if ( !empty( $setmodules ) ) { + $mx_root_path = './../'; + $module_root_path = './../modules/mx_kb/'; + require_once( $mx_root_path . 'extension.inc' ); + include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); + $file = basename( __FILE__ ); ! $module['KB_title']['3_Art_man'] = $module_root_path . 'admin/' . $file; return; } + $mx_root_path = './../../../'; + $module_root_path = './../'; + define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); *************** *** 170,174 **** $article_category_id = $kb_row['article_category_id']; ! update_kb_number( $article_category_id, '+ 1' ); kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); mx_add_search_words( 'single', $article_id, stripslashes( $kb_row['article_body'] ), stripslashes( $kb_row['article_title'] ), 'kb' ); --- 177,181 ---- $article_category_id = $kb_row['article_category_id']; ! update_kb_number( $article_category_id ); kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); mx_add_search_words( 'single', $article_id, stripslashes( $kb_row['article_body'] ), stripslashes( $kb_row['article_title'] ), 'kb' ); *************** *** 203,207 **** } ! update_kb_number( $article_category_id, '- 1' ); mx_remove_search_post( $article_id, 'kb' ); --- 210,214 ---- } ! update_kb_number( $article_category_id ); mx_remove_search_post( $article_id, 'kb' ); *************** *** 230,234 **** if ( $article['approved'] == 1 ) { ! update_kb_number( $article_category_id, '- 1' ); } --- 237,241 ---- if ( $article['approved'] == 1 ) { ! update_kb_number( $article_category_id ); } Index: admin_kb_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_auth.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_kb_auth.php 20 Apr 2005 19:30:17 -0000 1.7 --- admin_kb_auth.php 1 May 2005 16:39:22 -0000 1.8 *************** *** 24,37 **** define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Permissions'] = $file; return; } ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 24,39 ---- define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require( $phpbb_root_path . 'extension.inc' ); ! if ( !empty( $setmodules ) ) { + include_once( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['KB_title']['4_Permissions'] = $file; return; } ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 51,65 **** if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Permissions'] = "modules/mx_kb/admin/" . $file; return; } $mx_root_path = './../../../'; ! $module_root_path = "./../"; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); --- 53,72 ---- if ( !empty( $setmodules ) ) { + $mx_root_path = './../'; + $module_root_path = './../modules/mx_kb/'; + require_once( $mx_root_path . 'extension.inc' ); + include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); + $file = basename( __FILE__ ); ! $module['KB_title']['4_Permissions'] = $module_root_path . 'admin/' . $file; return; } $mx_root_path = './../../../'; ! $module_root_path = './../'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); Index: admin_kb_config.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_config.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** admin_kb_config.php 20 Apr 2005 19:30:17 -0000 1.20 --- admin_kb_config.php 1 May 2005 16:39:22 -0000 1.21 *************** *** 26,38 **** define( 'MXBB_MODULE', false ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Configuration'] = $file; return; } - $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; - require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 26,40 ---- define( 'MXBB_MODULE', false ); + $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; + require( $phpbb_root_path . 'extension.inc' ); + if ( !empty( $setmodules ) ) { + include_once( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['KB_title']['1_Configuration'] = $file; return; } require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 52,66 **** if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Configuration'] = 'modules/mx_kb/admin/' . $file . '?mode=config'; return; } $mx_root_path = './../../../'; ! $module_root_path = "./../"; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); --- 54,73 ---- if ( !empty( $setmodules ) ) { + $mx_root_path = './../'; + $module_root_path = './../modules/mx_kb/'; + require_once( $mx_root_path . 'extension.inc' ); + include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); + $file = basename( __FILE__ ); ! $module['KB_title']['1_Configuration'] = $module_root_path . 'admin/' . $file . '?mode=config'; return; } $mx_root_path = './../../../'; ! $module_root_path = './../'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** admin_kb_cat.php 20 Apr 2005 19:30:17 -0000 1.14 --- admin_kb_cat.php 1 May 2005 16:39:22 -0000 1.15 *************** *** 25,38 **** define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Cat_man'] = $file; return; } ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 25,40 ---- define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require( $phpbb_root_path . 'extension.inc' ); ! if ( !empty( $setmodules ) ) { + include_once( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['KB_title']['2_Cat_man'] = $file; return; } ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 52,66 **** if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Cat_man'] = 'modules/mx_kb/admin/' . $file; return; } ! $mx_root_path = './../../../'; ! $module_root_path = "./../"; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); --- 54,73 ---- if ( !empty( $setmodules ) ) { + $mx_root_path = './../'; + $module_root_path = './../modules/mx_kb/'; + require_once( $mx_root_path . 'extension.inc' ); + include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); + $file = basename( __FILE__ ); ! $module['KB_title']['2_Cat_man'] = $module_root_path . 'admin/' . $file; return; } ! $mx_root_path = './../../../'; ! $module_root_path = './../'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); Index: admin_kb_rebuild_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_rebuild_search.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_kb_rebuild_search.php 20 Apr 2005 19:30:17 -0000 1.7 --- admin_kb_rebuild_search.php 1 May 2005 16:39:22 -0000 1.8 *************** *** 21,33 **** define( 'MXBB_MODULE', false ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Optimize tables'] = $file; return; } - $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; - require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 21,35 ---- define( 'MXBB_MODULE', false ); + $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; + require( $phpbb_root_path . 'extension.inc' ); + if ( !empty( $setmodules ) ) { + include_once( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['KB_title']['7_Optimize_tables'] = $file; return; } require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 47,61 **** if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Optimize tables'] = 'modules/mx_kb/admin/' . $file; return; } $mx_root_path = './../../../'; ! $module_root_path = "./../"; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); --- 49,68 ---- if ( !empty( $setmodules ) ) { + $mx_root_path = './../'; + $module_root_path = './../modules/mx_kb/'; + require_once( $mx_root_path . 'extension.inc' ); + include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); + $file = basename( __FILE__ ); ! $module['KB_title']['7_Optimize_tables'] = $module_root_path . 'admin/' . $file; return; } $mx_root_path = './../../../'; ! $module_root_path = './../'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); Index: admin_kb_types.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_types.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin_kb_types.php 20 Apr 2005 19:30:17 -0000 1.12 --- admin_kb_types.php 1 May 2005 16:39:22 -0000 1.13 *************** *** 25,38 **** define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Types_man'] = $file; return; } ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 25,40 ---- define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require( $phpbb_root_path . 'extension.inc' ); ! if ( !empty( $setmodules ) ) { + include_once( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['KB_title']['5_Types_man'] = $file; return; } ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 52,62 **** if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Types_man'] = 'modules/mx_kb/admin/' . $file; return; } $mx_root_path = './../../../'; ! $module_root_path = "./../"; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); --- 54,69 ---- if ( !empty( $setmodules ) ) { + $mx_root_path = './../'; + $module_root_path = './../modules/mx_kb/'; + require_once( $mx_root_path . 'extension.inc' ); + include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); + $file = basename( __FILE__ ); ! $module['KB_title']['5_Types_man'] = $module_root_path . 'admin/' . $file; return; } $mx_root_path = './../../../'; ! $module_root_path = './../'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); Index: admin_kb_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_custom.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_kb_custom.php 20 Apr 2005 19:30:17 -0000 1.7 --- admin_kb_custom.php 1 May 2005 16:39:22 -0000 1.8 *************** *** 17,29 **** define( 'MXBB_MODULE', false ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Custom Field'] = $file; return; } ! ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 17,31 ---- define( 'MXBB_MODULE', false ); + $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; + require( $phpbb_root_path . 'extension.inc' ); + if ( !empty( $setmodules ) ) { + include_once( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['KB_title']['6_Custom_Field'] = $file; return; } ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 43,57 **** if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); ! $module['KB_title']['Custom Field'] = "modules/mx_kb/admin/" . "$file"; return; } $mx_root_path = './../../../'; ! $module_root_path = "./../"; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); --- 45,64 ---- if ( !empty( $setmodules ) ) { + $mx_root_path = './../'; + $module_root_path = './../modules/mx_kb/'; + require_once( $mx_root_path . 'extension.inc' ); + include_once( $module_root_path . 'includes/kb_constants.' . $phpEx ); + $file = basename( __FILE__ ); ! $module['KB_title']['6_Custom_Field'] = $module_root_path . 'admin/' . $file; return; } $mx_root_path = './../../../'; ! $module_root_path = './../'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); |
|
From: Jon O. <jon...@us...> - 2005-05-01 16:38:23
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32584/modules/mx_calsnails Modified Files: mx_calendar_events.php Log Message: minor fix Index: mx_calendar_events.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_events.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_calendar_events.php 17 Mar 2005 12:04:26 -0000 1.7 --- mx_calendar_events.php 1 May 2005 16:38:07 -0000 1.8 *************** *** 213,217 **** $end_date = my_dateformat( $row['eventspan'], $block_datefmt, 1 ); ! $ini_time = trim( my_dateformat( $row['stamp'], 'h:i a' ) ); $subject = my_truncate_words( $row['subject'], 25 ); --- 213,217 ---- $end_date = my_dateformat( $row['eventspan'], $block_datefmt, 1 ); ! $ini_time = trim( my_dateformat( $row['stamp'], $block_datefmt ) ); $subject = my_truncate_words( $row['subject'], 25 ); |
|
From: Jon O. <jon...@us...> - 2005-05-01 16:37:06
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31815/modules/mx_coreblocks Removed Files: mx_dynamic.php mx_multiple_blocks.php Log Message: not needed anymore --- mx_dynamic.php DELETED --- --- mx_multiple_blocks.php DELETED --- |
|
From: Jon O. <jon...@us...> - 2005-05-01 16:14:13
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17941 Modified Files: common.php index.php Log Message: merging new cache :-) Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** common.php 25 Apr 2005 12:18:43 -0000 1.33 --- common.php 1 May 2005 16:13:59 -0000 1.34 *************** *** 27,31 **** define('IN_PHPBB', 1); - // ================================================================================ // The following code is based on common.php from phpBB 2.0.14 --- 27,30 ---- *************** *** 234,238 **** ! // // Obtain and encode users IP // --- 233,240 ---- ! // instatiate the mx_cache class ! ! $mx_cache = new mx_cache(); ! // Obtain and encode users IP // Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** index.php 25 Apr 2005 23:56:07 -0000 1.36 --- index.php 1 May 2005 16:14:00 -0000 1.37 *************** *** 23,29 **** //define('MX_DEBUG', 1); ! define('IN_PORTAL', 1); ! $mx_root_path = './'; include($mx_root_path . 'extension.inc'); --- 23,29 ---- //define('MX_DEBUG', 1); ! define( 'IN_PORTAL', 1 ); ! $mx_root_path = "./"; include($mx_root_path . 'extension.inc'); *************** *** 35,38 **** --- 35,39 ---- // Page selector // + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); *************** *** 40,46 **** // Start session management // ! $userdata = session_pagestart($user_ip, (MX_PORTAL_PAGES_OFFSET - $page_id)); mx_init_userprefs($userdata); if ( $mx_request_vars->is_request('mx_copy') ) --- 41,51 ---- // Start session management // ! ! $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); mx_init_userprefs($userdata); + // + // End session management + // if ( $mx_request_vars->is_request('mx_copy') ) *************** *** 50,99 **** // ! // Load page vars ! // Load http_session variables if populated, else consult db and populate http_session // ! $mx_session_time = isset($HTTP_SESSION_VARS['mx_session_recached']) ? $HTTP_SESSION_VARS['mx_session_recached'] : $userdata['session_start']; ! if ( empty($HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]) || $portal_config['portal_recached'] > $mx_session_time ) ! { ! $HTTP_SESSION_VARS['mx_session_recached'] = $portal_config['portal_recached']; ! if ( defined('MX_DEBUG') ) ! { ! echo('populating page block http_session'); ! } ! // Populate all mx_pages session vars, for faster navigation ! get_page_session(); ! } // ! // Now use the session data // ! $page_row = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['page_info']; ! ! $block_rows = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks']; ! $total_block = count($block_rows); ! ! $column_rows = $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['columns']; ! $total_column = count($column_rows); ! ! $page_title .= $page_row['page_name']; ! $page_icon = $page_row['page_icon']; ! $page_ov_header = $page_row['page_header']; // // Page auth // - $is_auth_ary = page_auth(AUTH_VIEW, $userdata, $page_row['page_auth_view'], $page_row['page_auth_view_group']); ! if( !$is_auth_ary['auth_view'] ) { ! if( $userdata['session_logged_in'] ) ! { ! $message = empty($lang['Page_Not_Authorised']) ? "Sorry, but you don't have privilege to access this page." : $lang['Page_Not_Authorised']; ! mx_message_die(GENERAL_MESSAGE, $message); ! } ! else ! { ! mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true)); ! } } --- 55,86 ---- // ! // Load page and block classes // ! ! $mx_page = new mx_page(); ! $mx_page->init( $page_id ); ! ! $mx_block = new mx_block(); // ! // ...and define some basic vars // ! ! $page_title .= $mx_page->info['page_name']; ! $page_icon = $mx_page->info['page_icon']; ! $page_ov_header = $mx_page->info['page_header']; // // Page auth // ! if ( !$mx_page->auth_view && $userdata['session_logged_in'] ) { ! $message = empty( $lang['Page_Not_Authorised'] ) ? "Sorry, but you don't have privilege to access this page." : $lang['Page_Not_Authorised']; ! mx_message_die(GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, ''); ! } ! elseif ( !$mx_page->auth_view && !$userdata['session_logged_in'] ) ! { ! mx_redirect( append_sid( $mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true ) ); } *************** *** 101,110 **** // Output header // ! include($mx_root_path . 'includes/page_header.' . $phpEx); // // Initialize template // ! $layouttemplate = new mx_Template($template->root); $layouttemplate->set_filenames(array( --- 88,99 ---- // Output header // ! ! include( $mx_root_path . 'includes/page_header.' . $phpEx ); // // Initialize template // ! ! $layouttemplate = new mx_Template( $template->root, $board_config, $db ); $layouttemplate->set_filenames(array( *************** *** 115,363 **** // Generate the fold/unfold menu navigation switches (cookie based) // if ( !empty($HTTP_COOKIE_VARS['phpbbEdit_Blocks']) ) { ! $mx_show_edit_blocks_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; } elseif ( $userdata['user_level'] == ADMIN ) { ! $mx_show_edit_blocks_on = true; } else { ! $mx_show_edit_blocks_on = false; } - $mx_show_edit_blocks_icon = false; // Start output of page --------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------ // ! // Page columns // - for( $column = 0; $column < $total_column; $column++ ) - { - $block_size = $column_rows[$column]['column_size']; - // Send optional column class - - if ( $total_column == 1 ) - { - $colclass = 'middlecol'; - } - else - { - switch( $column ) - { - case 0: - $colclass = 'leftcol'; - break; - case 1: - $colclass = 'middlecol'; - break; - case 2: - $colclass = 'rightcol'; - break; - } - } // // Pass column data // ! $layouttemplate->assign_block_vars('layout_column', array( ! 'COL_CLASS' => $colclass, ! 'BLOCK_SIZE' => $block_size ! )); ! $column_contents = array(); ! // ! // Page blocks // ! for( $block = 0; $block < $total_block; $block++ ) { // ! // Validate this block is really visible and exists for the column // - if ( $column_rows[$column]['column_id'] != $block_rows[$block]['column_id'] ) - { - continue; - } - - $block_id = $mx_block_id = $block_rows[$block]['block_id']; - $block_file = $block_rows[$block]['function_file']; - $dynamic_main_block_id = ''; - - // Block view auth ----------------------------------------------------------------------------------------------------- - - $is_auth_ary = block_auth(AUTH_VIEW, $mx_block_id, $userdata, $block_rows[$block]['auth_view'], $block_rows[$block]['auth_view_group']); ! if ( ($is_auth_ary['auth_view'] && $block_rows[$block]['show_block'] == 1) || $is_auth_ary['auth_mod'] ) ! { ! //$layouttemplate->assign_block_vars('layoutcol', array()); ! $template = new mx_Template($template->root, $board_config, $db); ! ! $module_root_path = $block_rows[$block]['module_path']; ! ! $title_class = ( $block_rows[$block]['function_file'] != 'mx_multiple_blocks.php' ? 'mxthHead' : 'mxthHead_none' ); ! ! ob_start(); ! include($module_root_path . $block_file); ! $column_contents[$column] = ob_get_contents(); ! ob_end_clean(); // ! // Pass block data // ! if ( $block_rows[$block]['show_block'] == 1 || $is_auth_ary['auth_mod'] ) { ! $layouttemplate->assign_block_vars('layout_column.blocks', array( ! 'BLOCK' => $column_contents[$column], ! 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ) ! )); ! // ! // Switch: graphical block borders // ! if ( !empty($page_row['page_graph_border']) ) { ! if ( file_exists($mx_root_path . TEMPLATE_ROOT_PATH . 'images/' . $page_row['page_graph_border'] . '1-1.gif') ) { ! $layouttemplate->assign_block_vars('layout_column.blocks.graph_border', array( ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'PREFIX' => $page_row['page_graph_border'] ! )); } } ! ! if ( $block_rows[$block]['show_stats'] == 1 && !empty($block_rows[$block]['block_time']) && !empty($block_rows[$block]['block_editor_id']) ) { ! $editor_name_tmp = get_userdata($block_rows[$block]['block_editor_id']); ! $editor_name = $editor_name_tmp['username']; ! $edit_time = create_date($board_config['default_dateformat'], $block_rows[$block]['block_time'], $board_config['board_timezone']); ! ! $layouttemplate->assign_block_vars('layout_column.blocks.block_stats', array( ! 'L_BLOCK_UPDATED' => $lang['Block_updated_by'], ! 'EDITOR_NAME' => $editor_name, ! 'EDIT_TIME' => $edit_time ! )); ! } ! else { ! $layouttemplate->assign_block_vars('layout_column.blocks.no_stats', array()); } ! } ! } // End View auth ! ! // Block edit auth --------------------------------------------------------------------------------- ! $mx_block_edit = false; ! ! $is_auth_ary = block_auth(AUTH_EDIT, $mx_block_id, $userdata, $block_rows[$block]['auth_edit'], $block_rows[$block]['auth_edit_group']); ! ! if ( ( ($is_auth_ary['auth_edit'] && $block_rows[$block]['show_block'] == 1 ) || $is_auth_ary['auth_mod']) ) ! { ! $mx_show_edit_blocks_icon = true; ! $mx_block_edit = true; ! ! // Define some hidden Edit Block parameters ! $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="mode" value="setting" />'; ! $s_hidden_fields .= '<input type="hidden" name="f" value="' . intval($HTTP_GET_VARS['f']) . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="t" value="' . intval($HTTP_GET_VARS['t']) . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="p" value="' . intval($HTTP_GET_VARS['p']) . '" />'; ! ! // ! // Switch between different block types ! // ! $block_edit_img = ( ( $block_file == 'mx_multiple_blocks.php' ) ? 'block_edit_split.gif' : ( $block_file == 'mx_textblock_blog.php' ? 'block_edit_admin.gif' : 'block_edit.gif' ) ) ; ! $split_admin_file = !empty($block_rows[$block]['function_admin']) ? $block_rows[$block]['function_admin'] : 'admin/admin_mx_block.php'; ! ! // ! // Dynamic Block Itself ! // ! if ( !empty($dynamic_main_block_id) ) ! { ! $is_dynamic_auth_ary = block_auth(AUTH_EDIT, $dynamic_main_block_id , $userdata, $dynamic_block_config[$dynamic_main_block_id]['auth_edit'], $dynamic_block_config[$dynamic_main_block_id]['auth_edit_group']); ! ! if ( ($is_dynamic_auth_ary['auth_edit'] || $is_dynamic_auth_ary['auth_mod']) ) ! { ! $block_desc = !empty($dynamic_block_config[$dynamic_main_block_id]['block_desc']) ? ' (' . $dynamic_block_config[$dynamic_main_block_id]['block_desc'] . ')' : ''; ! $edit_url = append_sid($mx_root_path . "admin/admin_mx_block.php?sid=" . $userdata['session_id']); ! ! $edit_img = '<input type="image" class ="editblock" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . 'block_edit_admin.gif' . '" alt="' . $lang['Block_Edit'] . $block_rows[$block]['block_id'] . '" title="' . $lang['Block_Edit'] . ' :: ' . $dynamic_block_config[$dynamic_main_block_id]['block_title'] . $block_desc . '">'; ! ! $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $dynamic_main_block_id . '" />'; ! $layouttemplate->assign_block_vars('layout_column.blocks.edit', array( ! 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), ! 'L_TITLE' => $title, ! 'L_DESC' => $b_description, ! 'EDIT_ACTION' => $edit_url, ! 'EDIT_IMG' => $edit_img, ! 'TITLECLASS' => $title_class, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields )); ! ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $mx_show_edit_blocks_on ? 'on' : 'off' ), array()); } - } - - $block_desc = !empty($block_rows[$block]['block_desc']) ? ' (' . $block_rows[$block]['block_desc'] . ')' : ''; - $edit_url = append_sid($mx_root_path . $split_admin_file . "?sid=" . $userdata['session_id']); - $edit_img = '<input type="image" class ="editblock" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/' . $block_edit_img . '" alt="' . $lang['Block_Edit'] . ' :: ' . $block_rows[$block]['block_title'] . $block_desc . '" title="' . $lang['Block_Edit'] . ' :: ' . $block_rows[$block]['block_title'] . $block_desc . '">'; - - $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $mx_block_id . '" />'; - - $layouttemplate->assign_block_vars('layout_column.blocks.edit', array( - 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), - 'L_TITLE' => $title, - 'L_DESC' => $b_description, - 'EDIT_ACTION' => $edit_url, - 'EDIT_IMG' => $edit_img, - 'TITLECLASS' => $title_class, - 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields - )); - - // - // Is the Block hidden ? - // - if ( $block_rows[$block]['show_block'] == 0 ) - { - $hidden_img = '<img src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/block_icons/block_hidden.gif" alt="' . $lang['Hidden_block'] . '">'; - $layouttemplate->assign_block_vars('layout_column.blocks.edit.hidden_block', array( - 'HIDDEN_BLOCK' => $hidden_img - )); - } // ! // Switch: Edit Block // ! $layouttemplate->assign_block_vars('layout_column.blocks.edit.switch_edit_' . ( $mx_show_edit_blocks_on ? 'on' : 'off' ), array()); ! ! } // End Edit auth ! ! // Switch: show block header ------------------- ! if ( $block_rows[$block]['show_block'] == 1 && ( $mx_block_edit || $block_rows[$block]['show_title'] == 1 ) || $is_auth_ary['auth_mod'] ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); ! ! // Switch: show title ------------------- ! if ( $block_rows[$block]['show_title'] == 1 || $is_auth_ary['auth_mod'] ) { ! $this_block_title = $block_rows[$block]['show_title'] == 0 && $is_auth_ary['auth_mod'] ? '(' . $block_rows[$block]['block_title'] . ')' : $block_rows[$block]['block_title']; ! $layouttemplate->assign_block_vars('layout_column.blocks.show_title', array( ! 'L_TITLE' => $this_block_title, ! 'TITLECLASS' => $title_class ! )); } } ! } // for ... blocks ! } // for ... column // Output page $layouttemplate->pparse('mx_main_layout'); // Output footer include($mx_root_path . 'includes/page_tail.' . $phpEx); --- 104,362 ---- // Generate the fold/unfold menu navigation switches (cookie based) // + if ( !empty($HTTP_COOKIE_VARS['phpbbEdit_Blocks']) ) { ! $edit_on = $HTTP_COOKIE_VARS['phpbbEdit_Blocks']; } elseif ( $userdata['user_level'] == ADMIN ) { ! $edit_on = true; } else { ! $edit_on = false; } + // // Start output of page --------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------ + // // ! // Page columns - loop through each column // + for( $column = 0; $column < $mx_page->total_column; $column++ ) + { // // Pass column data // ! ! $mx_page->output_column( $column ); ! // ! // Column blocks - loop through column blocks // ! ! $column_contents = array(); ! ! for( $block = 0; $block < $mx_page->total_block; $block++ ) { // ! // Validate this block is visible and exists for the column // ! if ( $mx_page->columns[$column]['column_id'] == $mx_page->blocks[$block]['column_id'] ) ! { ! ! $block_id = $mx_block_id = $mx_page->blocks[$block]['block_id']; ! $mx_block->init( $block_id ); ! ! // ! // Toggle mode: default, dynamic, sub ! // ! ! if ( $mx_block->is_dynamic ) ! { ! $mx_dynamic_block = new mx_block(); ! $mx_dynamic_block = $mx_block; ! ! $block_id = $mx_block->dynamic_block_id; ! $mx_block->init( $block_id ); ! } + if ( $mx_block->is_sub ) + { + $total_subs = $mx_block->total_subs; + + $mx_parent_block = new mx_block(); + $mx_parent_block = $mx_block; + + } + else + { + $total_subs = 1; + } + // ! // Additional loop for subblocks - split block // ! ! for( $subblock = 0; $subblock < $total_subs; $subblock++ ) { ! if ( $mx_parent_block->is_sub ) ! { ! $block_id = intval( $mx_parent_block->sub_block_ids[$subblock] ); ! $mx_block->init( $block_id ); ! } ! // ! // View Auth ------------------------------------------------------------------------------- START // ! ! if ( ( $mx_block->auth_view && $mx_block->show_block ) || $mx_block->auth_mod ) { ! $template = new mx_Template($template->root, $board_config, $db); ! ! // ! // Define $module_root_path, to be used within blocks ! // ! ! $module_root_path = $mx_block->module_root_path; ! ! // ! // Include block file and cache output ! // ! ! ob_start(); ! include($module_root_path . $mx_block->block_file); ! $column_contents[$column] = ob_get_contents(); ! ob_end_clean(); ! ! // ! // Pass block data ! // ! ! if ( $mx_block->show_block || $mx_block->auth_mod ) { ! // ! // Output Block contents ! // ! ! $mx_block->output( $column_contents[$column] ); ! ! // ! // Switch: Block border graphics? ! // ! ! if ( $mx_page->block_border_graphics ) ! { ! $mx_block->output_border_graphics(); ! } ! ! // ! // Output Block stats ! // ! ! $mx_block->output_stats(); } } ! ! // ! // View Auth --------------------------------------------------------------------------------- END ! // ! ! // ! // Edit Auth --------------------------------------------------------------------------------- START ! // ! ! if ( ( ( $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ) ) { ! // ! // Now use the editCP on/off switch ! // ! ! $mx_page->show_editcp_switch(); ! ! // ! // Output editcp controls/buttons ! // ! ! if ( $mx_dynamic_block->dynamic_block_id > 0 ) ! { ! $mx_dynamic_block->output_cp( $edit_on ); ! } ! ! $mx_block->output_cp( $edit_on ); ! ! // ! // Is the Block hidden ? Output 'hidden' indicator ! // ! ! if ( !$mx_block->show_block ) ! { ! $mx_block->output_hidden_indicator(); ! } ! } ! ! // ! // Edit Auth ----------------------------------------------------------------------------------- END ! // ! ! // ! // Block header -------------------------------------------------------------------------------- START ! // ! ! if ( $mx_block->show_block && ( $mx_page->editcp_switch || $mx_block->show_title ) || $mx_block->auth_mod ) { ! $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); ! ! // ! // Switch: show title ------------------- ! // ! ! if ( $mx_block->show_title || $mx_block->auth_mod ) ! { ! $mx_block->output_title(); ! } } ! ! // ! // Block header ---------------------------------------------------------------------------------- END ! // ! ! // ! // Output some subblock wrappers ! // ! if ( $mx_parent_block->is_sub ) ! { ! if ( $subblock == 0 ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.sub_start', array()); ! $inner_space = ''; ! } ! else ! { ! $inner_space = '<td width="'.$mx_parent_block->sub_inner_space.'"> </td>'; ! } ! ! $layouttemplate->assign_block_vars('layout_column.blocks.sub_col', array( ! 'INNER_SPACE' => $inner_space, ! 'BLOCK_SIZE' => $mx_parent_block->sub_block_sizes[$subblock] )); ! ! if ( intval($subblock + 1) == $total_subs ) ! { ! $layouttemplate->assign_block_vars('layout_column.blocks.sub_end', array()); ! } } + + } // for ... subblocks + // ! // Destroy parent block data // ! ! if ( $mx_parent_block->is_sub ) { ! $mx_parent_block->erase(); } } ! } // for ... blocks ! } // for ... column + // // Output page + // $layouttemplate->pparse('mx_main_layout'); + // // Output footer + // include($mx_root_path . 'includes/page_tail.' . $phpEx); |
|
From: Jon O. <jon...@us...> - 2005-05-01 16:07:18
|
Update of /cvsroot/mxbb/core/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14294/templates/subSilver Modified Files: mx_main_layout.tpl Log Message: update for new cache - supports sub blocks Index: mx_main_layout.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/mx_main_layout.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_main_layout.tpl 19 Apr 2005 18:08:59 -0000 1.1 --- mx_main_layout.tpl 1 May 2005 16:07:10 -0000 1.2 *************** *** 3,13 **** <tr valign="top"> <!-- BEGIN layout_column --> ! <td class="{layout_column.COL_CLASS}" width="{layout_column.BLOCK_SIZE}"> ! <!-- BEGIN blocks --> ! <table width="100%" cellpadding="0" cellspacing="0" border="0" class="mx_graphborder"> <tr> <td> <!-- BEGIN graph_border --> <table width="100%" cellpadding="0" cellspacing="0" border="0"> --- 3,24 ---- <tr valign="top"> <!-- BEGIN layout_column --> ! <td class="{layout_column.COL_CLASS}" width="{layout_column.BLOCK_SIZE}"> ! <!-- BEGIN blocks --> ! ! <!-- BEGIN sub_start --> ! <table border="0" cellspacing="0" cellpadding="0" width="{layout_column.BLOCK_SIZE}"> ! <tr valign="top"> ! <!-- END sub_start --> ! ! <!-- BEGIN sub_col --> ! {layout_column.blocks.sub_col.INNER_SPACE} ! <td class="{layout_column.blocks.sub_col.COL_CLASS}" width="{layout_column.blocks.sub_col.BLOCK_SIZE}"> ! <!-- END sub_col --> ! <table width="100%" cellpadding="0" cellspacing="0" border="0" class="mx_graphborder"> <tr> <td> + <!-- BEGIN graph_border --> <table width="100%" cellpadding="0" cellspacing="0" border="0"> *************** *** 28,32 **** <!-- BEGIN show_title --> ! <th class="{layout_column.blocks.show_title.TITLECLASS}" align="left" width="100%"> {layout_column.blocks.show_title.L_TITLE} </th> --- 39,43 ---- <!-- BEGIN show_title --> ! <th class="{layout_column.blocks.show_title.TITLECLASS}" align="left" width="99%"> {layout_column.blocks.show_title.L_TITLE} </th> *************** *** 34,38 **** <!-- BEGIN edit --> ! <th class="{layout_column.blocks.edit.TITLECLASS}" align="right" > <form action="{layout_column.blocks.edit.EDIT_ACTION}" method="post" class="mx_editform"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> --- 45,49 ---- <!-- BEGIN edit --> ! <th class="{layout_column.blocks.edit.TITLECLASS}" align="right" width="1"> <form action="{layout_column.blocks.edit.EDIT_ACTION}" method="post" class="mx_editform"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> *************** *** 86,101 **** </table> ! <!-- BEGIN block_stats --> ! <div align="right"><span class="copyright">{layout_column.blocks.block_stats.L_BLOCK_UPDATED}{layout_column.blocks.block_stats.EDITOR_NAME} ({layout_column.blocks.block_stats.EDIT_TIME})</span></div> ! <br clear="all" /> ! <!-- END block_stats --> ! <!-- BEGIN no_stats --> ! <br clear="all" /> ! <!-- END no_stats --> ! <!-- END blocks --> ! </td> <!-- END layout_column --> </tr> --- 97,120 ---- </table> ! <!-- BEGIN block_stats --> ! <div align="right"><span class="copyright">{layout_column.blocks.block_stats.L_BLOCK_UPDATED}{layout_column.blocks.block_stats.EDITOR_NAME} ({layout_column.blocks.block_stats.EDIT_TIME})</span></div> ! <br clear="all" /> ! <!-- END block_stats --> ! <!-- BEGIN no_stats --> ! <br clear="all" /> ! <!-- END no_stats --> ! <!-- BEGIN sub_col --> ! </td> ! <!-- END sub_col --> ! <!-- BEGIN sub_end --> ! </tr></table> ! <!-- END sub_end --> ! ! <!-- END blocks --> ! ! </td> <!-- END layout_column --> </tr> |
|
From: Jon O. <jon...@us...> - 2005-05-01 16:02:24
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11569/includes Modified Files: mx_auth.php mx_cache.php mx_functions.php page_tail.php Log Message: merging rewrites for new cache... Index: mx_cache.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_cache.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_cache.php 25 Apr 2005 01:27:20 -0000 1.4 --- mx_cache.php 1 May 2005 16:02:12 -0000 1.5 *************** *** 13,17 **** */ ! /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by --- 13,17 ---- */ ! /** * This program is free software; you can redistribute it and/or modify [...1606 lines suppressed...] ! } // class mx_page ! // ! // ------------------------------------------------------------------------------------------------------------- ! // For compatibility with old block calls ! // ! function read_block_config( $block_id, $cache = true ) ! { ! global $mx_cache, $mx_block, $block_config; ! ! if ( empty( $mx_block->block_config[$block_id] ) ) ! { ! return $mx_cache->read( $block_id, MX_BLOCK, !$cache ); } ! ! return $mx_block->block_config; } Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** page_tail.php 25 Apr 2005 22:04:49 -0000 1.15 --- page_tail.php 1 May 2005 16:02:13 -0000 1.16 *************** *** 39,43 **** // Generate the fold/unfold categories switches // ! if ( $mx_show_edit_blocks_icon ) { $template->assign_block_vars('switch_edit_' . ( $mx_show_edit_blocks_on ? 'on' : 'off' ), array()); --- 39,43 ---- // Generate the fold/unfold categories switches // ! if ( $mx_page->editcp_switch ) { $template->assign_block_vars('switch_edit_' . ( $mx_show_edit_blocks_on ? 'on' : 'off' ), array()); *************** *** 111,117 **** echo pack('V', $gzip_size); } - //echo( '<br><br>'.var_export($_SESSION['mx_config']) ); - //echo( '<br><br>'.var_export($_SESSION['mx_pages']) ); - //echo( '<br><br>'.var_export($_SESSION) ); exit; --- 111,114 ---- Index: mx_auth.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_auth.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_auth.php 25 Apr 2005 20:55:06 -0000 1.8 --- mx_auth.php 1 May 2005 16:02:12 -0000 1.9 *************** *** 151,160 **** case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group($value_groups) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group($f_access_group['auth_moderator_group']) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; --- 151,160 ---- case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($value_groups) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($f_access_group['auth_moderator_group']) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; *************** *** 173,178 **** // // Is user a moderator? ! // ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group($f_access_group['auth_moderator_group']) || $is_admin : 0; return $auth_user; --- 173,177 ---- // // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($f_access_group['auth_moderator_group']) || $is_admin : 0; return $auth_user; *************** *** 220,230 **** break; ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group($value_groups) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group($f_access_group['auth_moderator_group']) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; --- 219,229 ---- break; ! case AUTH_ACL: // PRIVATE ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($value_groups) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($f_access_group['auth_moderator_group']) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; *************** *** 243,248 **** // // Is user a moderator? ! // ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group($f_access_group['auth_moderator_group']) || $is_admin : 0; return $auth_user; --- 242,246 ---- // // Is user a moderator? ! $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($f_access_group['auth_moderator_group']) || $is_admin : 0; return $auth_user; *************** *** 314,323 **** case AUTH_ACL: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group($f_access_group) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_auth_group($f_access_group) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; --- 312,321 ---- case AUTH_ACL: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($f_access_group) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($f_access_group) || $is_admin : 0; $auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; *************** *** 336,341 **** // // Is user a moderator? ! // ! // $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_auth_group($f_access_group) || $is_admin : 0; return $auth_user; --- 334,338 ---- // // Is user a moderator? ! // $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member($f_access_group) || $is_admin : 0; return $auth_user; *************** *** 401,405 **** | Also, adds all usergroups to userdata array \********************************************************************************/ ! function mx_auth_group($group_ids = '', $group_mod_mode = false) { global $userdata, $db; --- 398,402 ---- | Also, adds all usergroups to userdata array \********************************************************************************/ ! function mx_is_group_member($group_ids = '', $group_mod_mode = false) { global $userdata, $db; Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** mx_functions.php 29 Apr 2005 21:30:58 -0000 1.42 --- mx_functions.php 1 May 2005 16:02:12 -0000 1.43 *************** *** 1295,1297 **** --- 1295,1299 ---- } // class mx_request_vars + + ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-05-01 15:41:15
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv857/admin Modified Files: admin_mx_gen_cache.php index.php pagestart.php Log Message: merging with my latest cache rewrites hey? should session_start be removed from gen_cache? Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/pagestart.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pagestart.php 28 Apr 2005 04:13:50 -0000 1.11 --- pagestart.php 1 May 2005 15:41:06 -0000 1.12 *************** *** 54,68 **** // Security - used for block_edits // ! $block_id = $mx_request_vars->post('block_id', MX_TYPE_INT, 0); ! $block_config = read_block_config($block_id, false); ! $block_edit_auth = block_auth(AUTH_EDIT, $block_id, $userdata, $block_config[$block_id]['auth_edit'], $block_config[$block_id]['auth_edit_group']); ! if( !$userdata['session_logged_in'] ) { mx_redirect(append_sid("login.php?redirect=admin/index.$phpEx", true)); } ! if( !($userdata['user_level'] == ADMIN || $block_edit_auth['auth_edit']) ) { mx_message_die(GENERAL_MESSAGE, $lang['Not_admin']); --- 54,77 ---- // Security - used for block_edits // ! $block_id = $mx_request_vars->post('block_id', MX_TYPE_INT, '0'); ! if ( !empty( $block_id ) ) ! { ! $block_config = read_block_config( $block_id, false ); ! $block_edit_auth = array(); ! $block_edit_auth = block_auth( AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); ! } ! else ! { ! $block_edit_auth['auth_edit'] = false; ! } ! ! if ( !$userdata['session_logged_in'] ) { mx_redirect(append_sid("login.php?redirect=admin/index.$phpEx", true)); } ! if ( !($userdata['user_level'] == ADMIN || $block_edit_auth['auth_edit'] ) ) { mx_message_die(GENERAL_MESSAGE, $lang['Not_admin']); Index: admin_mx_gen_cache.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_gen_cache.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** admin_mx_gen_cache.php 28 Apr 2005 04:13:49 -0000 1.16 --- admin_mx_gen_cache.php 1 May 2005 15:41:06 -0000 1.17 *************** *** 60,134 **** else { ! $HTTP_SESSION_VARS['cache_read'] = false; ! $cache_dir = $mx_root_path . 'cache/'; ! ! @mkdir($cache_dir, 0777); ! @chmod($cache_dir, 0777); ! ! if( !is_writable($cache_dir) ) ! { ! $message = $lang['Cache_dir_write_protect']; ! mx_message_die(GENERAL_MESSAGE, $message); ! } ! ! /* ! // Generate block data ! $sql = "SELECT blk.block_id ! , blk.block_title ! , blk.block_desc ! , blk.show_block ! , blk.show_title ! , blk.show_stats ! , blk.block_time ! , blk.block_editor_id ! , blk.function_id ! , blk.auth_view ! , blk.auth_edit ! , blk.auth_delete ! , blk.auth_view_group ! , blk.auth_edit_group ! , blk.auth_delete_group ! , blk.auth_moderator_group ! FROM " . BLOCK_TABLE . " blk"; ! ! db2xml($sql, $cache_dir . 'block_config.xml'); ! */ ! ! // Generate block parameter data ! $sql = "SELECT sys.parameter_id, ! sys.block_id, ! par.parameter_name, ! sys.parameter_value, ! sys.bbcode_uid ! FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, ! " . PARAMETER_TABLE . " par ! WHERE sys.parameter_id = par.parameter_id ! ORDER BY sys.block_id, sys.parameter_id"; ! ! db2xml_all($sql, $cache_dir . 'block_'); ! ! /* ! // Generate page_blocks data ! $sql = "SELECT col.page_id, pag.page_name, pag.page_icon, pag.page_header, pag.page_graph_border, pag.auth_view AS pag_auth_view, pag.auth_view_group AS pag_auth_view_group, pag.auth_moderator_group AS pag_auth_moderator_group, bct.column_id, col.column_title, col.column_order, col.column_size, blk.block_id, blk.auth_view, blk.auth_view_group, blk.auth_edit, blk.auth_edit_group, blk.show_block, blk.show_title, blk.show_stats, blk.block_time, blk.block_editor_id, bct.column_id AS block_col_id, module_path, function_file, function_admin ! FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . BLOCK_TABLE . " blk, ! " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col ! WHERE blk.function_id = fnc.function_id ! AND pag.page_id = col.page_id ! AND blk.block_id = bct.block_id ! AND fnc.module_id = mdl.module_id ! AND bct.column_id = col.column_id ! ORDER BY col.page_id, column_id, column_order, block_order"; ! ! db2xml($sql, $cache_dir . 'page_config.xml'); ! */ ! // ! // Update cache ! // ! update_session_cache($block_id); $message = $lang['Cache_generate']; --- 60,67 ---- else { ! // @session_start(); ??? Markus, should this be removed?? ! // Update mxBB cache ! $mx_cache->update( ); $message = $lang['Cache_generate']; Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.php 28 Apr 2005 04:15:13 -0000 1.7 --- index.php 1 May 2005 15:41:06 -0000 1.8 *************** *** 58,62 **** function read_admin($dir_module) { ! global $phpEx, $template; $module = array(); --- 58,62 ---- function read_admin($dir_module) { ! global $phpEx, $template, $lang; $module = array(); |
|
From: Markus P. <mar...@us...> - 2005-04-29 21:31:07
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18728 Modified Files: mx_functions.php Log Message: Added constant in mx_session_start to force disabling Gzip, which is a must for instance to the download module in pafiledb. if ( $board_config['gzip_compress'] && !defined('MX_GZIP_DISABLED') ) Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** mx_functions.php 25 Apr 2005 23:56:08 -0000 1.41 --- mx_functions.php 29 Apr 2005 21:30:58 -0000 1.42 *************** *** 560,564 **** // $do_gzip_compress = FALSE; ! if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); --- 560,564 ---- // $do_gzip_compress = FALSE; ! if ( $board_config['gzip_compress'] && !defined('MX_GZIP_DISABLED') ) { $phpver = phpversion(); |
|
From: Markus P. <mar...@us...> - 2005-04-29 17:36:52
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13258 Modified Files: admin_mx_block.php Log Message: Fix paths (broken by myself, oops a couple of commits back) in block admin. Index: admin_mx_block.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_block.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** admin_mx_block.php 28 Apr 2005 04:13:49 -0000 1.26 --- admin_mx_block.php 29 Apr 2005 17:36:44 -0000 1.27 *************** *** 151,155 **** { $l_setting = $lang['Settings']; ! $u_setting = append_sid(PORTAL_URL . $block_rows[$j]['function_admin'] . "?block_id=$block_id"); } else --- 151,155 ---- { $l_setting = $lang['Settings']; ! $u_setting = append_sid(PORTAL_URL . 'admin/' . $block_rows[$j]['function_admin'] . "?block_id=$block_id"); } else *************** *** 170,174 **** { $l_setting = $lang['Settings']; ! $u_setting = append_sid(PORTAL_URL . "admin_mx_block.$phpEx?mode=setting&block_id=$block_id"); } } --- 170,174 ---- { $l_setting = $lang['Settings']; ! $u_setting = append_sid(PORTAL_URL . "admin/admin_mx_block.$phpEx?mode=setting&block_id=$block_id"); } } *************** *** 178,184 **** 'BLOCK_TITLE' => $block_rows[$j]['block_title'], 'BLOCK_DESC' => ( $block_rows[$j]['block_desc'] != '' ) ? ' - ' . $block_rows[$j]['block_desc'] : '', ! 'U_BLOCK_EDIT' => append_sid(PORTAL_URL . "admin_mx_block.$phpEx?mode=edit_block&block_id=$block_id"), 'U_BLOCK_SETTING' => $u_setting, ! 'U_BLOCK_DELETE' => append_sid(PORTAL_URL . "admin_mx_block.$phpEx?mode=delete_block&block_id=$block_id") )); --- 178,184 ---- 'BLOCK_TITLE' => $block_rows[$j]['block_title'], 'BLOCK_DESC' => ( $block_rows[$j]['block_desc'] != '' ) ? ' - ' . $block_rows[$j]['block_desc'] : '', ! 'U_BLOCK_EDIT' => append_sid(PORTAL_URL . "admin/admin_mx_block.$phpEx?mode=edit_block&block_id=$block_id"), 'U_BLOCK_SETTING' => $u_setting, ! 'U_BLOCK_DELETE' => append_sid(PORTAL_URL . "admin/admin_mx_block.$phpEx?mode=delete_block&block_id=$block_id") )); *************** *** 188,192 **** 'MODULE_TITLE' => $block_rows[$j]['module_name'], 'MODULE_DESC' => ( $block_rows[$j]['module_desc'] != '' ) ? ' - ' . $block_rows[$j]['module_desc'] : '', ! 'U_MODULE_EDIT' => append_sid(PORTAL_URL . "admin_mx_module.$phpEx?mode=edit&id=" . $block_rows[$j]['module_id']) )); } --- 188,192 ---- 'MODULE_TITLE' => $block_rows[$j]['module_name'], 'MODULE_DESC' => ( $block_rows[$j]['module_desc'] != '' ) ? ' - ' . $block_rows[$j]['module_desc'] : '', ! 'U_MODULE_EDIT' => append_sid(PORTAL_URL . "admin/admin_mx_module.$phpEx?mode=edit&id=" . $block_rows[$j]['module_id']) )); } *************** *** 197,201 **** 'FUNCTION_TITLE' => $block_rows[$j]['function_name'], 'FUNCTION_DESC' => ( $block_rows[$j]['function_desc'] != '' ) ? ' - ' . $block_rows[$j]['function_desc'] : '', ! 'U_FUNCTION_EDIT' => append_sid(PORTAL_URL . "admin_mx_module.$phpEx?mode=edit_func&id=" . $block_rows[$j]['function_id']) )); } --- 197,201 ---- 'FUNCTION_TITLE' => $block_rows[$j]['function_name'], 'FUNCTION_DESC' => ( $block_rows[$j]['function_desc'] != '' ) ? ' - ' . $block_rows[$j]['function_desc'] : '', ! 'U_FUNCTION_EDIT' => append_sid(PORTAL_URL . "admin/admin_mx_module.$phpEx?mode=edit_func&id=" . $block_rows[$j]['function_id']) )); } |
|
From: Markus P. <mar...@us...> - 2005-04-28 22:42:09
|
Update of /cvsroot/mxbb/core/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4775 Modified Files: overall_header.tpl Log Message: Added onfocus/onblur effects to the search box in overall header. Index: overall_header.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/overall_header.tpl,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** overall_header.tpl 26 Apr 2005 00:08:17 -0000 1.18 --- overall_header.tpl 28 Apr 2005 22:41:50 -0000 1.19 *************** *** 22,26 **** <!-- BEGIN switch_enable_pm_popup --> <script language="javascript" type="text/javascript"><!-- ! if ( {PRIVATE_MESSAGE_NEW_FLAG} ) { window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400'); --- 22,26 ---- <!-- BEGIN switch_enable_pm_popup --> <script language="javascript" type="text/javascript"><!-- ! if( {PRIVATE_MESSAGE_NEW_FLAG} ) { window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400'); *************** *** 169,174 **** <td valign="top" align="right" width="100%" height="5" > <form name="search_block" method="post" action="{U_SEARCH}" onsubmit="return checkSearch()"> ! <a href="{U_SEARCH}"><span class="gen">{L_SEARCH}:</span></a> ! <input class="post" type="text" name="search_keywords" size="15"> <select class="post" name="search_engine"> {L_SEARCH_SITE} --- 169,176 ---- <td valign="top" align="right" width="100%" height="5" > <form name="search_block" method="post" action="{U_SEARCH}" onsubmit="return checkSearch()"> ! <a href="{U_SEARCH}"><span class="gen">{L_SEARCH}</span></a>: ! <input class="post" type="text" name="search_keywords" size="15" value="...?" ! onfocus="if(this.value=='...?'){this.value='';}" ! onblur="if(this.value==''){this.value='...?';}"> <select class="post" name="search_engine"> {L_SEARCH_SITE} |
|
From: Markus P. <mar...@us...> - 2005-04-28 14:26:39
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv426 Modified Files: login.php Log Message: Fixed our login.php to match the original phpBB... AGAIN !!! :-( Index: login.php =================================================================== RCS file: /cvsroot/mxbb/core/login.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** login.php 9 Jan 2005 21:55:44 -0000 1.7 --- login.php 28 Apr 2005 14:26:26 -0000 1.8 *************** *** 22,46 **** */ // Allow people to reach login page if // board is shut down ! define( "IN_LOGIN", true ); ! ! define( 'IN_PORTAL', true ); $mx_root_path = './'; ! include( $mx_root_path . 'extension.inc' ); ! include( $mx_root_path . 'common.' . $phpEx ); // Set page ID for session management ! ! $userdata = session_pagestart( $user_ip, PAGE_LOGIN ); ! mx_init_userprefs( $userdata ); ! // End session management // session id check ! if ( !empty( $HTTP_POST_VARS['sid'] ) || !empty( $HTTP_GET_VARS['sid'] ) ) { ! $sid = ( !empty( $HTTP_POST_VARS['sid'] ) ) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; } else --- 22,49 ---- */ + // // Allow people to reach login page if // board is shut down + // + define("IN_LOGIN", true); ! define('IN_PORTAL', true); $mx_root_path = './'; ! include($mx_root_path . 'extension.inc'); ! include($mx_root_path . 'common.'.$phpEx); + // // Set page ID for session management ! // ! $userdata = session_pagestart($user_ip, PAGE_LOGIN); ! mx_init_userprefs($userdata); ! // // End session management + // // session id check ! if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) { ! $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; } else *************** *** 49,114 **** } ! if ( isset( $HTTP_POST_VARS['login'] ) || isset( $HTTP_GET_VARS['login'] ) || isset( $HTTP_POST_VARS['logout'] ) || isset( $HTTP_GET_VARS['logout'] ) ) { ! // mx fix for tracking newssuite pagination ! setcookie( 'cat_start', serialize( array() ), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure'] ); ! ! if ( ( isset( $HTTP_POST_VARS['login'] ) || isset( $HTTP_GET_VARS['login'] ) ) && !$userdata['session_logged_in'] ) { $username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : ''; ! ! $password = isset( $HTTP_POST_VARS['password'] ) ? $HTTP_POST_VARS['password'] : ''; $sql = "SELECT user_id, username, user_password, user_active, user_level FROM " . USERS_TABLE . " ! WHERE username = '" . str_replace( "\\'", "''", $username ) . "'"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql ); } ! if ( $row = $db->sql_fetchrow( $result ) ) { ! if ( $row['user_level'] != ADMIN && $board_config['board_disable'] ) { ! mx_redirect( append_sid( "index.$phpEx", true ) ); } else { ! if ( md5( $password ) == $row['user_password'] && $row['user_active'] ) { ! $autologin = ( isset( $HTTP_POST_VARS['autologin'] ) ) ? true : 0; ! $session_id = session_begin( $row['user_id'], $user_ip, PAGE_INDEX, false, $autologin ); ! if ( $session_id ) { ! $url = ( !empty( $HTTP_POST_VARS['redirect'] ) ) ? str_replace( '&', '&', htmlspecialchars( $HTTP_POST_VARS['redirect'] ) ) : "index.$phpEx"; ! $url = str_replace( ".php", ".php?", $url ); ! mx_redirect( append_sid( $url, true ) ); } else { ! mx_message_die( CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__ ); } } else { ! $redirect = ( !empty( $HTTP_POST_VARS['redirect'] ) ) ? str_replace( '&', '&', htmlspecialchars( $HTTP_POST_VARS['redirect'] ) ) : ''; ! $redirect = str_replace( "?", "&", $redirect ); ! if ( strstr( urldecode( $redirect ), "\n" ) || strstr( urldecode( $redirect ), "\r" ) ) { ! mx_message_die( GENERAL_ERROR, 'Tried to redirect to potentially insecure url.' ); } ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . "login.$phpEx?redirect=$redirect&sid=" . $userdata['session_id'] . '">' ) ! ); ! $url = "login.$phpEx?redirect=$redirect&sid=" . $userdata['session_id']; ! $url = str_replace( "&&", "&", $url ); ! $message = $lang['Error_login'] . '<br /><br />' . sprintf( $lang['Click_return_login'], '<a href="' . $url . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( "index.$phpEx" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } } --- 52,111 ---- } ! if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) ) { ! if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] ) { $username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : ''; ! $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : ''; $sql = "SELECT user_id, username, user_password, user_active, user_level FROM " . USERS_TABLE . " ! WHERE username = '" . str_replace("\\'", "''", $username) . "'"; ! if ( !($result = $db->sql_query($sql) ) ) { ! mx_message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql); } ! if( $row = $db->sql_fetchrow($result) ) { ! if( $row['user_level'] != ADMIN && $board_config['board_disable'] ) { ! mx_redirect(append_sid("index.$phpEx", true)); } else { ! if( md5($password) == $row['user_password'] && $row['user_active'] ) { ! $autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0; ! $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin); ! if( $session_id ) { ! $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx"; ! mx_redirect(append_sid($url, true)); } else { ! mx_message_die(CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__); } } else { ! $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : ''; ! $redirect = str_replace('?', '&', $redirect); ! if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r")) { ! mx_message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.'); } ! $template->assign_vars(array( ! 'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">") ! ); ! $message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); ! mx_message_die(GENERAL_MESSAGE, $message); } } *************** *** 116,198 **** else { ! $redirect = ( !empty( $HTTP_POST_VARS['redirect'] ) ) ? str_replace( '&', '&', htmlspecialchars( $HTTP_POST_VARS['redirect'] ) ) : ""; ! $redirect = str_replace( "?", "&", $redirect ); ! if ( strstr( urldecode( $redirect ), "\n" ) || strstr( urldecode( $redirect ), "\r" ) ) { ! message_die( GENERAL_ERROR, 'Tried to redirect to potentially insecure url.' ); } ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . "login.$phpEx?redirect=$redirect&sid=" . $userdata['session_id'] . '">' ) ! ); ! $url = "login.$phpEx?redirect=$redirect&sid=" . $userdata['session_id']; ! $url = str_replace( "&&", "&", $url ); ! $message = $lang['Error_login'] . '<br /><br />' . sprintf( $lang['Click_return_login'], '<a href="' . $url . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( "index.$phpEx" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } } ! else if ( ( isset( $HTTP_GET_VARS['logout'] ) || isset( $HTTP_POST_VARS['logout'] ) ) && $userdata['session_logged_in'] ) { ! // session id check ! if ( $sid == '' || $sid != $userdata['session_id'] ) ! { ! mx_message_die( GENERAL_ERROR, 'Invalid_session' ); ! } ! ! if ( $userdata['session_logged_in'] ) { ! session_end( $userdata['session_id'], $userdata['user_id'] ); } ! if ( !empty( $HTTP_POST_VARS['redirect'] ) || !empty( $HTTP_GET_VARS['redirect'] ) ) { ! $url = ( !empty( $HTTP_POST_VARS['redirect'] ) ) ? $HTTP_POST_VARS['redirect'] : $HTTP_GET_VARS['redirect']; ! mx_redirect( append_sid( $url, true ) ); } else { ! mx_redirect( append_sid( "index.$phpEx", true ) ); } } else { ! $url = ( !empty( $HTTP_POST_VARS['redirect'] ) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx"; ! mx_redirect( append_sid( $url, true ) ); } } else { ! // Do a full login page dohickey if // user not already logged in ! ! if ( !$userdata['session_logged_in'] ) { $page_title = $lang['Login']; ! include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! $template->set_filenames( array( 'body' => 'login_body.tpl' ) ! ); ! if ( isset( $HTTP_POST_VARS['redirect'] ) || isset( $HTTP_GET_VARS['redirect'] ) ) { $forward_to = $HTTP_SERVER_VARS['QUERY_STRING']; ! if ( preg_match( "/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $forward_to, $forward_matches ) ) { ! $forward_to = ( !empty( $forward_matches[3] ) ) ? $forward_matches[3] : $forward_matches[1]; ! $forward_match = explode( '&', $forward_to ); ! if ( count( $forward_match ) > 1 ) { $forward_page = ''; ! for( $i = 1; $i < count( $forward_match ); $i++ ) { ! if ( !ereg( "sid=", $forward_match[$i] ) ) { ! if ( $forward_page != '' ) { $forward_page .= '&'; --- 113,190 ---- else { ! $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : ""; ! $redirect = str_replace("?", "&", $redirect); ! if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r")) { ! mx_message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.'); } ! $template->assign_vars(array( ! 'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">") ! ); ! $message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); ! mx_message_die(GENERAL_MESSAGE, $message); } } ! else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] ) { ! if( $userdata['session_logged_in'] ) { ! session_end($userdata['session_id'], $userdata['user_id']); } ! if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect'])) { ! $url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']); ! $url = str_replace('&', '&', $url); ! mx_redirect(append_sid($url, true)); } else { ! mx_redirect(append_sid("index.$phpEx", true)); } } else { ! $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx"; ! mx_redirect(append_sid($url, true)); } } else { ! // // Do a full login page dohickey if // user not already logged in ! // ! if( !$userdata['session_logged_in'] ) { $page_title = $lang['Login']; ! include($mx_root_path . 'includes/page_header.'.$phpEx); ! $template->set_filenames(array( ! 'body' => 'login_body.tpl') ! ); ! if( isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) ) { $forward_to = $HTTP_SERVER_VARS['QUERY_STRING']; ! if( preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $forward_to, $forward_matches) ) { ! $forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1]; ! $forward_match = explode('&', $forward_to); ! if(count($forward_match) > 1) { $forward_page = ''; ! for($i = 1; $i < count($forward_match); $i++) { ! if( !ereg("sid=", $forward_match[$i]) ) { ! if( $forward_page != '' ) { $forward_page .= '&'; *************** *** 216,238 **** $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : ''; ! $forward_page = str_replace( "?", "", $forward_page ); ! $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="redirect" value="' . $forward_page . '" />'; ! make_jumpbox( 'viewforum.' . $phpEx, $forum_id ); ! $template->assign_vars( array( 'USERNAME' => $username, ! 'L_ENTER_PASSWORD' => $lang['Enter_password'], ! 'L_SEND_PASSWORD' => $lang['Forgotten_password'], ! 'U_SEND_PASSWORD' => append_sid( $phpbb_root_path . "profile.$phpEx?mode=sendpassword" ), ! 'S_HIDDEN_FIELDS' => $s_hidden_fields ! ) ); ! $template->pparse( 'body' ); ! include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } else { ! mx_redirect( append_sid( "index.$phpEx", true ) ); } } --- 208,234 ---- $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : ''; ! $s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />'; ! make_jumpbox($phpbb_root_path . 'viewforum.'.$phpEx, $forum_id); ! $template->assign_vars(array( ! 'USERNAME' => $username, ! 'L_ENTER_PASSWORD' => $lang['Enter_password'], ! 'L_SEND_PASSWORD' => $lang['Forgotten_password'], ! 'U_SEND_PASSWORD' => append_sid($phpbb_root_path . "profile.$phpEx?mode=sendpassword"), ! ! 'S_HIDDEN_FIELDS' => $s_hidden_fields) ! ); ! ! $template->pparse('body'); ! ! include($mx_root_path . 'includes/page_tail.'.$phpEx); } else { ! mx_redirect(append_sid("index.$phpEx", true)); } + } |
|
From: Markus P. <mar...@us...> - 2005-04-28 13:58:44
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/modules/mx_coreblocks Modified Files: mx_announce.php Log Message: Fixed a couple of issues with the Announcement block (urls). Index: mx_announce.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_announce.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mx_announce.php 19 Apr 2005 15:55:39 -0000 1.13 --- mx_announce.php 28 Apr 2005 13:58:32 -0000 1.14 *************** *** 84,115 **** $min_topic_time = time() - ( $announce_nbr_days * 86400 ); ! $topic_type = ''; ! $t_commas = ''; ! if ( $announce_display_global == 'TRUE' ) ! { ! $topic_type = POST_GLOBAL_ANNOUNCE; ! $t_commas = ','; ! } ! if ( $announce_display == 'TRUE' ) { ! $topic_type .= $t_commas . POST_ANNOUNCE; ! $t_commas = ','; } ! if ( $announce_display_sticky == 'TRUE' ) { ! $topic_type .= $t_commas . POST_STICKY ; ! $t_commas = ','; } ! if ( $announce_display_normal == 'TRUE' ) { ! $topic_type .= $t_commas . POST_NORMAL ; } ! if( empty($topic_type) ) { ! $topic_type = 0; } ! $sql = "SELECT t.*, u.username, u.user_id, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, p2.post_time AS last_post_time ! FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt, " . POSTS_TABLE . " p2 WHERE p.topic_id = t.topic_id AND t.topic_type IN ( " . $topic_type . " ) --- 84,108 ---- $min_topic_time = time() - ( $announce_nbr_days * 86400 ); ! $topic_type = array(); ! if( $announce_display_global == 'TRUE' ) { ! $topic_type[] = POST_GLOBAL_ANNOUNCE; } ! if( $announce_display == 'TRUE' ) { ! $topic_type[] = POST_ANNOUNCE; } ! if( $announce_display_sticky == 'TRUE' ) { ! $topic_type[] = POST_STICKY; } ! if( $announce_display_normal == 'TRUE' ) { ! $topic_type[] = POST_NORMAL; } + $topic_type = ( empty($topic_type) ? 0 : implode(', ', $topic_type) ); ! $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, p2.post_time AS last_post_time ! FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . POSTS_TEXT_TABLE . " pt WHERE p.topic_id = t.topic_id AND t.topic_type IN ( " . $topic_type . " ) *************** *** 121,124 **** --- 114,118 ---- AND t.forum_id IN ( $announce_forum ) AND p2.post_id = t.topic_last_post_id + AND u2.user_id = p2.poster_id ORDER BY p.post_time $post_time_order LIMIT $start, " . $announce_nbr_display; *************** *** 325,332 **** 'TOPIC_ID' => $postrow[$i]['topic_id'], 'SIGNATURE' => $user_sig, ! 'FOLDER_IMG' => $folder_image, 'IMAGE' => TEMPLATE_ROOT_PATH . 'images/' . $annoucement_image, ! 'U_URL' => $last_post_url, 'REPLIES' => $replies, --- 319,328 ---- 'TOPIC_ID' => $postrow[$i]['topic_id'], 'SIGNATURE' => $user_sig, ! 'FOLDER_IMG' => PHPBB_URL . $folder_image, 'IMAGE' => TEMPLATE_ROOT_PATH . 'images/' . $annoucement_image, ! 'U_TOPIC_URL' => append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $postrow[$i]['topic_id']), ! 'U_LAST_POST_URL' => $last_post_url, ! 'U_PROFILE_POSTER' => append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&u=$poster_id"), 'REPLIES' => $replies, |
|
From: Markus P. <mar...@us...> - 2005-04-28 13:58:44
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/modules/mx_coreblocks/templates/subSilver Modified Files: mx_announce.tpl Log Message: Fixed a couple of issues with the Announcement block (urls). Index: mx_announce.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver/mx_announce.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_announce.tpl 19 Apr 2005 15:55:39 -0000 1.7 --- mx_announce.tpl 28 Apr 2005 13:58:33 -0000 1.8 *************** *** 1,20 **** <!-- BEGIN postrow --> ! <table width="{BLOCK_SIZE}" border="0" cellpadding="4" cellspacing="0" class="forumline"> <tr> <td class="row1"> ! <table width="100%" border="0" cellpadding="4" cellspacing="0"> <tbody> <tr> <td class="row1"> <p> ! <a href="{postrow.U_URL}"> <img src="{postrow.IMAGE}" align="right" hspace="5" vspace="5" border="1" title="{postrow.TITLE}" alt="{postrow.TITLE}" /> </a> ! <a href="{postrow.U_URL}" class="topictitle"> ! <img src="{postrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{postrow.L_TOPIC_FOLDER_ALT}" title="{postrow.L_TOPIC_FOLDER_ALT}" ! border="0" align="absmiddle" /> ! {postrow.TITLE} ! </a> </p> <span class="postbody">{postrow.MESSAGE}</span> --- 1,19 ---- <!-- BEGIN postrow --> ! <table width="{BLOCK_SIZE}" border="0" cellpadding="1" cellspacing="0" class="forumline"> <tr> <td class="row1"> ! <table width="100%" border="0" cellpadding="2" cellspacing="1"> <tbody> <tr> <td class="row1"> <p> ! <a href="{postrow.U_TOPIC_URL}"> <img src="{postrow.IMAGE}" align="right" hspace="5" vspace="5" border="1" title="{postrow.TITLE}" alt="{postrow.TITLE}" /> </a> ! <a href="{postrow.U_LAST_POST_URL}" class="topictitle"> ! <img src="{postrow.FOLDER_IMG}" width="19" height="18" alt="{postrow.L_TOPIC_FOLDER_ALT}" title="{postrow.L_TOPIC_FOLDER_ALT}" ! border="0" align="absmiddle" /></a> ! <a href="{postrow.U_TOPIC_URL}" class="topictitle">{postrow.TITLE}</a> </p> <span class="postbody">{postrow.MESSAGE}</span> *************** *** 29,37 **** <table width="100%" border="0" cellpadding="2" cellspacing="1"> <tr> ! <td class="row2" align="center" valign="middle"><span class="gensmall">{postrow.L_AUTHOR} <a href="{U_PHPBB_ROOT_PATH}profile.php?mode=viewprofile&u={postrow.POSTER_ID}">{postrow.POSTER_NAME}</a></span></td> ! <td class="row2" align="center" valign="middle"><span class="gensmall">{postrow.L_POSTED} <br /> {postrow.FIRST_POST_TIME}</span></td> ! <td class="row2" align="center" valign="middle"><span class="postdetails">{postrow.L_REPLIES} <br /> {postrow.REPLIES}</span></td> ! <td class="row2" align="center" valign="middle"><span class="postdetails">{postrow.L_VIEWS} <br /> {postrow.VIEWS}</span></td> ! <td class="row2" align="center" valign="middle"><span class="postdetails">{postrow.L_LASTPOST} <br /> {postrow.LAST_POST_TIME}{postrow.LAST_POST_AUTHOR} {postrow.LAST_POST_IMG}</span></td> </tr> </table> --- 28,36 ---- <table width="100%" border="0" cellpadding="2" cellspacing="1"> <tr> ! <td class="row2" align="center" valign="middle"><span class="gensmall">{postrow.L_AUTHOR}: <a href="{postrow.U_PROFILE_POSTER}">{postrow.POSTER_NAME}</a></span></td> ! <td class="row2" align="center" valign="middle"><span class="gensmall">{postrow.L_POSTED}:<br />{postrow.FIRST_POST_TIME}</span></td> ! <td class="row2" align="center" valign="middle"><span class="postdetails">{postrow.L_REPLIES}:<br />{postrow.REPLIES}</span></td> ! <td class="row2" align="center" valign="middle"><span class="postdetails">{postrow.L_VIEWS}:<br />{postrow.VIEWS}</span></td> ! <td class="row2" align="center" valign="middle"><span class="postdetails">{postrow.L_LASTPOST}:<br />{postrow.LAST_POST_TIME} {postrow.LAST_POST_AUTHOR} {postrow.LAST_POST_IMG}</span></td> </tr> </table> |
|
From: Markus P. <mar...@us...> - 2005-04-28 04:15:25
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27974 Modified Files: index.php Log Message: Normalize initialization in ACP scripts, more code cleanup and a couple bugs. Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 28 Apr 2005 04:13:50 -0000 1.6 --- index.php 28 Apr 2005 04:15:13 -0000 1.7 *************** *** 38,42 **** // DEBUG ONLY ;-) // ! error_reporting(E_ALL); // ------------------------------ --- 38,42 ---- // DEBUG ONLY ;-) // ! //error_reporting(E_ALL); // ------------------------------ |
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26925/admin Modified Files: admin_mx_block.php admin_mx_block_auth.php admin_mx_chkobjs.php admin_mx_gen_cache.php admin_mx_menu.php admin_mx_meta.php admin_mx_module.php admin_mx_page.php admin_mx_page_auth.php admin_mx_page_setting.php admin_mx_page_template_setting.php admin_mx_phpinfo.php admin_mx_portal.php index.php page_footer_admin.php page_header_admin.php pagestart.php Log Message: Normalize initialization in ACP scripts, more code cleanup and a couple bugs. Index: admin_mx_phpinfo.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_phpinfo.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_mx_phpinfo.php 20 Mar 2005 22:59:55 -0000 1.4 --- admin_mx_phpinfo.php 28 Apr 2005 04:13:50 -0000 1.5 *************** *** 19,36 **** */ ! if ( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Portal - System']['phpInfo'] = 'admin/' . $file; return; } - define('IN_PORTAL', 1); - $mx_root_path = '../'; - // ! // Security and page header // ! require('./pagestart.php'); // --- 19,36 ---- */ ! if( !empty($setmodules) ) { ! $module['Portal - System']['phpInfo'] = 'admin/' . basename(__FILE__); return; } // ! // Security and Page header // ! define('IN_PORTAL', 1); ! $mx_root_path = './../'; ! require($mx_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! // Index: admin_mx_page_auth.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_auth.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_mx_page_auth.php 6 Mar 2005 01:10:13 -0000 1.2 --- admin_mx_page_auth.php 28 Apr 2005 04:13:50 -0000 1.3 *************** *** 19,42 **** */ ! define( 'IN_PORTAL', 1 ); ! ! if ( !empty( $setmodules ) ) { ! $filename = basename( __FILE__ ); ! $module['Portal - Pages']['Private Permissions'] = 'admin/' . $filename; return; } ! define( 'IN_PORTAL', 1 ); ! $mx_root_path = '../'; ! require( $mx_root_path . 'admin/pagestart.php' ); // HERE ! // Mode setting ! ! if ( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) { ! $mode = ( isset( $HTTP_POST_VARS['mode'] ) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars( $mode ); } else --- 19,43 ---- */ ! if( !empty($setmodules) ) { ! $module['Portal - Pages']['Private Permissions'] = 'admin/' . basename( __FILE__ ); return; } + // + // Security and Page header + // + define('IN_PORTAL', 1); + $mx_root_path = './../'; + require($mx_root_path . 'extension.inc'); + require('./pagestart.' . $phpEx); ! // // Mode setting ! // ! if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) { ! $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars($mode); } else *************** *** 47,158 **** $album_user_id = ALBUM_PUBLIC_GALLERY; ! if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $s_page_list = get_list_formatted( 'page_list', $page_id, 'cat_id' ); ! $template->set_filenames( array( 'body' => 'admin/mx_auth_select_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_AUTH_TITLE' => $lang['Mx_Page_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Page_Auth_Explain'], ! 'L_SELECT_AUTH' => $lang['Auth_Page'], ! 'S_AUTH_ACTION' => append_sid( "admin_mx_page_auth.$phpEx" ), ! 'L_LOOK_UP_AUTH' => $lang['Change'], ! 'AUTH_SELECT_TITLE' => $s_page_list ) ! ); ! $template->pparse( 'body' ); ! include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } else { ! if ( !isset( $HTTP_GET_VARS['cat_id'] ) ) { ! $cat_id = intval( $HTTP_POST_VARS['cat_id'] ); ! $template->set_filenames( array( 'body' => 'admin/mx_page_auth_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_AUTH_TITLE' => $lang['Mx_Page_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Page_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], - 'L_IS_MODERATOR' => $lang['Is_Moderator'], - 'S_AUTH_ACTION' => append_sid( "admin_mx_page_auth.$phpEx?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 ( $row = $db->sql_fetchrow( $result ) ) { $groupdata[] = $row; ! } // Get info of this cat $sql = "SELECT page_id, page_name, auth_view_group, auth_moderator_group ! FROM " . PAGE_TABLE . " ! WHERE page_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_group'] ); ! $moderator_groups = @explode( ',', $thiscat['auth_moderator_group'] ); ! 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"' : '', ! ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ! ); } ! $template->pparse( 'body' ); ! ! include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } else { $cat_id = intval( $HTTP_GET_VARS['cat_id'] ); ! ! $view_groups = @implode( ',', $HTTP_POST_VARS['view'] ); ! ! $moderator_groups = @implode( ',', $HTTP_POST_VARS['moderator'] ); $sql = "UPDATE " . PAGE_TABLE . " ! SET auth_view_group = '$view_groups', auth_moderator_group = '$moderator_groups' ! WHERE page_id = '$cat_id'"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not update Page config table', '', __LINE__, __FILE__, $sql ); } ! $message = $lang['Page_Auth_successfully'] . '<br /><br />' . sprintf( $lang['Click_return_page_auth'], '<a href="' . append_sid( "admin_mx_page_auth.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); // Update cache ! update_session_cache( $block_id ); ! ! mx_message_die( GENERAL_MESSAGE, $message ); } } --- 48,160 ---- $album_user_id = ALBUM_PUBLIC_GALLERY; ! if( !isset($HTTP_POST_VARS['submit']) ) { + $s_page_list = get_list_formatted('page_list', $page_id, 'cat_id'); ! $template->set_filenames(array( ! 'body' => 'admin/mx_auth_select_body.tpl') ! ); ! $template->assign_vars(array( ! 'L_AUTH_TITLE' => $lang['Mx_Page_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Page_Auth_Explain'], ! 'L_SELECT_AUTH' => $lang['Auth_Page'], ! 'S_AUTH_ACTION' => append_sid("admin_mx_page_auth.$phpEx"), ! 'L_LOOK_UP_AUTH' => $lang['Change'], ! 'AUTH_SELECT_TITLE' => $s_page_list) ! ); ! $template->pparse('body'); ! include($mx_root_path . 'admin/page_footer_admin.' . $phpEx); } else { ! if( !isset($HTTP_GET_VARS['cat_id']) ) { ! $cat_id = intval($HTTP_POST_VARS['cat_id']); ! $template->set_filenames(array( ! 'body' => 'admin/mx_page_auth_body.tpl') ! ); ! $template->assign_vars(array( ! 'L_AUTH_TITLE' => $lang['Mx_Page_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Page_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! 'S_AUTH_ACTION' => append_sid("admin_mx_page_auth.$phpEx?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( $row = $db->sql_fetchrow($result) ) { $groupdata[] = $row; ! } ! // Get info of this cat $sql = "SELECT page_id, page_name, auth_view_group, auth_moderator_group ! FROM " . PAGE_TABLE . " ! WHERE page_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_group']); ! $moderator_groups = @explode(',', $thiscat['auth_moderator_group']); ! 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"' : '', ! 'MODERATOR_CHECKED' => ( in_array($groupdata[$i]['group_id'], $moderator_groups) ) ? 'checked="checked"' : '') ! ); } ! $template->pparse('body'); ! include($mx_root_path . 'admin/page_footer_admin.' . $phpEx); } else { $cat_id = intval( $HTTP_GET_VARS['cat_id'] ); ! $view_groups = @implode(',', $HTTP_POST_VARS['view']); ! $moderator_groups = @implode(',', $HTTP_POST_VARS['moderator']); $sql = "UPDATE " . PAGE_TABLE . " ! SET auth_view_group = '$view_groups', auth_moderator_group = '$moderator_groups' ! WHERE page_id = '$cat_id'"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not update Page config table', '', __LINE__, __FILE__, $sql); } ! $message = $lang['Page_Auth_successfully'] . '<br /><br />' . sprintf($lang['Click_return_page_auth'], '<a href="' . append_sid("admin_mx_page_auth.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid($mx_root_path . "admin/index.$phpEx?pane=right") . '">', '</a>'); // Update cache ! update_session_cache($block_id); ! ! mx_message_die(GENERAL_MESSAGE, $message); } } Index: admin_mx_chkobjs.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_chkobjs.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_mx_chkobjs.php 26 Apr 2005 22:51:44 -0000 1.9 --- admin_mx_chkobjs.php 28 Apr 2005 04:13:49 -0000 1.10 *************** *** 24,42 **** // ====================================================== - $no_page_header = TRUE; - if( !empty($setmodules) ) { ! $module['Portal - System']['Objects_Integrity_Check'] = 'admin/' . basename(__FILE__); return; } - define('IN_PORTAL', 1); - $mx_root_path = '../'; - // ! // Security and page header // ! require('./pagestart.php'); --- 24,41 ---- // ====================================================== if( !empty($setmodules) ) { ! $module['Portal - System']['Integrity_Checker'] = 'admin/' . basename(__FILE__); return; } // ! // Security and Page header // ! define('IN_PORTAL', 1); ! $mx_root_path = './../'; ! require($mx_root_path . 'extension.inc'); ! $no_page_header = TRUE; ! require('./pagestart.' . $phpEx); Index: admin_mx_gen_cache.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_gen_cache.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_mx_gen_cache.php 25 Apr 2005 12:18:44 -0000 1.15 --- admin_mx_gen_cache.php 28 Apr 2005 04:13:49 -0000 1.16 *************** *** 19,25 **** */ ! $no_page_header = true; ! ! if ( !empty($setmodules) ) { $module['Portal - System']['Generate cache'] = 'admin/' . basename(__FILE__); --- 19,23 ---- */ ! if( !empty($setmodules) ) { $module['Portal - System']['Generate cache'] = 'admin/' . basename(__FILE__); *************** *** 27,51 **** } define('IN_PORTAL', 1); ! $mx_root_path = '../'; ! ! // Security and page header - require('./pagestart.php'); // Getting mode of operation ! $generate = ( $mx_request_vars->request('generate', MX_TYPE_INT, 0) == 1 ? true : false ); ! // Load default template for install ! $template->set_filenames(array( 'body' => 'admin/admin_message_body.tpl') ); // Main procedure ! ! if ( !$generate ) { $message = $lang['Cache_explain'] . '<br /> <br /> <br />'; --- 25,54 ---- } + // + // Security and Page header + // define('IN_PORTAL', 1); ! $mx_root_path = './../'; ! require($mx_root_path . 'extension.inc'); ! $no_page_header = TRUE; ! require('./pagestart.' . $phpEx); + // // Getting mode of operation ! // $generate = ( $mx_request_vars->request('generate', MX_TYPE_INT, 0) == 1 ? true : false ); ! // // Load default template for install ! // $template->set_filenames(array( 'body' => 'admin/admin_message_body.tpl') ); + // // Main procedure ! // ! if( !$generate ) { $message = $lang['Cache_explain'] . '<br /> <br /> <br />'; *************** *** 63,71 **** @chmod($cache_dir, 0777); ! if ( !is_writable($cache_dir) ) { $message = $lang['Cache_dir_write_protect']; ! mx_message_die(GENERAL_MESSAGE, $message, ''); ! exit; } --- 66,73 ---- @chmod($cache_dir, 0777); ! if( !is_writable($cache_dir) ) { $message = $lang['Cache_dir_write_protect']; ! mx_message_die(GENERAL_MESSAGE, $message); } *************** *** 125,129 **** --- 127,133 ---- */ + // // Update cache + // update_session_cache($block_id); Index: admin_mx_page_template_setting.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_template_setting.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_mx_page_template_setting.php 1 Feb 2005 20:40:43 -0000 1.4 --- admin_mx_page_template_setting.php 28 Apr 2005 04:13:50 -0000 1.5 *************** *** 19,44 **** */ ! $no_page_header = true; ! ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['Portal - Pages']['Page_Templates'] = 'admin/' . $file; return; } ! define( 'IN_PORTAL', 1 ); ! $mx_root_path = '../'; ! ! // Security and page header ! ! require( './pagestart.php' ); // Mode setting ! ! if ( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) { ! $mode = ( isset( $HTTP_POST_VARS['mode'] ) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars( $mode ); } else --- 19,44 ---- */ ! if( !empty($setmodules) ) { ! $module['Portal - Pages']['Page_Templates'] = 'admin/' . basename(__FILE__); return; } ! // ! // Security and Page header ! // ! define('IN_PORTAL', 1); ! $mx_root_path = './../'; ! require($mx_root_path . 'extension.inc'); ! $no_page_header = TRUE; ! require('./pagestart.' . $phpEx); + // // Mode setting ! // ! if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) { ! $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars($mode); } else *************** *** 47,80 **** } ! if ( isset( $HTTP_POST_VARS['page_template_id'] ) || isset( $HTTP_GET_VARS['page_template_id'] ) ) { ! $page_template_id = ( isset( $HTTP_POST_VARS['page_template_id'] ) ) ? $HTTP_POST_VARS['page_template_id'] : $HTTP_GET_VARS['page_template_id']; ! $page_template_id = htmlspecialchars( $page_template_id ); } else { ! $page_template_id = 2; // select 2 columns left by default -> we don't want to edit NONE (page_template_id = 1) } ! if ( isset( $HTTP_POST_VARS['addcolumn'] ) ) { ! $mode = "addcolumn"; } ! if ( isset( $HTTP_POST_VARS['addtemplate'] ) ) { ! $mode = "addtemplate"; } ! if ( isset( $HTTP_POST_VARS['insertcolumn'] ) ) { ! $mode = "insertcolumn"; } ! function templates_renumber_order( $mode, $column = 0, $page_template_id ) { global $db; ! switch ( $mode ) { case 'column': --- 47,80 ---- } ! if( isset($HTTP_POST_VARS['page_template_id']) || isset($HTTP_GET_VARS['page_template_id']) ) { ! $page_template_id = ( isset($HTTP_POST_VARS['page_template_id']) ) ? $HTTP_POST_VARS['page_template_id'] : $HTTP_GET_VARS['page_template_id']; ! $page_template_id = htmlspecialchars($page_template_id); } else { ! $page_template_id = 2; // select 2 columns left by default -> we don't want to edit NONE (page_template_id = 1) } ! if( isset($HTTP_POST_VARS['addcolumn']) ) { ! $mode = 'addcolumn'; } ! if( isset($HTTP_POST_VARS['addtemplate']) ) { ! $mode = 'addtemplate'; } ! if( isset($HTTP_POST_VARS['insertcolumn']) ) { ! $mode = 'insertcolumn'; } ! function templates_renumber_order($mode, $column = 0, $page_template_id) { global $db; ! switch( $mode ) { case 'column': *************** *** 86,90 **** default: ! mx_message_die( GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__ ); break; } --- 86,90 ---- default: ! mx_message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__); break; } *************** *** 92,98 **** $sql = "SELECT * FROM $table WHERE page_template_id = $page_template_id ORDER BY $orderfield ASC"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't get list of Columns", "", __LINE__, __FILE__, $sql ); } --- 92,98 ---- $sql = "SELECT * FROM $table WHERE page_template_id = $page_template_id ORDER BY $orderfield ASC"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't get list of Columns", "", __LINE__, __FILE__, $sql); } *************** *** 100,177 **** $inc = 10; ! while ( $row = $db->sql_fetchrow( $result ) ) { $sql = "UPDATE $table SET $orderfield = $i WHERE $idfield = " . $row[$idfield]; ! if ( !$db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't update order fields", "", __LINE__, __FILE__, $sql ); } $i += 10; } } ! // End function block // ------------------ // Begin program proper ! ! if ( !empty( $mode ) ) { ! switch ( $mode ) { case 'addtemplate': $template_name = $HTTP_POST_VARS['templatename']; ! $sql = "INSERT INTO " . PAGE_TEMPLATES . " ( template_name ) ! VALUES ( '$template_name' )"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't add new template", "", __LINE__, __FILE__, $sql ); } ! $message = $lang['Template_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_template_setting.php?template_id=$template_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); ! ! mx_message_die( GENERAL_MESSAGE, $message ); ! break; ! case 'column_order': ! // Change order of column in the DB ! ! $column_id = intval( $HTTP_GET_VARS[column_id] ); ! $move = intval( $HTTP_GET_VARS['move'] ); $sql = "UPDATE " . COLUMN_TEMPLATES . " ! SET column_order = column_order + $move ! WHERE column_id = $column_id"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't change column order", "", __LINE__, __FILE__, $sql ); } ! renumber_order( 'column', 0, $template_id ); $show_index = true; - break; case 'addcolumn': ! case 'editcolumn': ! // Show form to edit a column ! ! $column_template_id = intval( $HTTP_GET_VARS[column_template_id] ); $s_hidden_fields = '<input type="hidden" name="column_id" value="' . $column_template_id . '" />'; ! if ( $column_template_id == 0 ) { $buttonvalue = $lang['Submit']; $newmode = 'insertcolumn'; $column_title = $HTTP_POST_VARS['columnname']; ! $column_size = "100%"; } else --- 100,174 ---- $inc = 10; ! while( $row = $db->sql_fetchrow($result) ) { $sql = "UPDATE $table SET $orderfield = $i WHERE $idfield = " . $row[$idfield]; ! if( !($db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't update order fields", "", __LINE__, __FILE__, $sql); } $i += 10; } } ! // // End function block // ------------------ + // // Begin program proper ! // ! if( !empty($mode) ) { ! switch( $mode ) { case 'addtemplate': $template_name = $HTTP_POST_VARS['templatename']; ! $sql = "INSERT INTO " . PAGE_TEMPLATES . " ( template_name ) VALUES ( '$template_name' )"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't add new template", "", __LINE__, __FILE__, $sql); } ! $message = $lang['Template_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_page_admin'], "<a href=\"" . append_sid("admin_mx_page_template_setting.php?template_id=$template_id") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.php?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); break; ! case 'column_order': ! // // Change order of column in the DB ! // ! $column_id = intval($HTTP_GET_VARS[column_id]); ! $move = intval($HTTP_GET_VARS['move']); $sql = "UPDATE " . COLUMN_TEMPLATES . " ! SET column_order = column_order + $move ! WHERE column_id = $column_id"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't change column order", "", __LINE__, __FILE__, $sql); } ! renumber_order('column', 0, $template_id); $show_index = true; break; case 'addcolumn': ! case 'editcolumn': ! // // Show form to edit a column ! // ! $column_template_id = intval($HTTP_GET_VARS['column_template_id']); $s_hidden_fields = '<input type="hidden" name="column_id" value="' . $column_template_id . '" />'; ! if( $column_template_id == 0 ) { $buttonvalue = $lang['Submit']; $newmode = 'insertcolumn'; $column_title = $HTTP_POST_VARS['columnname']; ! $column_size = '100%'; } else *************** *** 179,359 **** $buttonvalue = $lang['Update']; $newmode = 'modcolumn'; ! $row = get_info( COLUMN_TEMPLATES, 'column_template_id', $column_template_id ); ! $column_title = $row['column_title'] ; ! $column_size = $row['column_size'] ; } ! $template->set_filenames( array( "edit_column" => "admin/mx_page_admin_column_template.tpl" ) ! ); $s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="column_template_id" value="' . $column_template_id . '" />'; ! $template->assign_vars( array( 'COLUMN_TITLE' => $column_title, ! 'L_EDIT_COLUMN' => $lang['Edit_Column'], ! 'L_EDIT_COLUMN_EXPLAIN' => $lang['Edit_Column_explain'], ! 'L_COLUMN' => $lang['Column'], ! 'L_COLUMN_SIZE' => $lang['Column_Size'] , ! 'COLUMN_SIZE' => $column_size, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_SUBMIT_VALUE' => $buttonvalue ! ) ); ! define( 'IN_ADMIN', 1 ); ! include_once( './page_header_admin.' . $phpEx ); ! $template->pparse( "edit_column" ); break; ! case 'insertcolumn': // Create a column in the DB ! $sql = "SELECT MAX(column_order) AS max_order ! FROM " . COLUMN_TEMPLATES; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't get order number from column template table", "", __LINE__, __FILE__, $sql ); } ! $row = $db->sql_fetchrow( $result ); $max_order = $row['max_order']; $next_order = $max_order + 10; ! // There is no problem having duplicate page names so we won't check for it. ! $sql = "INSERT INTO " . COLUMN_TEMPLATES . " (column_title, column_order, column_size, page_template_id) ! VALUES ('" . $HTTP_POST_VARS['column_title'] . "', $next_order, '" . $HTTP_POST_VARS['column_size'] . "', $page_template_id)"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't insert row in column table", "", __LINE__, __FILE__, $sql ); } ! $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_template_setting.php?page_template_id=$page_template_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); ! ! mx_message_die( GENERAL_MESSAGE, $message ); ! break; ! case 'modcolumn': // Modify a column in the DB $sql = "UPDATE " . COLUMN_TEMPLATES . " ! SET column_title = '" . str_replace( "\'", "''", $HTTP_POST_VARS['column_title'] ) . "' ! , column_size = '" . str_replace( "\'", "''", $HTTP_POST_VARS['column_size'] ) . "' ! WHERE column_template_id = " . intval( $HTTP_POST_VARS['column_template_id'] ); ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't update block information", "", __LINE__, __FILE__, $sql ); } ! $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_template_setting.php?page_template_id=$page_template_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); ! mx_message_die( GENERAL_MESSAGE, $message ); ! break; ! case 'deletetemplate': // Delete a template from the DB ! $sql = "DELETE FROM " . PAGE_TEMPLATES . " WHERE page_template_id = " . intval( $HTTP_GET_VARS['page_template_id'] ) ; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't delete page template information", "", __LINE__, __FILE__, $sql ); } ! $sql = "DELETE FROM " . COLUMN_TEMPLATES . " WHERE page_template_id = " . intval( $HTTP_GET_VARS[page_template_id] ) ; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't delete column information", "", __LINE__, __FILE__, $sql ); } ! $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_template_setting.php" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); ! mx_message_die( GENERAL_MESSAGE, $message ); ! break; ! case 'deletecolumn' : // Delete a column in the DB ! $sql = "DELETE FROM " . COLUMN_TEMPLATES . " WHERE column_template_id = " . intval( $HTTP_GET_VARS[column_template_id] ) ; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't delete column information", "", __LINE__, __FILE__, $sql ); } - $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_template_setting.php?page_template_id=$page_template_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); - mx_message_die( GENERAL_MESSAGE, $message ); break; default: ! print( $mode ); ! mx_message_die( GENERAL_MESSAGE, $lang['No_mode'] ); break; } ! if ( $show_index != true ) { ! include_once( './page_footer_admin.' . $phpEx ); exit; } } // Start page proper ! ! $template->set_filenames( array( "admin_page_template" => "admin/mx_page_template_admin_body.tpl" ) ! ); $sql = "SELECT * FROM " . PAGE_TEMPLATES . " WHERE page_template_id <> 1 ORDER BY page_template_id"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't get list of Column/blocks", "", __LINE__, __FILE__, $sql ); } $templatelist = '<select name="page_template_id">'; ! while ( $row = $db->sql_fetchrow( $result ) ) { ! $s = ""; ! if ( $row['page_template_id'] == $page_template_id ) ! { ! $s = " selected=\"selected\""; ! } ! $templatelist .= "<option value=\"$row[page_template_id]\"$s>" . $row['template_name'] . "</option>\n"; } $templatelist .= "</select>"; ! $template->assign_vars( array( 'S_ACTION' => append_sid( "admin_mx_page_template_setting.$phpEx?mode=addblock&page_template_id=$page_template_id" ), ! 'S_PAGE_ACTION' => append_sid( "admin_mx_page_template_setting.$phpEx" ), ! 'L_TITLE' => $lang['Page_templates_admin'], ! 'L_EXPLAIN' => $lang['Page_templates_admin_explain'], ! 'L_TEMPLATE_DELETE' => $lang['Page_template_delete'], ! 'U_TEMPLATE_DELETE' => append_sid( "admin_mx_page_template_setting.$phpEx?mode=deletetemplate&page_template_id=$page_template_id" ), ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'TEMPLATELIST' => $templatelist, ! 'L_CREATE_TEMPLATE' => $lang['Add_Template'], ! 'L_TEMPLATE' => $lang['Template'] , ! 'L_CREATE_COLUMN' => $lang['Create_column'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_SETTING' => $lang['Settings'], ! 'L_MOVE_UP' => $lang['Move_up'], ! 'L_MOVE_DOWN' => $lang['Move_down'], ! 'L_CHANGE_NOW' => $lang['Change'] ! ) ); $sql = "SELECT column_template_id, column_title, column_order ! FROM " . COLUMN_TEMPLATES . " ! WHERE page_template_id = $page_template_id ! ORDER BY page_template_id, column_order"; ! if ( !$q_column = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query column list", "", __LINE__, __FILE__, $sql ); } ! if ( $total_column = $db->sql_numrows( $q_column ) ) { ! $column_rows = $db->sql_fetchrowset( $q_column ); ! // Okay, let's build the index ! for( $i = 0; $i < $total_column; $i++ ) { --- 176,362 ---- $buttonvalue = $lang['Update']; $newmode = 'modcolumn'; ! $row = get_info(COLUMN_TEMPLATES, 'column_template_id', $column_template_id); ! $column_title = $row['column_title']; ! $column_size = $row['column_size']; } ! ! $template->set_filenames(array( ! 'edit_column' => 'admin/mx_page_admin_column_template.tpl') ! ); $s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="column_template_id" value="' . $column_template_id . '" />'; ! $template->assign_vars(array( ! 'COLUMN_TITLE' => $column_title, ! 'L_EDIT_COLUMN' => $lang['Edit_Column'], ! 'L_EDIT_COLUMN_EXPLAIN' => $lang['Edit_Column_explain'], ! 'L_COLUMN' => $lang['Column'], ! 'L_COLUMN_SIZE' => $lang['Column_Size'], ! 'COLUMN_SIZE' => $column_size, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_SUBMIT_VALUE' => $buttonvalue ! )); ! define('IN_ADMIN', 1); ! include_once('./page_header_admin.' . $phpEx); ! $template->pparse('edit_column'); break; ! case 'insertcolumn': ! // // Create a column in the DB ! // ! $sql = "SELECT MAX(column_order) AS max_order FROM " . COLUMN_TEMPLATES; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't get order number from column template table", "", __LINE__, __FILE__, $sql); } ! $row = $db->sql_fetchrow($result); $max_order = $row['max_order']; $next_order = $max_order + 10; ! ! // // There is no problem having duplicate page names so we won't check for it. ! // $sql = "INSERT INTO " . COLUMN_TEMPLATES . " (column_title, column_order, column_size, page_template_id) ! VALUES ('" . $HTTP_POST_VARS['column_title'] . "', $next_order, '" . $HTTP_POST_VARS['column_size'] . "', $page_template_id)"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't insert row in column table", "", __LINE__, __FILE__, $sql); } ! $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_page_admin'], "<a href=\"" . append_sid("admin_mx_page_template_setting.php?page_template_id=$page_template_id") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.php?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); break; ! case 'modcolumn': ! // // Modify a column in the DB + // $sql = "UPDATE " . COLUMN_TEMPLATES . " ! SET column_title = '" . str_replace("\'", "''", $HTTP_POST_VARS['column_title']) . "', ! column_size = '" . str_replace("\'", "''", $HTTP_POST_VARS['column_size']) . "' ! WHERE column_template_id = " . intval($HTTP_POST_VARS['column_template_id']); ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't update block information", "", __LINE__, __FILE__, $sql); } ! $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_page_admin'], "<a href=\"" . append_sid("admin_mx_page_template_setting.php?page_template_id=$page_template_id") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.php?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); break; ! case 'deletetemplate': ! // // Delete a template from the DB ! // ! $sql = "DELETE FROM " . PAGE_TEMPLATES . " WHERE page_template_id = " . intval($HTTP_GET_VARS['page_template_id']); ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't delete page template information", "", __LINE__, __FILE__, $sql); } ! $sql = "DELETE FROM " . COLUMN_TEMPLATES . " WHERE page_template_id = " . intval($HTTP_GET_VARS['page_template_id']); ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't delete column information", "", __LINE__, __FILE__, $sql); } ! $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_page_admin'], "<a href=\"" . append_sid("admin_mx_page_template_setting.php") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.php?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); break; ! case 'deletecolumn': ! // // Delete a column in the DB ! // ! $sql = "DELETE FROM " . COLUMN_TEMPLATES . " WHERE column_template_id = " . intval($HTTP_GET_VARS['column_template_id']); ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't delete column information", "", __LINE__, __FILE__, $sql); } + $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_page_admin'], "<a href=\"" . append_sid("admin_mx_page_template_setting.php?page_template_id=$page_template_id") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.php?pane=right") . "\">", "</a>"); + mx_message_die(GENERAL_MESSAGE, $message); break; default: ! mx_message_die(GENERAL_MESSAGE, $lang['No_mode']); break; } ! if( $show_index != true ) { ! include_once('./page_footer_admin.' . $phpEx); exit; } } + // // Start page proper ! // ! $template->set_filenames(array( ! 'admin_page_template' => 'admin/mx_page_template_admin_body.tpl') ! ); $sql = "SELECT * FROM " . PAGE_TEMPLATES . " WHERE page_template_id <> 1 ORDER BY page_template_id"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't get list of Column/blocks", "", __LINE__, __FILE__, $sql); } $templatelist = '<select name="page_template_id">'; ! while( $row = $db->sql_fetchrow($result) ) { ! $selected = ( $row['page_template_id'] == $page_template_id ) ? ' selected="selected"' : ''; ! $templatelist .= "<option value=\"$row[page_template_id]\"$selected>" . $row['template_name'] . "</option>\n"; } $templatelist .= "</select>"; ! $template->assign_vars(array( ! 'S_ACTION' => append_sid("admin_mx_page_template_setting.$phpEx?mode=addblock&page_template_id=$page_template_id"), ! 'S_PAGE_ACTION' => append_sid("admin_mx_page_template_setting.$phpEx"), ! 'L_TITLE' => $lang['Page_templates_admin'], ! 'L_EXPLAIN' => $lang['Page_templates_admin_explain'], ! 'L_TEMPLATE_DELETE' => $lang['Page_template_delete'], ! 'U_TEMPLATE_DELETE' => append_sid("admin_mx_page_template_setting.$phpEx?mode=deletetemplate&page_template_id=$page_template_id"), ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'TEMPLATELIST' => $templatelist, ! 'L_CREATE_TEMPLATE' => $lang['Add_Template'], ! 'L_TEMPLATE' => $lang['Template'], ! 'L_CREATE_COLUMN' => $lang['Create_column'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_SETTING' => $lang['Settings'], ! 'L_MOVE_UP' => $lang['Move_up'], ! 'L_MOVE_DOWN' => $lang['Move_down'], ! 'L_CHANGE_NOW' => $lang['Change'] ! )); $sql = "SELECT column_template_id, column_title, column_order ! FROM " . COLUMN_TEMPLATES . " ! WHERE page_template_id = $page_template_id ! ORDER BY page_template_id, column_order"; ! if( !($q_column = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Could not query column list", "", __LINE__, __FILE__, $sql); } ! if( $total_column = $db->sql_numrows($q_column) ) { ! $column_rows = $db->sql_fetchrowset($q_column); ! ! // // Okay, let's build the index ! // for( $i = 0; $i < $total_column; $i++ ) { *************** *** 362,382 **** $s_hidden_fields = '<input type="hidden" name="column_template_id[$column_template_id]" value="' . $column_template_id . '" />'; ! $template->assign_block_vars( "columnrow", array( 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'COLUMN_ID' => $column_template_id, ! 'COLUMN_DESC' => $column_rows[$i]['column_title'], ! 'S_ADD_BLOCK_SUBMIT' => "addblock[$column_id]", ! 'LIST_BLOCK' => $blocklist, ! 'U_COLUMN_EDIT' => append_sid( "admin_mx_page_template_setting.$phpEx?mode=editcolumn&column_template_id=$column_template_id&page_template_id=$page_template_id" ), ! 'U_COLUMN_DELETE' => append_sid( "admin_mx_page_template_setting.$phpEx?mode=deletecolumn&column_template_id=$column_template_id&page_template_id=$page_template_id" ), ! 'U_COLUMN_MOVE_UP' => append_sid( "admin_mx_page_template_setting.$phpEx?mode=column_order&move=-15&column_template_id=$column_template_id&page_template_id=$page_template_id" ), ! 'U_COLUMN_MOVE_DOWN' => append_sid( "admin_mx_page_template_setting.$phpEx?mode=column_order&move=15&column_template_id=$column_template_id&page_template_id=$page_template_id" ) ! ) ); } // for ... column } // if ... total_categories - include_once( './page_header_admin.' . $phpEx ); ! $template->pparse( "admin_page_template" ); ! ! include_once( './page_footer_admin.' . $phpEx ); ! ?> --- 365,385 ---- $s_hidden_fields = '<input type="hidden" name="column_template_id[$column_template_id]" value="' . $column_template_id . '" />'; ! $template->assign_block_vars('columnrow', array( ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'COLUMN_ID' => $column_template_id, ! 'COLUMN_DESC' => $column_rows[$i]['column_title'], ! 'S_ADD_BLOCK_SUBMIT' => "addblock[$column_id]", ! 'LIST_BLOCK' => $blocklist, ! 'U_COLUMN_EDIT' => append_sid("admin_mx_page_template_setting.$phpEx?mode=editcolumn&column_template_id=$column_template_id&page_template_id=$page_template_id"), ! 'U_COLUMN_DELETE' => append_sid("admin_mx_page_template_setting.$phpEx?mode=deletecolumn&column_template_id=$column_template_id&page_template_id=$page_template_id"), ! 'U_COLUMN_MOVE_UP' => append_sid("admin_mx_page_template_setting.$phpEx?mode=column_order&move=-15&column_template_id=$column_template_id&page_template_id=$page_template_id"), ! 'U_COLUMN_MOVE_DOWN' => append_sid("admin_mx_page_template_setting.$phpEx?mode=column_order&move=15&column_template_id=$column_template_id&page_template_id=$page_template_id") ! )); } // for ... column } // if ... total_categories ! include_once('./page_header_admin.' . $phpEx); ! $template->pparse('admin_page_template'); ! include_once('./page_footer_admin.' . $phpEx); ! ?> \ No newline at end of file Index: admin_mx_block_auth.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_block_auth.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_mx_block_auth.php 14 Mar 2005 21:09:34 -0000 1.3 --- admin_mx_block_auth.php 28 Apr 2005 04:13:49 -0000 1.4 *************** *** 19,41 **** */ ! define('IN_PORTAL', 1); ! ! if ( !empty( $setmodules ) ) { ! $filename = basename( __FILE__ ); $module['Portal - Blocks']['Private Permissions'] = 'admin/' . $filename; return; } ! $mx_root_path = '../'; ! require( $mx_root_path . 'admin/pagestart.php' ); // HERE ! // Mode setting ! ! if ( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) { ! $mode = ( isset( $HTTP_POST_VARS['mode'] ) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars( $mode ); } else --- 19,44 ---- */ ! if( !empty($setmodules) ) { ! $filename = basename(__FILE__); $module['Portal - Blocks']['Private Permissions'] = 'admin/' . $filename; return; } + // + // Security and Page header + // + define('IN_PORTAL', 1); + $mx_root_path = './../'; + require($mx_root_path . 'extension.inc'); + require('./pagestart.' . $phpEx); ! // // Mode setting ! // ! if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) { ! $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars($mode); } else *************** *** 44,164 **** } ! if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $s_block_list = get_list_formatted( 'block_list', $function_id, 'cat_id' ); ! $template->set_filenames( array( 'body' => 'admin/mx_auth_select_body.tpl' ) ! ); ! ! $template->assign_vars( array( 'L_AUTH_TITLE' => $lang['Mx_Block_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Block_Auth_Explain'], ! 'L_SELECT_AUTH' => $lang['Auth_Block'], ! 'S_AUTH_ACTION' => append_sid( "admin_mx_block_auth.$phpEx" ), ! 'L_LOOK_UP_AUTH' => $lang['Change'], ! 'AUTH_SELECT_TITLE' => $s_block_list ) ! ); ! $template->pparse( 'body' ); ! include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } else { ! if ( !isset( $HTTP_GET_VARS['cat_id'] ) ) { ! $cat_id = intval( $HTTP_POST_VARS['cat_id'] ); ! ! $template->set_filenames( array( 'body' => 'admin/mx_block_auth_body.tpl' ) ! ); ! ! $template->assign_vars( array( 'L_AUTH_TITLE' => $lang['Mx_Block_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Block_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! 'S_AUTH_ACTION' => append_sid( "admin_mx_block_auth.$phpEx?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 ( $row = $db->sql_fetchrow( $result ) ) { $groupdata[] = $row; ! } // Get info of this cat $sql = "SELECT block_id, block_title, auth_view_group, auth_edit_group, auth_delete_group, auth_moderator_group ! FROM " . BLOCK_TABLE . " ! WHERE block_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_group'] ); ! $edit_groups = @explode( ',', $thiscat['auth_edit_group'] ); ! $delete_groups = @explode( ',', $thiscat['auth_delete_group'] ); ! $moderator_groups = @explode( ',', $thiscat['auth_moderator_group'] ); ! 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"' : '', ! ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ! ); } ! $template->pparse( 'body' ); ! include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } else { ! $cat_id = intval( $HTTP_GET_VARS['cat_id'] ); ! ! $view_groups = @implode( ',', $HTTP_POST_VARS['view'] ); ! $edit_groups = @implode( ',', $HTTP_POST_VARS['edit'] ); ! $delete_groups = @implode( ',', $HTTP_POST_VARS['delete'] ); ! ! $moderator_groups = @implode( ',', $HTTP_POST_VARS['moderator'] ); $sql = "UPDATE " . BLOCK_TABLE . " ! SET auth_view_group = '$view_groups', auth_edit_group = '$edit_groups', auth_delete_group = '$delete_groups', auth_moderator_group = '$moderator_groups' ! WHERE block_id = '$cat_id'"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not update Block config table', '', __LINE__, __FILE__, $sql ); } ! // Update cache ! update_session_cache( $block_id ); ! $message = $lang['Block_Auth_successfully'] . '<br /><br />' . sprintf( $lang['Click_return_block_auth'], '<a href="' . append_sid( "admin_mx_block_auth.$phpEx" ) . '">', '</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 ); } } --- 47,170 ---- } ! if( !isset($HTTP_POST_VARS['submit']) ) { + $s_block_list = get_list_formatted('block_list', $function_id, 'cat_id'); + $template->set_filenames(array( + 'body' => 'admin/mx_auth_select_body.tpl') + ); ! $template->assign_vars(array( ! 'L_AUTH_TITLE' => $lang['Mx_Block_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Block_Auth_Explain'], ! 'L_SELECT_AUTH' => $lang['Auth_Block'], ! 'S_AUTH_ACTION' => append_sid("admin_mx_block_auth.$phpEx"), ! 'L_LOOK_UP_AUTH' => $lang['Change'], ! 'AUTH_SELECT_TITLE' => $s_block_list) ! ); ! $template->pparse('body'); ! include($mx_root_path . 'admin/page_footer_admin.' . $phpEx); } else { ! if( !isset($HTTP_GET_VARS['cat_id']) ) { ! $cat_id = intval($HTTP_POST_VARS['cat_id']); ! $template->set_filenames(array( ! 'body' => 'admin/mx_block_auth_body.tpl') ! ); ! $template->assign_vars(array( ! 'L_AUTH_TITLE' => $lang['Mx_Block_Auth_Title'], ! 'L_AUTH_EXPLAIN' => $lang['Mx_Block_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! 'S_AUTH_ACTION' => append_sid("admin_mx_block_auth.$phpEx?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( $row = $db->sql_fetchrow($result) ) { $groupdata[] = $row; ! } ! ! // // Get info of this cat + // $sql = "SELECT block_id, block_title, auth_view_group, auth_edit_group, auth_delete_group, auth_moderator_group ! FROM " . BLOCK_TABLE . " ! WHERE block_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_group']); ! $edit_groups = @explode(',', $thiscat['auth_edit_group']); ! $delete_groups = @explode(',', $thiscat['auth_delete_group']); ! $moderator_groups = @explode(',', $thiscat['auth_moderator_group']); ! 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"' : '', ! 'EDIT_CHECKED' => ( in_array($groupdata[$i]['group_id'], $edit_groups) ) ? 'checked="checked"' : '', ! 'DELETE_CHECKED' => ( in_array($groupdata[$i]['group_id'], $delete_groups) ) ? 'checked="checked"' : '', ! 'MODERATOR_CHECKED' => ( in_array($groupdata[$i]['group_id'], $moderator_groups) ) ? 'checked="checked"' : '') ! ); } ! $template->pparse('body'); ! include($mx_root_path . 'admin/page_footer_admin.' . $phpEx); } else { ! $cat_id = intval($HTTP_GET_VARS['cat_id']); ! $view_groups = @implode(',', $HTTP_POST_VARS['view']); ! $edit_groups = @implode(',', $HTTP_POST_VARS['edit']); ! $delete_groups = @implode(',', $HTTP_POST_VARS['delete']); ! $moderator_groups = @implode(',', $HTTP_POST_VARS['moderator']); $sql = "UPDATE " . BLOCK_TABLE . " ! SET auth_view_group = '$view_groups', ! auth_edit_group = '$edit_groups', ! auth_delete_group = '$delete_groups', ! auth_moderator_group = '$moderator_groups' ! WHERE block_id = '$cat_id'"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not update Block config table', '', __LINE__, __FILE__, $sql); } ! ! // // Update cache ! // ! update_session_cache($block_id); ! $message = $lang['Block_Auth_successfully'] . '<br /><br />' . sprintf($lang['Click_return_block_auth'], '<a href="' . append_sid("admin_mx_block_auth.$phpEx" ) . '">', '</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); } } Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 25 Apr 2005 12:10:43 -0000 1.5 --- index.php 28 Apr 2005 04:13:50 -0000 1.6 *************** *** 25,38 **** */ - define('IN_PORTAL', 1); - // ! // Load default header // ! $no_page_header = TRUE; $mx_root_path = './../'; require($mx_root_path . 'extension.inc'); require('./pagestart.' . $phpEx); // --------------- // Begin functions --- 25,45 ---- */ // ! // Security and Page header // ! define('IN_PORTAL', 1); $mx_root_path = './../'; require($mx_root_path . 'extension.inc'); + $no_page_header = TRUE; require('./pagestart.' . $phpEx); + + // ------------------------------ + // DEBUG ONLY ;-) + // + error_reporting(E_ALL); + // ------------------------------ + + // --------------- // Begin functions *************** *** 143,147 **** // Include PHPBB Administration // ------------------------------------------------------------------------------- ! $module_phpbb = array_merge($module, read_admin($phpbb_root_path . 'admin/')); $template->assign_block_vars('module_phpbb', array( 'L_PHPBB' => $lang['Phpbb'] --- 150,154 ---- // Include PHPBB Administration // ------------------------------------------------------------------------------- ! $module_phpbb = read_admin($phpbb_root_path . 'admin/'); $template->assign_block_vars('module_phpbb', array( 'L_PHPBB' => $lang['Phpbb'] Index: page_header_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/page_header_admin.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** page_header_admin.php 25 Apr 2005 20:50:04 -0000 1.8 --- page_header_admin.php 28 Apr 2005 04:13:50 -0000 1.9 *************** *** 86,90 **** $template->assign_vars(array( 'SITENAME' => $board_config['sitename'], ! 'PAGE_TITLE' => $page_title, 'L_ADMIN' => $lang['Admin'], --- 86,90 ---- $template->assign_vars(array( 'SITENAME' => $board_config['sitename'], ! // 'PAGE_TITLE' => $page_title, 'L_ADMIN' => $lang['Admin'], Index: admin_mx_block.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_block.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** admin_mx_block.php 16 Apr 2005 01:54:57 -0000 1.25 --- admin_mx_block.php 28 Apr 2005 04:13:49 -0000 1.26 *************** *** 19,40 **** */ ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); $module['Portal - Blocks']['Block_admin'] = 'admin/' . $file; return; } ! define( 'IN_PORTAL', 1 ); [...1637 lines suppressed...] { ! mx_message_die(GENERAL_ERROR, "Could not update block title information.", "", __LINE__, __FILE__, $sql); } ! ! // // Update cache ! // ! update_session_cache($block_id); ! if( !empty($portalpage) ) { ! $message = $lang['Portal_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_portal_config'], '<a href="' . append_sid(PORTAL_URL . "index.$phpEx?page=$portalpage") . '">', '</a>') . "<br /><br />" . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.php?pane=right" ) . '">', '</a>'); } else { ! $message = $lang['Portal_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_portal_config'], '<a href="' . append_sid("admin_mx_block.$phpEx") . '">', '</a>') . "<br /><br />" . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.php?pane=right") . '">', '</a>'); } ! mx_message_die(GENERAL_MESSAGE, $message); } Index: admin_mx_module.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** admin_mx_module.php 26 Apr 2005 22:51:44 -0000 1.29 --- admin_mx_module.php 28 Apr 2005 04:13:49 -0000 1.30 *************** *** 12,16 **** */ ! /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by --- 12,16 ---- */ ! /** * This program is free software; you can redistribute it and/or modify [...3532 lines suppressed...] ! return $output_message; } ! ?> \ No newline at end of file --- 1911,1922 ---- $output_message .= '<font color=#00ff00>[db...ok]</font>'; } ! $output_message .= ' ' . $parameter_row[1] . '-' . $resultset_param[$p]['parameter_id'] . ','; ! } ! ! $output_message .= '<br /> ... ok<br />'; ! return $output_message; } ! ?> \ No newline at end of file Index: admin_mx_page_setting.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_setting.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** admin_mx_page_setting.php 26 Apr 2005 22:51:45 -0000 1.14 --- admin_mx_page_setting.php 28 Apr 2005 04:13:50 -0000 1.15 *************** *** 19,44 **** */ ! $no_page_header = true; ! ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['Portal - Pages']['Page_Setting'] = 'admin/' . $file; return; } [...969 lines suppressed...] ! 'ROW_COLOR' => $row_color, ! 'U_BLOCK_EDIT' => append_sid("admin_mx_block.php?mode=edit_block&block_id=$block_id"), ! 'U_BLOCK_SETTING' => $u_setting, ! 'U_BLOCK_DELETE' => append_sid("admin_mx_page_setting.$phpEx?mode=deleteblock&block_id=$block_id&column_id=$column_id&block_order=$block_order&page_id=$page_id"), ! 'U_BLOCK_MOVE_UP' => append_sid("admin_mx_page_setting.$phpEx?mode=block_order&move=-15&block_id=$block_id&column_id=$column_id&block_order=$block_order&page_id=$page_id"), ! 'U_BLOCK_MOVE_DOWN' => append_sid("admin_mx_page_setting.$phpEx?mode=block_order&move=15&block_id=$block_id&column_id=$column_id&block_order=$block_order&page_id=$page_id"), ! 'U_BLOCK_RESYNC' => append_sid("admin_mx_page_setting.$phpEx?mode=block_sync&block_id=$block_id&column_id=$column_id&page_id=$page_id") ! )); } // if ... column_id == column_id } // for ... blocks } // for ... column } // if ... total_categories ! include_once('./page_header_admin.' . $phpEx); ! $template->pparse('admin_page'); ! include_once('./page_footer_admin.' . $phpEx); ?> \ No newline at end of file Index: admin_mx_page.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** admin_mx_page.php 3 Apr 2005 15:12:50 -0000 1.21 --- admin_mx_page.php 28 Apr 2005 04:13:50 -0000 1.22 *************** *** 19,25 **** */ ! $no_page_header = true; ! ! if ( !empty($setmodules) ) { $module['Portal - Pages']['Page_admin'] = 'admin/' . basename(__FILE__); --- 19,23 ---- */ ! if( !empty($setmodules) ) { $module['Portal - Pages']['Page_admin'] = 'admin/' . basename(__FILE__); *************** *** 27,36 **** } define('IN_PORTAL', 1); ! $mx_root_path = '../'; ! ! // Security and page header - require('./pagestart.php'); // --- 25,37 ---- } + // + // Security and Page header + // define('IN_PORTAL', 1); ! $mx_root_path = './../'; ! require($mx_root_path . 'extension.inc'); ! $no_page_header = TRUE; ! require('./pagestart.' . $phpEx); // *************** *** 41,45 **** ! if ( !empty($mode) ) { switch( $mode ) --- 42,46 ---- ! if( !empty($mode) ) { switch( $mode ) *************** *** 49,62 **** --- 50,67 ---- page_edit($mode, $page_id); break; + case 'create': case 'modify': page_modify($mode, $page_id); break; + case 'delete': page_delete($mode, $page_id); break; + case 'delpage': page_delete($mode, $page_i... [truncated message content] |
|
From: Markus P. <mar...@us...> - 2005-04-27 22:18:00
|
Update of /cvsroot/mxbb/core/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv811/templates/subSilver Modified Files: mx_addon.css Log Message: Reviewed format of several admin ACP templates. Index: mx_addon.css =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/mx_addon.css,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_addon.css 25 Apr 2005 23:56:09 -0000 1.6 --- mx_addon.css 27 Apr 2005 22:17:51 -0000 1.7 *************** *** 1,5 **** ! /* ! Addon or redefined css definitions for mx ! */ /* This is the main table round all portal contents, use with .bodyline */ --- 1,7 ---- ! /************************************************************\ ! | Addon or redefined CSS definitions for mxBB-Portal ! \************************************************************/ ! ! font,td,p { font-size: 11px; color: #000000; } /* This is the main table round all portal contents, use with .bodyline */ *************** *** 9,14 **** /* This is the outline table round the top page header */ .mx_header_table { ! background-color: #ffffff; ! border: 1px solid #ffffff; } --- 11,16 ---- /* This is the outline table round the top page header */ .mx_header_table { ! background-color: #FFFFFF; ! border: 1px solid #FFFFFF; } *************** *** 87,91 **** /* This is the block title style */ ! th.mxthHead { border: 0px; font-size: 12px; --- 89,93 ---- /* This is the block title style */ ! th.mxthHead { border: 0px; font-size: 12px; *************** *** 94,101 **** } ! th.mxthHead_none { background-color: #EFEFEF; height: 0px; background-image: url(); - color: #000066; border: 0px; --- 96,102 ---- } ! th.mxthHead_none { background-color: #EFEFEF; height: 0px; background-image: url(); color: #000066; border: 0px; *************** *** 107,111 **** /* Newssuite - Never enlarge images */ ! img.noenlarge { border: 0px; cursor: hand; --- 108,112 ---- /* Newssuite - Never enlarge images */ ! img.noenlarge { border: 0px; cursor: hand; *************** *** 113,117 **** /* Newssuite - Never enlarge images */ ! div.imagediv { overflow: hidden; margin: 0px; --- 114,118 ---- /* Newssuite - Never enlarge images */ ! div.imagediv { overflow: hidden; margin: 0px; *************** *** 121,125 **** /* Newssuite - Quote & Code blocks */ ! .news_code { font-family: "Courier New", Courier, mono; font-size: 10; --- 122,126 ---- /* Newssuite - Quote & Code blocks */ ! .news_code { font-family: "Courier New", Courier, mono; font-size: 10; *************** *** 127,137 **** /* Customized hr */ ! hr.hrtop { height: 1px; border: solid #000066 1px; border-top-width: 1px;} ! .shadow {color:#00aa00; filter: DropShadow(Color=#660000, OffX=5, OffY=5, Positive=1)} ! img.shadow {color:#00aa00; filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color='gray', Positive='true')} /* For all fold/unfold edit buttons */ ! .newsbutton { font-size: 11px; margin: 0px; --- 128,148 ---- /* Customized hr */ ! hr.hrtop { ! height: 1px; ! border: solid #000066 1px; ! border-top-width: 1px; ! } ! .shadow { ! color: #00AA00; ! filter: DropShadow(Color=#660000, OffX=5, OffY=5, Positive=1); ! } ! img.shadow { ! color: #00AA00; ! filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color='gray', Positive='true'); ! } /* For all fold/unfold edit buttons */ ! .newsbutton { font-size: 11px; margin: 0px; *************** *** 142,182 **** /* Newssuite */ ! .newstitle { font-variant: small-caps; font-weight: bolder; font-size: 8pt; } ! a.newstitle { text-decoration: none; color : #006699; } ! a.newstitle:hover{ text-decoration: underline; color : #DD6900; } /* Newssuite */ ! .newstype { font-weight: lighter; font-size: 5pt; color: #110000; } ! a.newstype { text-decoration: none; color : #006699; } ! a.newstype:hover{ text-decoration: underline; color : #DD6900; } /* Newssuite */ ! .newstype_paper { font-weight: lighter; font-size: 5pt; color: #990000; } ! a.newstype_paper { text-decoration: none; color : #990000; } ! a.newstype_paper:hover{ text-decoration: underline; color : #990000; } /* ...and associated input img style */ input.editblock { ! border-top-width : 0px; ! border-right-width : 0px; ! border-bottom-width : 0px; ! border-left-width : 0px; ! ! margin-bottom:0px; ! margin-top:0px; ! } /* Form elements */ ! form { ! margin-bottom:0px; ! } /* Form elements */ ! form.mx_editform { ! margin-bottom:0px; ! margin-top:0px; ! } ! ! .mxlink { background-color: {T_BODY_BGCOLOR}; border-style: none; font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}} ! p, td { font-size : 12px; color : #000000; } --- 153,227 ---- /* Newssuite */ ! .newstitle { ! font-variant: small-caps; ! font-weight: bolder; ! font-size: 8pt; ! } ! a.newstitle { ! text-decoration: none; ! color: #006699; ! } ! a.newstitle:hover { ! text-decoration: underline; ! color: #DD6900; ! } /* Newssuite */ ! .newstype { ! font-weight: lighter; ! font-size: 5pt; ! color: #110000; ! } ! a.newstype { ! text-decoration: none; ! color: #006699; ! } ! a.newstype:hover{ ! text-decoration: underline; ! color: #DD6900; ! } /* Newssuite */ ! .newstype_paper { ! font-weight: lighter; ! font-size: 5pt; ! color: #990000; ! } ! a.newstype_paper { ! text-decoration: none; ! color: #990000; ! } ! a.newstype_paper:hover{ ! text-decoration: underline; ! color: #990000; ! } /* ...and associated input img style */ input.editblock { ! border-top-width: 0px; ! border-right-width: 0px; ! border-bottom-width: 0px; ! border-left-width: 0px; ! margin-bottom: 0px; ! margin-top: 0px; ! } /* Form elements */ ! form { ! margin-bottom: 0px; ! } /* Form elements */ ! form.mx_editform { ! margin-bottom: 0px; ! margin-top: 0px; ! } ! .mxlink { ! background-color: #E5E5E5; ! border-style: none; ! font-weight: bold; ! font-size: 12px; ! letter-spacing: 1px; ! color: #006699; ! } |
|
From: Markus P. <mar...@us...> - 2005-04-27 21:53:59
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20869/templates/subSilver/admin Modified Files: index_frameset.tpl Log Message: Reviewed format of several admin ACP templates. Index: index_frameset.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/index_frameset.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index_frameset.tpl 27 Apr 2005 21:51:36 -0000 1.3 --- index_frameset.tpl 27 Apr 2005 21:53:48 -0000 1.4 *************** *** 2,9 **** <head> <title>mxBB-Portal Administration</title> ! <meta http-equiv="Content-Type" content="text/html;"> </head> ! <frameset cols="170,*" rows="*" border="2" framespacing="0" frameborder="yes"> <frame src="{S_FRAME_NAV}" name="nav" marginwidth="3" marginheight="3" scrolling="auto" /> <frame src="{S_FRAME_MAIN}" name="main" marginwidth="10" marginheight="10" scrolling="auto" /> --- 2,9 ---- <head> <title>mxBB-Portal Administration</title> ! <meta http-equiv="Content-Type" content="text/html;" /> </head> ! <frameset cols="170,*" rows="*" border="1" framespacing="0" frameborder="yes"> <frame src="{S_FRAME_NAV}" name="nav" marginwidth="3" marginheight="3" scrolling="auto" /> <frame src="{S_FRAME_MAIN}" name="main" marginwidth="10" marginheight="10" scrolling="auto" /> |
|
From: Markus P. <mar...@us...> - 2005-04-27 21:51:48
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19431/templates/subSilver/admin Modified Files: index_body.tpl index_frameset.tpl index_navigate.tpl page_footer.tpl page_header.tpl Log Message: Reviewed format of several admin ACP templates. Index: page_header.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/page_header.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** page_header.tpl 9 Jan 2005 21:55:45 -0000 1.2 --- page_header.tpl 27 Apr 2005 21:51:36 -0000 1.3 *************** *** 3,15 **** <head> {META} ! <meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" /> <!-- First load standard template *.css definition, located in the the phpbb template folder --> ! <link rel="stylesheet" href="{U_PHPBB_ROOT_PATH}{TEMPLATE_ROOT_PATH}{T_HEAD_STYLESHEET}" type="text/css" > <!-- Then load addon template *.css definition for mx, located in the the portal template folder --> ! <link rel="stylesheet" href="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}mx_addon.css" type="text/css" > ! <title>{SITENAME} - {L_MX_ADMIN}</title> </head> <body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}"> ! ! <a name="top"></a> --- 3,13 ---- <head> {META} ! <meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" /> <!-- First load standard template *.css definition, located in the the phpbb template folder --> ! <link rel="stylesheet" href="{U_PHPBB_ROOT_PATH}{TEMPLATE_ROOT_PATH}{T_HEAD_STYLESHEET}" type="text/css" /> <!-- Then load addon template *.css definition for mx, located in the the portal template folder --> ! <link rel="stylesheet" href="{U_PORTAL_ROOT_PATH}{TEMPLATE_ROOT_PATH}mx_addon.css" type="text/css" /> <title>{SITENAME} - {L_MX_ADMIN}</title> </head> <body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}"> ! <a name="top"></a> \ No newline at end of file Index: index_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/index_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index_body.tpl 19 May 2003 19:00:58 -0000 1.1 --- index_body.tpl 27 Apr 2005 21:51:36 -0000 1.2 *************** *** 1,79 **** - <h1>{L_WELCOME}</h1> - <p>{L_ADMIN_INTRO}</p> - <h1>{L_FORUM_STATS}</h1> - <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th width="25%" nowrap="nowrap" height="25" class="thCornerL">{L_STATISTIC}</th> ! <th width="25%" height="25" class="thTop">{L_VALUE}</th> ! <th width="25%" nowrap="nowrap" height="25" class="thTop">{L_STATISTIC}</th> ! <th width="25%" height="25" class="thCornerR">{L_VALUE}</th> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_NUMBER_POSTS}:</td> ! <td class="row2"><b>{NUMBER_OF_POSTS}</b></td> ! <td class="row1" nowrap="nowrap">{L_POSTS_PER_DAY}:</td> ! <td class="row2"><b>{POSTS_PER_DAY}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_NUMBER_TOPICS}:</td> ! <td class="row2"><b>{NUMBER_OF_TOPICS}</b></td> ! <td class="row1" nowrap="nowrap">{L_TOPICS_PER_DAY}:</td> ! <td class="row2"><b>{TOPICS_PER_DAY}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_NUMBER_USERS}:</td> ! <td class="row2"><b>{NUMBER_OF_USERS}</b></td> ! <td class="row1" nowrap="nowrap">{L_USERS_PER_DAY}:</td> ! <td class="row2"><b>{USERS_PER_DAY}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_BOARD_STARTED}:</td> ! <td class="row2"><b>{START_DATE}</b></td> ! <td class="row1" nowrap="nowrap">{L_AVATAR_DIR_SIZE}:</td> ! <td class="row2"><b>{AVATAR_DIR_SIZE}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_DB_SIZE}:</td> ! <td class="row2"><b>{DB_SIZE}</b></td> ! <td class="row1" nowrap="nowrap">{L_GZIP_COMPRESSION}:</td> ! <td class="row2"><b>{GZIP_COMPRESSION}</b></td> ! </tr> </table> <h1>{L_WHO_IS_ONLINE}</h1> - <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th width="20%" class="thCornerL" height="25"> {L_USERNAME} </th> ! <th width="20%" height="25" class="thTop"> {L_STARTED} </th> ! <th width="20%" class="thTop"> {L_LAST_UPDATE} </th> ! <th width="20%" class="thCornerR"> {L_FORUM_LOCATION} </th> ! <th width="20%" height="25" class="thCornerR"> {L_IP_ADDRESS} </th> ! </tr> ! <!-- BEGIN reg_user_row --> ! <tr> ! <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_USER_PROFILE}" class="gen">{reg_user_row.USERNAME}</a></span> </td> ! <td width="20%" align="center" class="{reg_user_row.ROW_CLASS}"> <span class="gen">{reg_user_row.STARTED}</span> </td> ! <td width="20%" align="center" nowrap="nowrap" class="{reg_user_row.ROW_CLASS}"> <span class="gen">{reg_user_row.LASTUPDATE}</span> </td> ! <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_FORUM_LOCATION}" class="gen">{reg_user_row.FORUM_LOCATION}</a></span> </td> ! <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_WHOIS_IP}" class="gen" target="_phpbbwhois">{reg_user_row.IP_ADDRESS}</a></span> </td> ! </tr> ! <!-- END reg_user_row --> ! <tr> ! <td colspan="5" height="1" class="row3"><img src="{U_PHPBB_ROOT_PATH}{TEMPLATE_ROOT_PATH}spacer.gif" width="1" height="1" alt="."></td> ! </tr> ! <!-- BEGIN guest_user_row --> ! <tr> ! <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.USERNAME}</span> </td> ! <td width="20%" align="center" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.STARTED}</span> </td> ! <td width="20%" align="center" nowrap="nowrap" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.LASTUPDATE}</span> </td> ! <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen"><a href="{guest_user_row.U_FORUM_LOCATION}" class="gen">{guest_user_row.FORUM_LOCATION}</a></span> </td> ! <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen"><a href="{guest_user_row.U_WHOIS_IP}" target="_phpbbwhois">{guest_user_row.IP_ADDRESS}</a></span> </td> ! </tr> ! <!-- END guest_user_row --> </table> ! ! <br /> --- 1,73 ---- <h1>{L_WELCOME}</h1> <p>{L_ADMIN_INTRO}</p> <h1>{L_FORUM_STATS}</h1> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th width="25%" nowrap="nowrap" height="25" class="thCornerL">{L_STATISTIC}</th> ! <th width="25%" height="25" class="thTop">{L_VALUE}</th> ! <th width="25%" nowrap="nowrap" height="25" class="thTop">{L_STATISTIC}</th> ! <th width="25%" height="25" class="thCornerR">{L_VALUE}</th> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_NUMBER_POSTS}:</td> ! <td class="row2"><b>{NUMBER_OF_POSTS}</b></td> ! <td class="row1" nowrap="nowrap">{L_POSTS_PER_DAY}:</td> ! <td class="row2"><b>{POSTS_PER_DAY}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_NUMBER_TOPICS}:</td> ! <td class="row2"><b>{NUMBER_OF_TOPICS}</b></td> ! <td class="row1" nowrap="nowrap">{L_TOPICS_PER_DAY}:</td> ! <td class="row2"><b>{TOPICS_PER_DAY}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_NUMBER_USERS}:</td> ! <td class="row2"><b>{NUMBER_OF_USERS}</b></td> ! <td class="row1" nowrap="nowrap">{L_USERS_PER_DAY}:</td> ! <td class="row2"><b>{USERS_PER_DAY}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_BOARD_STARTED}:</td> ! <td class="row2"><b>{START_DATE}</b></td> ! <td class="row1" nowrap="nowrap">{L_AVATAR_DIR_SIZE}:</td> ! <td class="row2"><b>{AVATAR_DIR_SIZE}</b></td> ! </tr> ! <tr> ! <td class="row1" nowrap="nowrap">{L_DB_SIZE}:</td> ! <td class="row2"><b>{DB_SIZE}</b></td> ! <td class="row1" nowrap="nowrap">{L_GZIP_COMPRESSION}:</td> ! <td class="row2"><b>{GZIP_COMPRESSION}</b></td> ! </tr> </table> <h1>{L_WHO_IS_ONLINE}</h1> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th width="20%" class="thCornerL" height="25"> {L_USERNAME} </th> ! <th width="20%" height="25" class="thTop"> {L_STARTED} </th> ! <th width="20%" class="thTop"> {L_LAST_UPDATE} </th> ! <th width="20%" class="thCornerR"> {L_FORUM_LOCATION} </th> ! <th width="20%" height="25" class="thCornerR"> {L_IP_ADDRESS} </th> ! </tr> ! <!-- BEGIN reg_user_row --> ! <tr> ! <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_USER_PROFILE}" class="gen">{reg_user_row.USERNAME}</a></span> </td> ! <td width="20%" align="center" class="{reg_user_row.ROW_CLASS}"> <span class="gen">{reg_user_row.STARTED}</span> </td> ! <td width="20%" align="center" nowrap="nowrap" class="{reg_user_row.ROW_CLASS}"> <span class="gen">{reg_user_row.LASTUPDATE}</span> </td> ! <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_FORUM_LOCATION}" class="gen">{reg_user_row.FORUM_LOCATION}</a></span> </td> ! <td width="20%" class="{reg_user_row.ROW_CLASS}"> <span class="gen"><a href="{reg_user_row.U_WHOIS_IP}" class="gen" target="_phpbbwhois">{reg_user_row.IP_ADDRESS}</a></span> </td> ! </tr> ! <!-- END reg_user_row --> ! <tr> ! <td colspan="5" height="1" class="row3"><img src="{U_PHPBB_ROOT_PATH}{TEMPLATE_ROOT_PATH}spacer.gif" width="1" height="1" alt="."></td> ! </tr> ! <!-- BEGIN guest_user_row --> ! <tr> ! <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.USERNAME}</span> </td> ! <td width="20%" align="center" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.STARTED}</span> </td> ! <td width="20%" align="center" nowrap="nowrap" class="{guest_user_row.ROW_CLASS}"> <span class="gen">{guest_user_row.LASTUPDATE}</span> </td> ! <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen"><a href="{guest_user_row.U_FORUM_LOCATION}" class="gen">{guest_user_row.FORUM_LOCATION}</a></span> </td> ! <td width="20%" class="{guest_user_row.ROW_CLASS}"> <span class="gen"><a href="{guest_user_row.U_WHOIS_IP}" target="_phpbbwhois">{guest_user_row.IP_ADDRESS}</a></span> </td> ! </tr> ! <!-- END guest_user_row --> </table> ! <br clear="all" /> \ No newline at end of file Index: page_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/page_footer.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** page_footer.tpl 20 Apr 2005 01:12:21 -0000 1.5 --- page_footer.tpl 27 Apr 2005 21:51:36 -0000 1.6 *************** *** 1,3 **** - <!-- --- 1,2 ---- Index: index_frameset.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/index_frameset.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index_frameset.tpl 26 Apr 2005 01:11:49 -0000 1.2 --- index_frameset.tpl 27 Apr 2005 21:51:36 -0000 1.3 *************** *** 5,11 **** </head> ! <frameset cols="170,*" rows="*" border="2" framespacing="0" frameborder="yes"> ! <frame src="{S_FRAME_NAV}" name="nav" marginwidth="3" marginheight="3" scrolling="auto"> ! <frame src="{S_FRAME_MAIN}" name="main" marginwidth="10" marginheight="10" scrolling="auto"> </frameset> --- 5,11 ---- </head> ! <frameset cols="170,*" rows="*" border="2" framespacing="0" frameborder="yes"> ! <frame src="{S_FRAME_NAV}" name="nav" marginwidth="3" marginheight="3" scrolling="auto" /> ! <frame src="{S_FRAME_MAIN}" name="main" marginwidth="10" marginheight="10" scrolling="auto" /> </frameset> Index: index_navigate.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/index_navigate.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index_navigate.tpl 22 Sep 2003 18:05:13 -0000 1.2 --- index_navigate.tpl 27 Apr 2005 21:51:36 -0000 1.3 *************** *** 1,93 **** - <table width="100%" cellpadding="4" cellspacing="0" border="0" align="center"> ! <tr> ! <td align="center" ><a href="{U_FORUM_INDEX}" target="_parent"><img src="{U_PHPBB_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/logo_phpBB_med.gif" border="0" /></a></td> ! </tr> ! <tr> ! <td align="center" > ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th height="25" class="thHead"><b>{L_ADMIN}</b></th> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_ADMIN_INDEX}" target="main" class="genmed">{L_ADMIN_INDEX}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_PORTAL_INDEX}" target="_parent" class="genmed">{L_PORTAL_INDEX}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_FORUM_INDEX}" target="_parent" class="genmed">{L_FORUM_INDEX}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_FORUM_INDEX}" target="main" class="genmed">{L_PREVIEW_FORUM}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_PORTAL_INDEX}" target="main" class="genmed">{L_PREVIEW_PORTAL}</a></span></td> ! </tr> ! </table> ! <br /> ! <!-- BEGIN module_portal --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th height="25" class="thHead"><b>{module_portal.L_MX_PORTAL}</b></th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td height="28" class="catSides"><span class="cattitle">{module_portal.catrow.ADMIN_CATEGORY}</span></td> ! </tr> ! <!-- BEGIN modulerow --> ! <tr> ! <td class="row1"><span class="genmed"><a href="{module_portal.catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed">{module_portal.catrow.modulerow.ADMIN_MODULE}</a></span> ! </td> ! </tr> ! <!-- END modulerow --> ! <!-- END catrow --> ! </table> ! <br /> ! <!-- END module_portal --> ! ! <!-- BEGIN module_mx --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th height="25" class="thHead"><b>{module_mx.L_MX_MODULES}</b></th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td height="28" class="catSides"><span class="cattitle">{module_mx.catrow.ADMIN_CATEGORY}</span></td> ! </tr> ! <!-- BEGIN modulerow --> ! <tr> ! <td class="row1"><span class="genmed"><a href="{module_mx.catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed">{module_mx.catrow.modulerow.ADMIN_MODULE}</a></span> ! </td> ! </tr> ! <!-- END modulerow --> ! <!-- END catrow --> ! </table> ! <br /> ! <!-- END module_mx --> ! ! <!-- BEGIN module_phpbb --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th height="25" class="thHead"><b>{module_phpbb.L_PHPBB}</b></th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td height="28" class="catSides"><span class="cattitle">{module_phpbb.catrow.ADMIN_CATEGORY}</span></td> ! </tr> ! <!-- BEGIN modulerow --> ! <tr> ! <td class="row1"><span class="genmed"><a href="{module_phpbb.catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed">{module_phpbb.catrow.modulerow.ADMIN_MODULE}</a></span> ! </td> ! </tr> ! <!-- END modulerow --> ! <!-- END catrow --> ! </table> ! <br /> ! <!-- END module_phpbb --> ! ! </td> ! </tr> ! </table> ! ! <br /> --- 1,92 ---- <table width="100%" cellpadding="4" cellspacing="0" border="0" align="center"> ! <tr> ! <td align="center" ><a href="{U_FORUM_INDEX}" target="_parent"><img src="{U_PHPBB_ROOT_PATH}{TEMPLATE_ROOT_PATH}images/logo_phpBB_med.gif" border="0" /></a></td> ! </tr> ! <tr> ! <td align="center" > ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead"><b>{L_ADMIN}</b></th> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_ADMIN_INDEX}" target="main" class="genmed">{L_ADMIN_INDEX}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_PORTAL_INDEX}" target="_parent" class="genmed">{L_PORTAL_INDEX}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_FORUM_INDEX}" target="_parent" class="genmed">{L_FORUM_INDEX}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_FORUM_INDEX}" target="main" class="genmed">{L_PREVIEW_FORUM}</a></span></td> ! </tr> ! <tr> ! <td class="row1"><span class="genmed"><a href="{U_PORTAL_INDEX}" target="main" class="genmed">{L_PREVIEW_PORTAL}</a></span></td> ! </tr> ! </table> ! </td> ! </tr> ! <tr> ! <td align="center" > ! <!-- BEGIN module_portal --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead"><b>{module_portal.L_MX_PORTAL}</b></th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td class="catSides"><span class="cattitle">{module_portal.catrow.ADMIN_CATEGORY}</span></td> ! </tr> ! <!-- BEGIN modulerow --> ! <tr> ! <td class="row1"><span class="genmed"><a href="{module_portal.catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed">{module_portal.catrow.modulerow.ADMIN_MODULE}</a></span></td> ! </tr> ! <!-- END modulerow --> ! <!-- END catrow --> ! </table> ! <!-- END module_portal --> ! </td> ! </tr> ! <tr> ! <td align="center" > ! <!-- BEGIN module_mx --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead"><b>{module_mx.L_MX_MODULES}</b></th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td class="catSides"><span class="cattitle">{module_mx.catrow.ADMIN_CATEGORY}</span></td> ! </tr> ! <!-- BEGIN modulerow --> ! <tr> ! <td class="row1"><span class="genmed"><a href="{module_mx.catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed">{module_mx.catrow.modulerow.ADMIN_MODULE}</a></span></td> ! </tr> ! <!-- END modulerow --> ! <!-- END catrow --> ! </table> ! <!-- END module_mx --> ! </td> ! </tr> ! <tr> ! <td align="center" > ! <!-- BEGIN module_phpbb --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead"><b>{module_phpbb.L_PHPBB}</b></th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td class="catSides"><span class="cattitle">{module_phpbb.catrow.ADMIN_CATEGORY}</span></td> ! </tr> ! <!-- BEGIN modulerow --> ! <tr> ! <td class="row1"><span class="genmed"><a href="{module_phpbb.catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed">{module_phpbb.catrow.modulerow.ADMIN_MODULE}</a></span></td> ! </tr> ! <!-- END modulerow --> ! <!-- END catrow --> ! </table> ! <!-- END module_phpbb --> ! </td> ! </tr> ! </table> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-26 22:51:54
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5268 Modified Files: admin_mx_chkobjs.php admin_mx_menu.php admin_mx_module.php admin_mx_page_setting.php Log Message: Minimizing duplicated function names in ACP. This is the first step to make something compatible with PHP5. ;-) Index: admin_mx_chkobjs.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_chkobjs.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_mx_chkobjs.php 19 Apr 2005 21:05:20 -0000 1.8 --- admin_mx_chkobjs.php 26 Apr 2005 22:51:44 -0000 1.9 *************** *** 170,174 **** case 'db_delete': $sql = "DELETE FROM ".$table." WHERE $key0 = $val0 AND $key1 = $val1"; ! if( !dbQuery($sql) ) { message_die(GENERAL_ERROR, "Couldn't DELETE data from table : " . $table, --- 170,174 ---- case 'db_delete': $sql = "DELETE FROM ".$table." WHERE $key0 = $val0 AND $key1 = $val1"; ! if( !chkobjs_dbQuery($sql) ) { message_die(GENERAL_ERROR, "Couldn't DELETE data from table : " . $table, *************** *** 260,264 **** else { ! if( !($field_value = dbFetchField($ftab[$i], $field.'='.$row[$field], $fnam[$i])) ) { $field_key = '<font color=red><b>'.$row[$field].'</b></font>'; --- 260,264 ---- else { ! if( !($field_value = chkobjs_dbFetchField($ftab[$i], $field.'='.$row[$field], $fnam[$i])) ) { $field_key = '<font color=red><b>'.$row[$field].'</b></font>'; *************** *** 303,315 **** // DB Utilities // ! function dbFetchField($tbname, $where, $field) { $sql = "SELECT * FROM ".$tbname." WHERE ".$where; ! if( !($row = dbFetchRow($sql)) ) return false; return $row[$field]; } ! function dbFetchRow($sql) { global $db; --- 303,315 ---- // DB Utilities // ! function chkobjs_dbFetchField($tbname, $where, $field) { $sql = "SELECT * FROM ".$tbname." WHERE ".$where; ! if( !($row = chkobjs_dbFetchRow($sql)) ) return false; return $row[$field]; } ! function chkobjs_dbFetchRow($sql) { global $db; *************** *** 321,325 **** } ! function dbQuery($sql) { global $db; --- 321,325 ---- } ! function chkobjs_dbQuery($sql) { global $db; Index: admin_mx_menu.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_menu.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** admin_mx_menu.php 17 Mar 2005 11:30:34 -0000 1.21 --- admin_mx_menu.php 26 Apr 2005 22:51:44 -0000 1.22 *************** *** 105,109 **** } ! function renumber_order( $mode, $cat = 0 ) { global $db, $portalpage; --- 105,109 ---- } ! function renumber_menu_order( $mode, $cat = 0 ) { global $db, $portalpage; *************** *** 1030,1034 **** } ! renumber_order( 'menu', $menu_info['cat_id'] ); $show_index = true; --- 1030,1034 ---- } ! renumber_menu_order( 'menu', $menu_info['cat_id'] ); $show_index = true; *************** *** 1050,1054 **** } ! renumber_order( 'category' ); $show_index = true; --- 1050,1054 ---- } ! renumber_menu_order( 'category' ); $show_index = true; Index: admin_mx_page_setting.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_setting.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_mx_page_setting.php 6 Mar 2005 01:10:13 -0000 1.13 --- admin_mx_page_setting.php 26 Apr 2005 22:51:45 -0000 1.14 *************** *** 71,75 **** } ! function renumber_order( $mode, $column = 0, $page_id ) { global $db; --- 71,75 ---- } ! function renumber_page_order( $mode, $column = 0, $page_id ) { global $db; *************** *** 180,184 **** } ! renumber_order( 'block', $column_id, $page_id ); $show_index = true; --- 180,184 ---- } ! renumber_page_order( 'block', $column_id, $page_id ); $show_index = true; *************** *** 203,207 **** } ! renumber_order( 'column', 0, $page_id ); $show_index = true; --- 203,207 ---- } ! renumber_page_order( 'column', 0, $page_id ); $show_index = true; *************** *** 234,238 **** } ! renumber_order( 'block', $column_id, $page_id ); $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_setting.php?page_id=$page_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); --- 234,238 ---- } ! renumber_page_order( 'block', $column_id, $page_id ); $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_setting.php?page_id=$page_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); Index: admin_mx_module.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** admin_mx_module.php 13 Apr 2005 21:08:55 -0000 1.28 --- admin_mx_module.php 26 Apr 2005 22:51:44 -0000 1.29 *************** *** 888,892 **** // DB Utilities // ----------------------------------------------------------------- ! function dbFetchRow( $sql ) { global $db; --- 888,892 ---- // DB Utilities // ----------------------------------------------------------------- ! function moduleACP_dbFetchRow( $sql ) { global $db; *************** *** 905,914 **** }; ! function getMaxId( $table_name, $table_key ) { global $db; $sql = "SELECT max(" . $table_key . ") AS max_id FROM " . $table_name; ! if ( !$row = dbFetchRow( $sql ) ) return -1; return $row['max_id']; --- 905,914 ---- }; ! function moduleACP_getMaxId( $table_name, $table_key ) { global $db; $sql = "SELECT max(" . $table_key . ") AS max_id FROM " . $table_name; ! if ( !$row = moduleACP_dbFetchRow( $sql ) ) return -1; return $row['max_id']; *************** *** 948,956 **** global $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS, $delimeter; ! $module_id_max = getMaxId( MODULE_TABLE, 'module_id' ); ! $function_id_max = getMaxId( FUNCTION_TABLE, 'function_id' ); ! $parameter_id_max = getMaxId( PARAMETER_TABLE, 'parameter_id' ); ! $option_id_max = getMaxId( PARAMETER_OPTION_TABLE, 'option_id' ); ! $block_id_max = getMaxId( BLOCK_TABLE, 'block_id' ); $upgrade_module = false; // not really used --- 948,956 ---- global $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS, $delimeter; ! $module_id_max = moduleACP_getMaxId( MODULE_TABLE, 'module_id' ); ! $function_id_max = moduleACP_getMaxId( FUNCTION_TABLE, 'function_id' ); ! $parameter_id_max = moduleACP_getMaxId( PARAMETER_TABLE, 'parameter_id' ); ! $option_id_max = moduleACP_getMaxId( PARAMETER_OPTION_TABLE, 'option_id' ); ! $block_id_max = moduleACP_getMaxId( BLOCK_TABLE, 'block_id' ); $upgrade_module = false; // not really used |
|
From: Markus P. <mar...@us...> - 2005-04-26 22:42:56
|
Update of /cvsroot/mxbb/core/modules/mx_last_msg/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32329/admin Removed Files: admin_mx_last_msg.php Log Message: Code cleanup and template issues fixed in mx_last_msg. --- admin_mx_last_msg.php DELETED --- |
|
From: Markus P. <mar...@us...> - 2005-04-26 22:37:32
|
Update of /cvsroot/mxbb/core/modules/mx_last_msg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29338 Modified Files: mx_last_msg.php Log Message: Code cleanup and template issues fixed in mx_last_msg. Index: mx_last_msg.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_last_msg/mx_last_msg.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_last_msg.php 11 Feb 2005 22:06:21 -0000 1.12 --- mx_last_msg.php 26 Apr 2005 22:37:21 -0000 1.13 *************** *** 13,17 **** */ ! /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by --- 13,17 ---- */ ! /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by *************** *** 19,58 **** * ('at your option) any later version. */ - - $block_config = read_block_config( $block_id ); - $title = $block_config[$block_id]['block_title']; ! $block_size = ( !empty( $block_size ) ? $block_size : '100%' ); ! ! if ( $view_page ) ! { ! $template->set_filenames( array( "body_last_msg" => "mx_last_msg_view.tpl" ) ); ! } ! else { ! $template->set_filenames( array( "body_last_msg" => "mx_last_msg.tpl" ) ); } // Read block Configuration ! $PostNumber = $block_config[$block_id][Last_Msg_Number_Title]['parameter_value']; ! $display_date = $block_config[$block_id][Last_Msg_Display_Date]['parameter_value']; ! $nb_characteres = $block_config[$block_id][Last_Msg_Title_Length]['parameter_value']; ! $target = $block_config[$block_id][Last_Msg_Target]['parameter_value']; ! $align = $block_config[$block_id][Last_Msg_Align]['parameter_value']; ! $display_forum = $block_config[$block_id][Last_Msg_Display_Forum]['parameter_value']; ! $forum_lst_msg = $block_config[$block_id][Last_Msg_forum]['parameter_value']; ! if ( empty( $PostNumber ) ) $PostNumber = 5; ! $display_author = $block_config[$block_id][Last_Msg_Display_Author]['parameter_value']; ! $display_last_author = $block_config[$block_id][Last_Msg_Display_Last_Author]['parameter_value']; ! $display_icon_view = $block_config[$block_id][Last_Msg_Display_Icon_View]['parameter_value']; ! $msg_filter_time = $block_config[$block_id][msg_filter_date]['parameter_value']; // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, ! // ********************************************************************** // Read language definition ! // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { --- 19,64 ---- * ('at your option) any later version. */ ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } + + // // Read block Configuration + // + $block_config = read_block_config($block_id); + $title = $block_config[$block_id]['block_title']; ! $template->set_filenames(array( ! 'body_last_msg' => 'mx_last_msg.tpl') ! ); ! // ! // Read block Configuration ! // ! $PostNumber = $block_config[$block_id]['Last_Msg_Number_Title']['parameter_value']; ! $display_date = $block_config[$block_id]['Last_Msg_Display_Date']['parameter_value']; ! $nb_characteres = $block_config[$block_id]['Last_Msg_Title_Length']['parameter_value']; ! $target = $block_config[$block_id]['Last_Msg_Target']['parameter_value']; ! $align = $block_config[$block_id]['Last_Msg_Align']['parameter_value']; ! $display_forum = $block_config[$block_id]['Last_Msg_Display_Forum']['parameter_value']; ! $forum_lst_msg = $block_config[$block_id]['Last_Msg_forum']['parameter_value']; ! if( empty($PostNumber) ) $PostNumber = 5; ! $display_author = $block_config[$block_id]['Last_Msg_Display_Author']['parameter_value']; ! $display_last_author = $block_config[$block_id]['Last_Msg_Display_Last_Author']['parameter_value']; ! $display_icon_view = $block_config[$block_id]['Last_Msg_Display_Icon_View']['parameter_value']; ! // ! // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, ! // ! $msg_filter_time = $block_config[$block_id]['msg_filter_date']['parameter_value']; ! ! // // Read language definition ! // if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { *************** *** 64,77 **** } // Authorization SQL ! $auth_data_sql_msg = get_auth_forum(); ! if ( empty( $forum_lst_msg ) ) { $forum_lst_msg = $auth_data_sql_msg; } ! // Added for 2.705 ! if ( empty( $forum_lst_msg ) ) { $forum_lst_msg = -1; --- 70,83 ---- } + // // Authorization SQL ! // $auth_data_sql_msg = get_auth_forum(); ! if ( empty($forum_lst_msg) ) { $forum_lst_msg = $auth_data_sql_msg; } ! if ( empty($forum_lst_msg) ) { $forum_lst_msg = -1; *************** *** 83,176 **** $start_next = $msg_start + $PostNumber; ! if ( $view_page ) ! { ! $url_next = append_sid( PORTAL_URL . 'index.php' . '?lmsg_start=' . $start_next . '&block_id=' . $block_id ); ! $url_prev = append_sid( PORTAL_URL . 'index.php' . '?lmsg_start=' . $start_prev . '&block_id=' . $block_id ); ! } ! else ! { ! $url_next = mx_url( 'lmsg_start' , $start_next ); // append_sid( $URL_INDEX . ( ( strpos($URL_INDEX, '?') != false ) ? '&' : '?' ) . 'lmsg_start=' . $start_next ); ! $url_prev = mx_url( 'lmsg_start' , $start_prev ); // append_sid( $URL_INDEX . ( ( strpos($URL_INDEX, '?') != false ) ? '&' : '?' ) . 'lmsg_start=' . $start_prev ); ! } ! ! $GetType = "topics"; // posts ou topics ! ! // $private = "USER"; ! $timediff = 0; // Différence de temps entre le serveur et l'heure du forum en heures, en clair si votre forum est reglé sur GMT et que vous habitez en France il suffit de mettre 0 pour qu'il se regle sur le fuseau français (a verfifier selon les cas)(GMT+1) ! // if ( $private == "USER") { ! // $private1 = " AND f.auth_view < 1"; ! // } ! // elseif ( $private == "PRIVATE") { ! // $private1 = " AND f.auth_view < 2"; ! // } ! // elseif ( $private == "MODO") { ! // $private1 = " AND f.auth_view <3"; ! // } ! // elseif ( $private == "ADMIN") { ! // $private1 = " AND f.auth_view <5"; ! // } ! // else { ! // $private =""; ! // } ! $msg_today = date('mdY'); ! switch ( $msg_filter_time ) ! { case '0': ! $msg_time_filter_lo = "no"; break; case '1': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4)) ); break; case '2': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4)) ); break; case '3': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4)) ); ! break; case '4': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 7), intval(substr($msg_today, 4, 4)) ); ! break; case '5': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 14), intval(substr($msg_today, 4, 4)) ); break; case '6': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 21), intval(substr($msg_today, 4, 4)) ); break; case '7': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 1), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); ! break; case '8': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 2), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); break; case '9': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 3), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); break; case '10': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2) - 6), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4)) ); break; case '11': ! $msg_time_filter_lo = mktime ( 0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4) - 1) ); break; default: ! $msg_time_filter_lo = "no"; break; } $sql = "SELECT COUNT(*) AS msg_num ! FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p ! WHERE p.post_id = t.topic_last_post_id ! AND t.forum_id in ( $forum_lst_msg ) ! AND t.forum_id in ( $auth_data_sql_msg ) ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo ; ! } if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql); } --- 89,154 ---- $start_next = $msg_start + $PostNumber; ! $url_next = mx_url('lmsg_start' , $start_next); ! $url_prev = mx_url('lmsg_start' , $start_prev); ! $msg_today = date('mdY'); ! switch( $msg_filter_time ) ! { case '0': ! $msg_time_filter_lo = 'no'; break; case '1': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4))); break; case '2': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4))); break; case '3': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 1), intval(substr($msg_today, 4, 4))); ! break; case '4': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 7), intval(substr($msg_today, 4, 4))); ! break; case '5': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 14), intval(substr($msg_today, 4, 4))); break; case '6': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2) - 21), intval(substr($msg_today, 4, 4))); break; case '7': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 1), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); ! break; case '8': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 2), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); break; case '9': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 3), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); break; case '10': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2) - 6), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4))); break; case '11': ! $msg_time_filter_lo = mktime(0, 0, 0 , intval(substr($msg_today, 0, 2)), intval(substr($msg_today, 2, 2)), intval(substr($msg_today, 4, 4) - 1)); break; default: ! $msg_time_filter_lo = 'no'; break; } $sql = "SELECT COUNT(*) AS msg_num ! FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p ! WHERE p.post_id = t.topic_last_post_id ! AND t.forum_id in ( $forum_lst_msg ) ! AND t.forum_id in ( $auth_data_sql_msg ) ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo; ! } if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql); } *************** *** 179,240 **** $sql = "SELECT t.topic_title, p.topic_id, t.topic_last_post_id, p.post_time, f.forum_name, f.forum_id, ! u.username, u.user_id, p.post_username, u2.username as user2, u2.user_id as id2 ! FROM " . TOPICS_TABLE . " AS t, ! " . FORUMS_TABLE . " AS f, ! " . POSTS_TABLE . " AS p, ! " . USERS_TABLE . " AS u, ! " . USERS_TABLE . " AS u2 ! WHERE f.forum_id = t.forum_id ! AND t.topic_poster = u.user_id ! AND p.post_id = t.topic_last_post_id ! AND p.poster_id = u2.user_id ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo ; ! } ! ! $sql .= " AND f.forum_id in ( $forum_lst_msg ) ! AND f.forum_id in ( $auth_data_sql_msg ) ! ORDER BY t.topic_last_post_id DESC ! LIMIT $msg_start, $PostNumber"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not query topics list', '', __LINE__, __FILE__, $sql ); } ! $postrow = $db->sql_fetchrowset( $result ); $base_url = mx_this_url(); ! $template->assign_vars( array( ! // 'L_TITLE' => ( !empty( $lang['Latest_Post'] ) ? $lang['Latest_Post'] : 'Last Message' ), ! 'L_TITLE' => ( !empty( $title ) ? $title : 'Last Message' ), ! 'U_TARGET' => $target, ! 'U_ALIGN' => $align, ! 'BLOCK_SIZE' => $block_size, ! 'U_URL' => append_sid( PORTAL_URL . 'index.php' . '?block_id=' . $block_id ), ! 'U_URL_NEXT' => $url_next, ! 'U_URL_PREV' => $url_prev, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_MSG_PREV' => $lang['Previous'], ! 'L_MSG_NEXT' => $lang['Next'], ! 'PAGINATION' => mx_generate_pagination( $base_url, $msg_total_match_count, $PostNumber, $msg_start, true, true, true, false, 'lmsg_start' ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $msg_start / $PostNumber ) + 1 ), ceil( $msg_total_match_count / $PostNumber ) ) ! ) ); ! if ( $msg_total_match_count == 0 || $msg_total_match_count == '') { ! $template->assign_block_vars("no_row", array( 'L_NO_ITEMS' => $lang['No_items_found'] ! ) ! ); } ! ! for( $row_count = 0; $row_count < count( $postrow ); $row_count++ ) { $row_color = ( !( $row_count % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; --- 157,217 ---- $sql = "SELECT t.topic_title, p.topic_id, t.topic_last_post_id, p.post_time, f.forum_name, f.forum_id, ! u.username, u.user_id, p.post_username, u2.username as user2, u2.user_id as id2 ! FROM " . TOPICS_TABLE . " AS t, ! " . FORUMS_TABLE . " AS f, ! " . POSTS_TABLE . " AS p, ! " . USERS_TABLE . " AS u, ! " . USERS_TABLE . " AS u2 ! WHERE f.forum_id = t.forum_id ! AND t.topic_poster = u.user_id ! AND p.post_id = t.topic_last_post_id ! AND p.poster_id = u2.user_id ! AND t.topic_moved_id = 0"; if ( $msg_time_filter_lo != 'no' && !empty($msg_time_filter_lo) ) ! { ! $sql .= " AND p.post_time > " . $msg_time_filter_lo; ! } ! $sql .= " AND f.forum_id in ( $forum_lst_msg ) ! AND f.forum_id in ( $auth_data_sql_msg ) ! ORDER BY t.topic_last_post_id DESC ! LIMIT $msg_start, $PostNumber"; ! ! if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not query topics list', '', __LINE__, __FILE__, $sql); } ! $postrow = $db->sql_fetchrowset($result); $base_url = mx_this_url(); ! $template->assign_vars(array( ! // 'L_TITLE' => ( !empty($lang['Latest_Post']) ? $lang['Latest_Post'] : 'Last Message' ), ! 'L_TITLE' => ( !empty($title) ? $title : 'Last Message' ), ! 'U_TARGET' => $target, ! 'U_ALIGN' => $align, ! 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), ! 'U_URL' => append_sid(PORTAL_URL . 'index.php' . '?block_id=' . $block_id), ! 'U_URL_NEXT' => $url_next, ! 'U_URL_PREV' => $url_prev, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_MSG_PREV' => $lang['Previous'], ! 'L_MSG_NEXT' => $lang['Next'], ! 'PAGINATION' => mx_generate_pagination($base_url, $msg_total_match_count, $PostNumber, $msg_start, true, true, true, false, 'lmsg_start'), ! 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor($msg_start / $PostNumber) + 1 ), ceil($msg_total_match_count / $PostNumber)) ! )); ! if ( $msg_total_match_count == 0 || $msg_total_match_count == '' ) { ! $template->assign_block_vars("no_row", array( 'L_NO_ITEMS' => $lang['No_items_found'] ! )); } ! ! for( $row_count = 0; $row_count < count($postrow); $row_count++ ) { $row_color = ( !( $row_count % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; *************** *** 242,246 **** $message = $postrow[$row_count]['topic_title']; ! $url = append_sid( PHPBB_URL . 'viewtopic.php?t=' . $postrow[$row_count]['topic_id'] . '#' . $postrow[$row_count]['topic_last_post_id'] ); if ( $postrow[$row_count]['topic_status'] == TOPIC_MOVED ) --- 219,223 ---- $message = $postrow[$row_count]['topic_title']; ! $url = append_sid(PHPBB_URL . 'viewtopic.php?t=' . $postrow[$row_count]['topic_id'] . '#' . $postrow[$row_count]['topic_last_post_id']); if ( $postrow[$row_count]['topic_status'] == TOPIC_MOVED ) *************** *** 325,329 **** $folder_alt = $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid( "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest" ) . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } else --- 302,306 ---- $folder_alt = $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } else *************** *** 340,344 **** $folder_alt = ( $postrow[$row_count]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid( "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest" ) . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } } --- 317,321 ---- $folder_alt = ( $postrow[$row_count]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts']; ! $newest_post_img = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } } *************** *** 360,366 **** } ! IF ( $display_author == "TRUE" ) { ! $topic_author = ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['user_id'] ) . '">' : ''; $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? $postrow[$row_count]['username'] : ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] : $lang['Guest'] ); $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '</a>' : ''; --- 337,343 ---- } ! if ( $display_author == "TRUE" ) { ! $topic_author = ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['user_id']) . '">' : ''; $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? $postrow[$row_count]['username'] : ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] : $lang['Guest'] ); $topic_author .= ( $postrow[$row_count]['user_id'] != ANONYMOUS ) ? '</a>' : ''; *************** *** 373,377 **** if ( $display_last_author == "TRUE" ) { ! $last_post_author = ( $postrow[$row_count]['id2'] == ANONYMOUS ) ? ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid( PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['id2'] ) . '">' . $postrow[$row_count]['user2'] . '</a>'; } else --- 350,354 ---- if ( $display_last_author == "TRUE" ) { ! $last_post_author = ( $postrow[$row_count]['id2'] == ANONYMOUS ) ? ( ( $postrow[$row_count]['post_username'] != '' ) ? $postrow[$row_count]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$row_count]['id2']) . '">' . $postrow[$row_count]['user2'] . '</a>'; } else *************** *** 380,394 **** } ! if ( strlen( $message ) > $nb_characteres ) { ! $message = substr( $message, 0, $nb_characteres ); ! $position_espace = strrpos( $message, " " ); ! $message = substr( $message, 0, $position_espace ); ! $message .= "..."; } if ( $display_date == "TRUE" ) { ! $message_date = create_date( $board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone'] ); } else --- 357,371 ---- } ! if ( strlen($message) > $nb_characteres ) { ! $message = substr($message, 0, $nb_characteres); ! $position_espace = strrpos($message, ' '); ! $message = substr($message, 0, $position_espace); ! $message .= '...'; } if ( $display_date == "TRUE" ) { ! $message_date = create_date($board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone']); } else *************** *** 400,404 **** { $forum_name = $postrow[$row_count]['forum_name']; ! $forum_url = append_sid( PHPBB_URL . 'viewforum.php?f=' . $postrow[$row_count]['forum_id'] ); } else --- 377,381 ---- { $forum_name = $postrow[$row_count]['forum_name']; ! $forum_url = append_sid(PHPBB_URL . 'viewforum.php?f=' . $postrow[$row_count]['forum_id']); } else *************** *** 410,414 **** if ( $display_icon_view == "TRUE" ) { ! $last_post_url = '<a href="' . append_sid( PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$row_count]['topic_last_post_id'] ) . '#' . $postrow[$row_count]['topic_last_post_id'] . '"><img src="' . PHPBB_URL . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; } else --- 387,391 ---- if ( $display_icon_view == "TRUE" ) { ! $last_post_url = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$row_count]['topic_last_post_id']) . '#' . $postrow[$row_count]['topic_last_post_id'] . '"><img src="' . PHPBB_URL . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; } else *************** *** 417,437 **** } ! $template->assign_block_vars( "msg_row", array( "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! "LAST_MSG" => $message, ! "LAST_MSG_DATE" => $message_date, ! "FORUM_NAME" => $forum_name, ! "U_LAST_MSG" => $url, ! "U_FORUM" => $forum_url , ! 'LAST_POST_IMG' => $last_post_url, ! 'FOLDER_IMG' => $folder_image, ! 'TOPIC_AUTHOR' => $topic_author, ! 'LAST_POST_AUTHOR' => $last_post_author, ! 'L_TOPIC_FOLDER_ALT' => $folder_alt ! ) ! ); } ! $template->pparse( "body_last_msg" ); ?> \ No newline at end of file --- 394,414 ---- } ! $template->assign_block_vars('msg_row', array( ! 'ROW_COLOR' => "#" . $row_color, ! 'ROW_CLASS' => $row_class, ! 'LAST_MSG' => $message, ! 'LAST_MSG_DATE' => $message_date, ! 'FORUM_NAME' => $forum_name, ! 'U_LAST_MSG' => $url, ! 'U_FORUM' => $forum_url, ! 'LAST_POST_IMG' => $last_post_url, ! 'FOLDER_IMG' => $folder_image, ! 'TOPIC_AUTHOR' => $topic_author, ! 'LAST_POST_AUTHOR' => $last_post_author, ! 'L_TOPIC_FOLDER_ALT' => $folder_alt ! )); } ! $template->pparse('body_last_msg'); ?> \ No newline at end of file |
|
From: Markus P. <mar...@us...> - 2005-04-26 22:37:32
|
Update of /cvsroot/mxbb/core/modules/mx_last_msg/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29338/templates/subSilver Modified Files: mx_last_msg.tpl Removed Files: mx_last_msg_view.tpl Log Message: Code cleanup and template issues fixed in mx_last_msg. Index: mx_last_msg.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_last_msg/templates/subSilver/mx_last_msg.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_last_msg.tpl 26 Apr 2005 20:08:48 -0000 1.1 --- mx_last_msg.tpl 26 Apr 2005 22:37:21 -0000 1.2 *************** *** 1,24 **** <table width="{BLOCK_SIZE}" cellpadding="4" cellspacing="0" border="0" class="forumline"> ! <!-- BEGIN no_row --> ! <tr> <td class="row1" align="left" colspan="2">{no_row.L_NO_ITEMS}</td> </tr> ! <!-- END no_row --> <!-- BEGIN msg_row --> ! <tr> ! <td class="row2" align="center"><span class="cattitle"><img src="{U_PHPBB_ROOT_PATH}{msg_row.FOLDER_IMG}" width="19" height="18" alt="{msg_row.L_TOPIC_FOLDER_ALT}" title="{msg_row.L_TOPIC_FOLDER_ALT}" /></span></td> ! <td class="row1" align="{U_ALIGN}"><span class="genmed"><b><a href="{msg_row.U_LAST_MSG}" target="{U_TARGET}" class="genmed">{msg_row.LAST_MSG}</a></b></span><br /><span class="genmed"><a href="{msg_row.U_FORUM}" target="{U_TARGET}" class="genmed">{msg_row.FORUM_NAME}</a></span><br /> ! <div align="right"><span class="gensmall" nowrap="nowrap">{msg_row.LAST_MSG_DATE}</span><span class="gensmall" nowrap="nowrap"> {msg_row.TOPIC_AUTHOR} {msg_row.LAST_POST_AUTHOR}{msg_row.LAST_POST_IMG}</span></div></td> ! </tr> ! <!-- END msg_row --> ! <tr valign="middle"> ! <!-- ! <td align="center" class="catBottom" height="28" colspan="2"> ! <a href="{U_URL_PREV}" class="cattitle"><img src="{TEMPLATE_ROOT_PATH}images/msg_prev.gif" border="0" width="19" height="18" alt="{L_MSG_PREV}" title="{L_MSG_PREV}" /></a> ! <a href="{U_URL_NEXT}" class="cattitle"><img src="{TEMPLATE_ROOT_PATH}images/msg_next.gif" border="0" width="19" height="18" alt="{L_MSG_NEXT}" title="{L_MSG_NEXT}" /></a> ! </td> ! --> ! <!--<td align="center" valign="top"><span class="catBottom">{PAGE_NUMBER}</span></td> --> ! <td align="right" valign="top" nowrap="nowrap" colspan="2" height="28" class="catBottom"><span class="gensmall">{PAGINATION}</span></td> ! </tr> ! </table> --- 1,24 ---- <table width="{BLOCK_SIZE}" cellpadding="4" cellspacing="0" border="0" class="forumline"> ! <!-- BEGIN no_row --> ! <tr> <td class="row1" align="left" colspan="2">{no_row.L_NO_ITEMS}</td> </tr> ! <!-- END no_row --> <!-- BEGIN msg_row --> ! <tr> ! <td class="row2" align="center"><span class="cattitle"><img src="{U_PHPBB_ROOT_PATH}{msg_row.FOLDER_IMG}" width="19" height="18" alt="{msg_row.L_TOPIC_FOLDER_ALT}" title="{msg_row.L_TOPIC_FOLDER_ALT}" /></span></td> ! <td class="row1" align="{U_ALIGN}"><span class="genmed"><b><a href="{msg_row.U_LAST_MSG}" target="{U_TARGET}" class="genmed">{msg_row.LAST_MSG}</a></b></span><br /><span class="genmed"><a href="{msg_row.U_FORUM}" target="{U_TARGET}" class="genmed">{msg_row.FORUM_NAME}</a></span><br /> ! <div align="right"><span class="gensmall" nowrap="nowrap">{msg_row.LAST_MSG_DATE}</span><span class="gensmall" nowrap="nowrap"> {msg_row.TOPIC_AUTHOR} {msg_row.LAST_POST_AUTHOR}{msg_row.LAST_POST_IMG}</span></div></td> ! </tr> ! <!-- END msg_row --> ! <tr valign="middle"> ! <!-- ! <td align="center" class="catBottom" height="28" colspan="2"> ! <a href="{U_URL_PREV}" class="cattitle"><img src="{TEMPLATE_ROOT_PATH}images/msg_prev.gif" border="0" width="19" height="18" alt="{L_MSG_PREV}" title="{L_MSG_PREV}" /></a> ! <a href="{U_URL_NEXT}" class="cattitle"><img src="{TEMPLATE_ROOT_PATH}images/msg_next.gif" border="0" width="19" height="18" alt="{L_MSG_NEXT}" title="{L_MSG_NEXT}" /></a> ! </td> ! --> ! <!-- <td align="center" valign="top"><span class="catBottom">{PAGE_NUMBER}</span></td> --> ! <td align="right" valign="top" nowrap="nowrap" colspan="2" height="28" class="catBottom"><span class="gensmall">{PAGINATION}</span></td> ! </tr> ! </table> \ No newline at end of file --- mx_last_msg_view.tpl DELETED --- |
|
From: Markus P. <mar...@us...> - 2005-04-26 21:55:55
|
Update of /cvsroot/mxbb/core/modules/mx_statistics/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6719/templates/subSilver Modified Files: mx_statistics.tpl Log Message: Code cleanup and template issues fixed in mx_statistics. Index: mx_statistics.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_statistics/templates/subSilver/mx_statistics.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_statistics.tpl 26 Apr 2005 20:08:49 -0000 1.1 --- mx_statistics.tpl 26 Apr 2005 21:55:45 -0000 1.2 *************** *** 1,62 **** ! <table border="0" cellpadding="4" cellspacing="1" class="forumline" width="100%"> ! <tr> ! <td class="catHead" align="center" colspan="4"> ! <span class="cattitle">{L_ADMIN_STATISTICS}</span> ! </td> ! </tr> <tr> ! <th width="25%" class="thCornerL" align="center"><strong>{L_STATISTIC}</strong></td> ! <th width="25%" class="thTop" align="center"><strong>{L_VALUE}</strong></td> ! <th width="25%" class="thTop" align="center"><strong>{L_STATISTIC}</strong></td> ! <th width="25%" class="thCornerR" align="center"><strong>{L_VALUE}</strong></td> </tr> - <!-- BEGIN adminrow --> <tr> ! <td class="row2" align="center"><span class="gen">{adminrow.STATISTIC}</span></td> ! <td class="row1" width="25%" align="center"><span class="gen">{adminrow.VALUE}</span></td> ! <td class="row2" align="center"><span class="gen">{adminrow.STATISTIC2}</span></td> ! <td class="row1" width="25%" align="center"><span class="gen">{adminrow.VALUE2}</span></td> </tr> - <!-- END adminrow --> </table> <br clear="all" /> ! <table border="0" cellpadding="4" cellspacing="1" class="forumline" width="100%"> ! <tr> ! <td class="catHead" align="center" colspan="5"> ! <span class="cattitle">{L_TOP_POSTERS}</span> ! </td> ! </tr> <tr> ! <th class="thCornerL" align="center"><strong>{L_RANK}</strong></th> ! <th class="thTop" align="center" width="10%"><strong>{L_USERNAME}</strong></th> ! <th class="thTop" align="center" width="10%"><strong>{L_POSTS}</strong></th> ! <th class="thTop" align="center" width="10%"><strong>{L_PERCENTAGE}</strong></th> ! <th class="thCornerR" align="center" width="50%"><strong>{L_GRAPH}</strong></th> </tr> - <!-- BEGIN users --> <tr> ! <td class="{users.CLASS}" align="left" width="10%"><span class="gen">{users.RANK}</span></td> ! <td class="{users.CLASS}" align="left" width="10%"><span class="gen"><a href="{users.URL}">{users.USERNAME}</a></span></td> ! <td class="{users.CLASS}" align="center" width="10%"><span class="gen">{users.POSTS}</span></td> ! <td class="{users.CLASS}" align="center" width="10%"><span class="gen">{users.PERCENTAGE}%</span></td> ! <td class="{users.CLASS}" align="left" width="50%"> ! <table cellspacing="0" cellpadding="0" border="0" align="left"> ! <tr> ! <td align="right"><img src="{LEFT_GRAPH_IMAGE}" width="4" height="12" /></td> ! </tr> ! </table> ! <table cellspacing="0" cellpadding="0" border="0" align="left" width="{users.BAR}%"> <tr> ! <td><img src="{GRAPH_IMAGE}" width="100%" height="12" /></td> </tr> ! </table> ! <table cellspacing="0" cellpadding="0" border="0" align="left"> <tr> ! <td align="left"><img src="{RIGHT_GRAPH_IMAGE}" width="4" height="12" /></td> </tr> </table> </td> </tr> - <!-- END users --> </table> <br clear="all" /> --- 1,70 ---- ! <table border="0" cellpadding="0" cellspacing="0" class="forumline" width="100%"> <tr> ! <td class="catHead" align="center"><span class="cattitle">{L_ADMIN_STATISTICS}</span></td> </tr> <tr> ! <td> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" style="border:none;"> ! <tr> ! <th width="25%" class="thCornerL" align="center"><b>{L_STATISTIC}</b></td> ! <th width="25%" class="thTop" align="center"><b>{L_VALUE}</b></td> ! <th width="25%" class="thTop" align="center"><b>{L_STATISTIC}</b></td> ! <th width="25%" class="thCornerR" align="center"><b>{L_VALUE}</b></td> ! </tr> ! <!-- BEGIN adminrow --> ! <tr> ! <td class="row2" align="center"><span class="gen">{adminrow.STATISTIC}</span></td> ! <td class="row1" align="center"><span class="gen">{adminrow.VALUE}</span></td> ! <td class="row2" align="center"><span class="gen">{adminrow.STATISTIC2}</span></td> ! <td class="row1" align="center"><span class="gen">{adminrow.VALUE2}</span></td> ! </tr> ! <!-- END adminrow --> ! </table> ! </td> </tr> </table> <br clear="all" /> ! <table border="0" cellpadding="0" cellspacing="0" class="forumline" width="100%"> <tr> ! <td class="catHead" align="center"><span class="cattitle">{L_TOP_POSTERS}</span></td> </tr> <tr> ! <td> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" style="border:none;"> <tr> ! <th class="thCornerL" align="center" width="10%"><b>{L_RANK}</b></th> ! <th class="thTop" align="center" width="20%"><b>{L_USERNAME}</b></th> ! <th class="thTop" align="center" width="10%"><b>{L_POSTS}</b></th> ! <th class="thTop" align="center" width="10%"><b>{L_PERCENTAGE}</b></th> ! <th class="thCornerR" align="center" width="50%"><b>{L_GRAPH}</b></th> </tr> ! <!-- BEGIN users --> <tr> ! <td class="{users.CLASS}" align="center"><span class="gen">{users.RANK}</span></td> ! <td class="{users.CLASS}" align="center"><span class="gen"><a href="{users.URL}">{users.USERNAME}</a></span></td> ! <td class="{users.CLASS}" align="center"><span class="gen">{users.POSTS}</span></td> ! <td class="{users.CLASS}" align="center"><span class="gen">{users.PERCENTAGE}%</span></td> ! <td class="{users.CLASS}" align="left"> ! <table cellspacing="0" cellpadding="0" border="0" align="left"> ! <tr> ! <td align="right"><img src="{LEFT_GRAPH_IMAGE}" width="4" height="12" alt="{users.PERCENTAGE}%" title="{users.PERCENTAGE}%" /></td> ! </tr> ! </table> ! <table cellspacing="0" cellpadding="0" border="0" align="left" width="{users.BAR}%"> ! <tr> ! <td><img src="{GRAPH_IMAGE}" width="100%" height="12" alt="{users.PERCENTAGE}%" title="{users.PERCENTAGE}%" /></td> ! </tr> ! </table> ! <table cellspacing="0" cellpadding="0" border="0" align="left"> ! <tr> ! <td align="left"><img src="{RIGHT_GRAPH_IMAGE}" width="4" height="12" alt="{users.PERCENTAGE}%" title="{users.PERCENTAGE}%" /></td> ! </tr> ! </table> ! </td> </tr> + <!-- END users --> </table> </td> </tr> </table> <br clear="all" /> *************** *** 64,102 **** <tr> <td valign="top" width="50%" style="padding-right:2px;"> ! <table border="0" cellpadding="4" cellspacing="1" class="forumline" width="100%"> ! <tr> ! <td class="catHead" align="center" colspan="3"><span class="cattitle">{L_MOST_VIEWED}</span></td> ! </tr> <tr> ! <th colspan="1" class="thCornerL" align="left"><strong>{L_RANK}</strong></th> ! <th class="thTop" align="center"><strong>{L_VIEWS}</strong></th> ! <th class="thCornerR" align="center"><strong>{L_TOPIC}</strong></th> </tr> - <!-- BEGIN topicviews --> <tr> ! <td class="{topicviews.CLASS}" align="left" width="5%"><span class="gen">{topicviews.RANK}</span></td> ! <td class="{topicviews.CLASS}" align="center" width="20%"><span class="gen">{topicviews.VIEWS}</span></td> ! <td class="{topicviews.CLASS}" align="left"><span class="gen"><a href="{topicviews.URL}">{topicviews.TITLE}</a></span></td> </tr> - <!-- END topicviews --> </table> </td> <td valign="top" width="50%" style="padding-left:2px;"> ! <table border="0" cellpadding="4" cellspacing="1" class="forumline" width="100%"> ! <tr> ! <td class="catHead" align="center" colspan="3" height="28"> <span class="cattitle">{L_MOST_ACTIVE}</span></td> ! </tr> <tr> ! <th colspan="1" class="thCornerL" align="left"><strong>{L_RANK}</strong></th> ! <th class="thTop" align="center"><strong>{L_REPLIES}</strong></th> ! <th class="thCornerR" align="center"><strong>{L_TOPIC}</strong></th> </tr> - <!-- BEGIN topicreplies --> <tr> ! <td class="{topicreplies.CLASS}" align="left" width="5%"><span class="gen">{topicreplies.RANK}</span></td> ! <td class="{topicreplies.CLASS}" align="center" width="20%"><span class="gen">{topicreplies.REPLIES}</span></td> ! <td class="{topicreplies.CLASS}" align="left"><span class="gen"><a href="{topicreplies.URL}">{topicreplies.TITLE}</a></span></td> </tr> - <!-- END topicreplies --> </table> </td> --- 72,122 ---- <tr> <td valign="top" width="50%" style="padding-right:2px;"> ! <table border="0" cellpadding="0" cellspacing="0" class="forumline" width="100%"> <tr> ! <td class="catHead" align="center"><span class="cattitle">{L_MOST_VIEWED}</span></td> </tr> <tr> ! <td> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" style="border:none;"> ! <tr> ! <th class="thCornerL" align="left" width="5%"><b>{L_RANK}</b></th> ! <th class="thTop" align="center" width="20%"><b>{L_VIEWS}</b></th> ! <th class="thCornerR" align="center" width="75%"><b>{L_TOPIC}</b></th> ! </tr> ! <!-- BEGIN topicviews --> ! <tr> ! <td class="{topicviews.CLASS}" align="left"><span class="gen">{topicviews.RANK}</span></td> ! <td class="{topicviews.CLASS}" align="center"><span class="gen">{topicviews.VIEWS}</span></td> ! <td class="{topicviews.CLASS}" align="left"><span class="gen"><a href="{topicviews.URL}">{topicviews.TITLE}</a></span></td> ! </tr> ! <!-- END topicviews --> ! </table> ! </td> </tr> </table> </td> <td valign="top" width="50%" style="padding-left:2px;"> ! <table border="0" cellpadding="0" cellspacing="0" class="forumline" width="100%"> <tr> ! <td class="catHead" align="center"> <span class="cattitle">{L_MOST_ACTIVE}</span></td> </tr> <tr> ! <td> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" style="border:none;"> ! <tr> ! <th class="thCornerL" align="left" width="5%"><b>{L_RANK}</b></th> ! <th class="thTop" align="center" width="20%"><b>{L_REPLIES}</b></th> ! <th class="thCornerR" align="center" width="75%"><b>{L_TOPIC}</b></th> ! </tr> ! <!-- BEGIN topicreplies --> ! <tr> ! <td class="{topicreplies.CLASS}" align="left"><span class="gen">{topicreplies.RANK}</span></td> ! <td class="{topicreplies.CLASS}" align="center"><span class="gen">{topicreplies.REPLIES}</span></td> ! <td class="{topicreplies.CLASS}" align="left"><span class="gen"><a href="{topicreplies.URL}">{topicreplies.TITLE}</a></span></td> ! </tr> ! <!-- END topicreplies --> ! </table> ! </td> </tr> </table> </td> |
|
From: Markus P. <mar...@us...> - 2005-04-26 21:55:54
|
Update of /cvsroot/mxbb/core/modules/mx_statistics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6719 Modified Files: mx_statistics.php Log Message: Code cleanup and template issues fixed in mx_statistics. Index: mx_statistics.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_statistics/mx_statistics.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_statistics.php 25 Apr 2005 01:54:57 -0000 1.9 --- mx_statistics.php 26 Apr 2005 21:55:45 -0000 1.10 *************** *** 19,46 **** */ ! if ( !defined( 'IN_PORTAL' ) ) { ! define( 'IN_PORTAL', true ); ! $mx_root_path = "../../"; ! include( $mx_root_path . 'extension.inc' ); ! include( $mx_root_path . 'common.' . $phpEx ); ! ! // Start session management ! ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); ! // End session management ! $is_block = false; } else ! { ! // Read block Configuration ! ! $block_config = read_block_config( $block_id ); $title = $block_config[$block_id]['block_title']; --- 19,45 ---- */ ! if( !defined('IN_PORTAL') ) { ! define('IN_PORTAL', true); ! $mx_root_path = '../../'; ! include($mx_root_path . 'extension.inc'); ! include($mx_root_path . 'common.' . $phpEx); ! // // Start session management ! // ! $userdata = session_pagestart($user_ip, PAGE_INDEX); ! mx_init_userprefs($userdata); ! // // End session management ! // $is_block = false; } else ! { ! // // Read block Configuration ! // ! $block_config = read_block_config($block_id); $title = $block_config[$block_id]['block_title']; *************** *** 49,86 **** } // Start user modifiable variables ! $return_limit = 10; ! // End user modifiable variables ! $template->assign_block_vars( "switch_view", array() ); ! ! // End session management // Vote Images based on the theme path, (i.e. templates/CURRNT_THEME/ is already inserted) $vote_left = PHPBB_URL . TEMPLATE_ROOT_PATH . "/images/vote_lcap.gif"; $vote_right = PHPBB_URL . TEMPLATE_ROOT_PATH . "/images/vote_rcap.gif"; $vote_bar = PHPBB_URL . TEMPLATE_ROOT_PATH . "/images/voting_bar.gif"; ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { ! include( $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); } else { ! include( $phpbb_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); } // Do the math :) (i think this is the same method as in philip mayer's statistic's file) // Taken from Acyd Burn. ! function do_math( $firstval, $value, $total, &$percentage, &$bar_percent ) { $cst = ( $firstval > 0 ) ? 90 / $firstval : 90; ! if ( $value != 0 ) { ! $percentage = ( $total ) ? round( min( 100, ( $value / $total ) * 100 ) ) : 0; } else --- 48,90 ---- } + // // Start user modifiable variables ! // $return_limit = 10; ! // // End user modifiable variables + // ! $template->assign_block_vars('switch_view', array()); + // // Vote Images based on the theme path, (i.e. templates/CURRNT_THEME/ is already inserted) + // $vote_left = PHPBB_URL . TEMPLATE_ROOT_PATH . "/images/vote_lcap.gif"; $vote_right = PHPBB_URL . TEMPLATE_ROOT_PATH . "/images/vote_rcap.gif"; $vote_bar = PHPBB_URL . TEMPLATE_ROOT_PATH . "/images/voting_bar.gif"; ! if( file_exists($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) ) { ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx); ! include($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); } else { ! include($phpbb_root_path . 'language/lang_english/lang_admin.' . $phpEx); ! include($module_root_path . 'language/lang_english/lang_main.' . $phpEx); } + + // // Do the math :) (i think this is the same method as in philip mayer's statistic's file) // Taken from Acyd Burn. ! // ! function do_math($firstval, $value, $total, &$percentage, &$bar_percent) { $cst = ( $firstval > 0 ) ? 90 / $firstval : 90; ! if( $value != 0 ) { ! $percentage = ( $total ) ? round(min(100, ( $value / $total ) * 100)) : 0; } else *************** *** 89,173 **** } ! $bar_percent = round( $value * $cst ); } ! $template->set_filenames( array( ! "body" => "mx_statistics.tpl" ) ! ); ! $template->assign_vars( array( ! "GRAPH_IMAGE" => $graph_image, ! "L_ADMIN_STATISTICS" => $lang['Admin_Stats'], ! "L_TOP_SMILIES" => $lang['Top_Smilies'], ! "L_MOST_ACTIVE" => $lang['Most_Active_Topics'], ! "L_MOST_VIEWED" => $lang['Most_Viewed_Topics'], ! "L_TOP_POSTERS" => $lang['Top_Posting_Users'], ! "L_USES" => $lang['Uses'], ! "L_RANK" => $lang['Rank'], ! "L_PERCENTAGE" => $lang['Percent'], ! "L_GRAPH" => $lang['Graph'], ! "L_REPLIES" => $lang['Replies'], ! "L_TOPIC" => $lang['Topic'], ! "L_VIEWS" => $lang['Views'], ! "L_USERNAME" => $lang['Username'], ! "L_POSTS" => $lang['Posts'], ! "L_STATISTIC" => $lang['Statistic'], ! "L_VALUE" => $lang['Value'], ! "L_IMAGE" => $lang['smiley_url'], ! "L_CODE" => $lang['smiley_code'], ! "PAGE_NAME" => $lang['Statistics'] ) ! ); // Authorization SQL ! $auth_data_sql_stats = get_auth_forum(); // Getting voting bar info from template ! ! if ( !$board_config['override_user_style'] ) { ! if ( $userdata['user_id'] != ANONYMOUS && isset( $userdata['user_style'] ) ) { $style = $userdata['user_style']; ! if ( !$theme ) $style = $board_config['default_style']; } else $style = $board_config['default_style']; } else $style = $board_config['default_style']; - $sql = "SELECT * FROM " . THEMES_TABLE . " WHERE themes_id = $style"; ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( CRITICAL_ERROR, "Couldn't query database for theme info." ); } ! if ( !$row = $db->sql_fetchrow( $result ) ) { ! message_die( CRITICAL_ERROR, "Couldn't get theme data for themes_id=$style." ); } ! $template->assign_vars( array( "LEFT_GRAPH_IMAGE" => $vote_left, ! "RIGHT_GRAPH_IMAGE" => $vote_right, ! "GRAPH_IMAGE" => $vote_bar ) ! ); // Top posters SQL ! $sql = "SELECT user_id, username, user_posts FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS . " AND user_posts > 0 ! ORDER BY user_posts DESC ! LIMIT " . $return_limit; ! ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't retrieve users data", "", __LINE__, __FILE__, $sql ); } ! $user_count = $db->sql_numrows( $result ); ! $user_data = $db->sql_fetchrowset( $result ); $percentage = 0; $bar_percent = 0; --- 93,189 ---- } ! $bar_percent = round($value * $cst); } ! $template->set_filenames(array( ! 'body' => 'mx_statistics.tpl') ! ); ! $template->assign_vars(array( ! "GRAPH_IMAGE" => $graph_image, ! "L_ADMIN_STATISTICS" => $lang['Admin_Stats'], ! "L_TOP_SMILIES" => $lang['Top_Smilies'], ! "L_MOST_ACTIVE" => $lang['Most_Active_Topics'], ! "L_MOST_VIEWED" => $lang['Most_Viewed_Topics'], ! "L_TOP_POSTERS" => $lang['Top_Posting_Users'], ! "L_USES" => $lang['Uses'], ! "L_RANK" => $lang['Rank'], ! "L_PERCENTAGE" => $lang['Percent'], ! "L_GRAPH" => $lang['Graph'], ! "L_REPLIES" => $lang['Replies'], ! "L_TOPIC" => $lang['Topic'], ! "L_VIEWS" => $lang['Views'], ! "L_USERNAME" => $lang['Username'], ! "L_POSTS" => $lang['Posts'], ! "L_STATISTIC" => $lang['Statistic'], ! "L_VALUE" => $lang['Value'], ! "L_IMAGE" => $lang['smiley_url'], ! "L_CODE" => $lang['smiley_code'], ! "PAGE_NAME" => $lang['Statistics']) ! ); + // // Authorization SQL ! // $auth_data_sql_stats = get_auth_forum(); + // // Getting voting bar info from template ! // ! if( !$board_config['override_user_style'] ) { ! if( $userdata['user_id'] != ANONYMOUS && isset($userdata['user_style']) ) { $style = $userdata['user_style']; ! if( !$theme ) ! { $style = $board_config['default_style']; + } } else + { $style = $board_config['default_style']; + } } else + { $style = $board_config['default_style']; + } ! $sql = "SELECT * FROM " . THEMES_TABLE . " WHERE themes_id = $style"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, "Couldn't query database for theme info."); } ! if( !($row = $db->sql_fetchrow($result)) ) { ! mx_message_die(CRITICAL_ERROR, "Couldn't get theme data for themes_id=$style."); } ! $template->assign_vars(array( ! "LEFT_GRAPH_IMAGE" => $vote_left, ! "RIGHT_GRAPH_IMAGE" => $vote_right, ! "GRAPH_IMAGE" => $vote_bar) ! ); + // // Top posters SQL + // + $sql = "SELECT user_id, username, user_posts + FROM " . USERS_TABLE . " + WHERE user_id <> " . ANONYMOUS . " AND user_posts > 0 + ORDER BY user_posts DESC + LIMIT " . $return_limit; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't retrieve users data", "", __LINE__, __FILE__, $sql); } ! $user_count = $db->sql_numrows($result); ! $user_data = $db->sql_fetchrowset($result); $percentage = 0; $bar_percent = 0; *************** *** 175,367 **** $firstcount = $user_data[0]['user_posts']; ! for ( $i = 0; $i < $user_count; $i++ ) { ! do_math( $firstcount, $user_data[$i]['user_posts'], get_db_stat( 'postcount' ), $percentage, $bar_percent ); ! $template->assign_block_vars( "users", array( "RANK" => $i + 1, ! "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], ! "USERNAME" => $user_data[$i]['username'], ! "PERCENTAGE" => $percentage, ! "BAR" => $bar_percent, ! "URL" => append_sid( PHPBB_URL . "profile.php?mode=viewprofile&u=" . $user_data[$i]['user_id'] ), ! "POSTS" => $user_data[$i]['user_posts'] ) ! ); } // Most active topics SQL ! $sql = "SELECT topic_id, topic_title, topic_replies ! FROM " . TOPICS_TABLE . " ! WHERE forum_id IN ( $auth_data_sql_stats ) ! AND topic_status <> 2 ! AND topic_replies > 0 ! ORDER BY topic_replies DESC ! LIMIT " . $return_limit; ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't retrieve topic data", "", __LINE__, __FILE__, $sql ); } ! $topic_data = $db->sql_fetchrowset( $result ); ! for ( $i = 0; $i < count( $topic_data ); $i++ ) { ! $template->assign_block_vars( "topicreplies", array( "RANK" => $i + 1, ! "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], ! "TITLE" => $topic_data[$i]['topic_title'], ! "REPLIES" => $topic_data[$i]['topic_replies'], ! "URL" => append_sid( PHPBB_URL . "viewtopic.php?t=" . $topic_data[$i]['topic_id'] ) ) ! ); } // Most viewed topics SQL ! $rank = 0; $sql = "SELECT topic_id, topic_title, topic_views ! FROM " . TOPICS_TABLE . " ! WHERE forum_id IN ( $auth_data_sql_stats ) ! AND topic_status <> 2 ! AND topic_views > 0 ! ORDER BY topic_views DESC ! LIMIT " . $return_limit; ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't retrieve topic data", "", __LINE__, __FILE__, $sql ); } ! $topic_data = $db->sql_fetchrowset( $result ); ! for ( $i = 0; $i < count( $topic_data ); $i++ ) { ! $template->assign_block_vars( "topicviews", array( "RANK" => $i + 1, ! "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], ! "TITLE" => $topic_data[$i]['topic_title'], ! "VIEWS" => $topic_data[$i]['topic_views'], ! "URL" => append_sid( PHPBB_URL . "viewtopic.php?t=" . $topic_data[$i]['topic_id'] ) ) ! ); } ! // Get forum statistics (taken from admin panel) ! ! $total_posts = get_db_stat( 'postcount' ); ! $total_users = get_db_stat( 'usercount' ); ! $total_topics = get_db_stat( 'topiccount' ); ! $start_date = create_date( $board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone'] ); ! $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; ! $posts_per_day = sprintf( "%.2f", $total_posts / $boarddays ); ! $topics_per_day = sprintf( "%.2f", $total_topics / $boarddays ); ! $users_per_day = sprintf( "%.2f", $total_users / $boarddays ); ! $avatar_dir_size = 0; ! if ( $avatar_dir = @opendir( $phpbb_root_path . $board_config['avatar_path'] ) ) ! { ! while ( $file = @readdir( $avatar_dir ) ) { ! if ( $file != "." && $file != ".." ) { ! $avatar_dir_size += @filesize( $phpbb_root_path . $board_config['avatar_path'] . "/" . $file ); } } ! @closedir( $avatar_dir ); ! ! // This bit of code translates the avatar directory size into human readable format ! // Borrowed the code from the PHP.net annoted manual, origanally written by: ! // Jesse (je...@je...) ! ! if ( $avatar_dir_size >= 1048576 ) { ! $avatar_dir_size = round( $avatar_dir_size / 1048576 * 100 ) / 100 . " MB"; } ! else if ( $avatar_dir_size >= 1024 ) { ! $avatar_dir_size = round( $avatar_dir_size / 1024 * 100 ) / 100 . " KB"; } ! else { ! $avatar_dir_size = $avatar_dir_size . " Bytes"; } - } - else - { - // Couldn't open Avatar dir. - $avatar_dir_size = $lang['Not_available']; - } - - if ( $posts_per_day > $total_posts ) - { - $posts_per_day = $total_posts; - } ! if ( $topics_per_day > $total_topics ) ! { ! $topics_per_day = $total_topics; ! } ! ! if ( $users_per_day > $total_users ) ! { ! $users_per_day = $total_users; ! } ! ! // DB size ... MySQL only ! ! // This code is heavily influenced by a similar routine ! // in phpMyAdmin 2.2.0 ! ! if ( preg_match( "/^mysql/", SQL_LAYER ) ) ! { ! $sql = "SELECT VERSION() AS mysql_version"; ! if ( $result = $db->sql_query( $sql ) ) { ! $row = $db->sql_fetchrow( $result ); ! $version = $row['mysql_version']; ! if ( preg_match( "/^(3\.23|4\.)/", $version ) ) { ! $db_name = ( preg_match( "/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)/", $version ) ) ? "`$dbname`" : $dbname; ! $sql = "SHOW TABLE STATUS"; ! // FROM " . $db_name; ! if ( $result = $db->sql_query( $sql ) ) { ! $tabledata_ary = $db->sql_fetchrowset( $result ); ! $dbsize = 0; ! for( $i = 0; $i < count( $tabledata_ary ); $i++ ) { ! if ( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) { ! if ( $table_prefix != "" ) { ! if ( strstr( $tabledata_ary[$i]['Name'], $table_prefix ) ) { $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; } } - else - { - $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; - } } ! } ! ! if ( $dbsize >= 1048576 ) ! { ! $dbsize = sprintf( "%.2f MB", ( $dbsize / 1048576 ) ); ! } ! else if ( $dbsize >= 1024 ) ! { ! $dbsize = sprintf( "%.2f KB", ( $dbsize / 1024 ) ); ! } ! else ! { ! $dbsize = sprintf( "%.2f Bytes", $dbsize ); ! } ! } // Else we couldn't get the table status. } else --- 191,401 ---- $firstcount = $user_data[0]['user_posts']; ! for( $i = 0; $i < $user_count; $i++ ) { ! do_math($firstcount, $user_data[$i]['user_posts'], get_db_stat( 'postcount' ), $percentage, $bar_percent); ! $template->assign_block_vars('users', array( ! "RANK" => $i + 1, ! "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], ! "USERNAME" => $user_data[$i]['username'], ! "PERCENTAGE" => $percentage, ! "BAR" => $bar_percent, ! "URL" => append_sid(PHPBB_URL . "profile.php?mode=viewprofile&u=" . $user_data[$i]['user_id']), ! "POSTS" => $user_data[$i]['user_posts']) ! ); } + // // Most active topics SQL ! // $sql = "SELECT topic_id, topic_title, topic_replies ! FROM " . TOPICS_TABLE . " ! WHERE forum_id IN ( $auth_data_sql_stats ) ! AND topic_status <> 2 ! AND topic_replies > 0 ! ORDER BY topic_replies DESC ! LIMIT " . $return_limit; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't retrieve topic data", "", __LINE__, __FILE__, $sql); } ! $topic_data = $db->sql_fetchrowset($result); ! for( $i = 0; $i < count($topic_data); $i++ ) { ! $template->assign_block_vars('topicreplies', array( ! "RANK" => $i + 1, ! "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], ! "TITLE" => $topic_data[$i]['topic_title'], ! "REPLIES" => $topic_data[$i]['topic_replies'], ! "URL" => append_sid(PHPBB_URL . "viewtopic.php?t=" . $topic_data[$i]['topic_id'])) ! ); } + // // Most viewed topics SQL ! // $rank = 0; $sql = "SELECT topic_id, topic_title, topic_views ! FROM " . TOPICS_TABLE . " ! WHERE forum_id IN ( $auth_data_sql_stats ) ! AND topic_status <> 2 ! AND topic_views > 0 ! ORDER BY topic_views DESC ! LIMIT " . $return_limit; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't retrieve topic data", "", __LINE__, __FILE__, $sql); } ! $topic_data = $db->sql_fetchrowset($result); ! for( $i = 0; $i < count($topic_data); $i++ ) { ! $template->assign_block_vars('topicviews', array( ! "RANK" => $i + 1, ! "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], ! "TITLE" => $topic_data[$i]['topic_title'], ! "VIEWS" => $topic_data[$i]['topic_views'], ! "URL" => append_sid(PHPBB_URL . "viewtopic.php?t=" . $topic_data[$i]['topic_id'])) ! ); } ! // ! // Begin Of Administrative Statistics (based on admin/index.php) ! // Also, takes into mxBB tables (DB Size) and Attachment MOD ! // ! // ! // Get forum statistics ! // ! $total_posts = get_db_stat('postcount'); ! $total_users = get_db_stat('usercount'); ! $total_topics = get_db_stat('topiccount'); ! $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); ! $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; ! $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); ! $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); ! $users_per_day = sprintf("%.2f", $total_users / $boarddays); ! $avatar_dir_size = 0; ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path'])) { ! while( $file = @readdir($avatar_dir) ) { ! if( $file != "." && $file != ".." ) ! { ! $avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file); ! } ! } ! @closedir($avatar_dir); ! ! // ! // This bit of code translates the avatar directory size into human readable format ! // Borrowed the code from the PHP.net annoted manual, origanally written by: ! // Jesse (je...@je...) ! // ! if($avatar_dir_size >= 1048576) ! { ! $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB"; } + else if($avatar_dir_size >= 1024) + { + $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB"; + } + else + { + $avatar_dir_size = $avatar_dir_size . " Bytes"; + } + } ! else { ! // Couldn't open Avatar dir. ! $avatar_dir_size = $lang['Not_available']; } ! ! if($posts_per_day > $total_posts) { ! $posts_per_day = $total_posts; } ! ! if($topics_per_day > $total_topics) { ! $topics_per_day = $total_topics; } ! if($users_per_day > $total_users) { ! $users_per_day = $total_users; ! } ! // ! // DB size ... MySQL only ! // ! // This code is heavily influenced by a similar routine ! // in phpMyAdmin 2.2.0 ! // ! if( preg_match("/^mysql/", SQL_LAYER) ) ! { ! $sql = "SELECT VERSION() AS mysql_version"; ! if($result = $db->sql_query($sql)) { ! $row = $db->sql_fetchrow($result); ! $version = $row['mysql_version']; ! if( preg_match("/^(3\.23|4\.)/", $version) ) { ! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)/", $version) ) ? "`$dbname`" : $dbname; ! $sql = "SHOW TABLE STATUS ! FROM " . $db_name; ! if($result = $db->sql_query($sql)) { ! $tabledata_ary = $db->sql_fetchrowset($result); ! ! $dbsize = 0; ! for($i = 0; $i < count($tabledata_ary); $i++) { ! if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) { ! if( $table_prefix != "" && $mx_table_prefix != "" ) ! { ! if( strstr($tabledata_ary[$i]['Name'], $table_prefix) || strstr($tabledata_ary[$i]['Name'], $mx_table_prefix) ) ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! else { $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; } } } ! } // Else we couldn't get the table status. ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! } ! else if( preg_match("/^mssql/", SQL_LAYER) ) ! { ! $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize ! FROM sysfiles"; ! if( $result = $db->sql_query($sql) ) ! { ! $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; } else *************** *** 374,445 **** $dbsize = $lang['Not_available']; } - } - else - { - $dbsize = $lang['Not_available']; - } ! // Newest user data ! $newest_userdata = get_db_stat( 'newestuser' ); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; $sql = "SELECT user_regdate ! FROM " . USERS_TABLE . " ! WHERE user_id = " . $newest_userdata['user_id'] . " ! LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't retrieve users data", "", __LINE__, __FILE__, $sql ); } ! $row = $db->sql_fetchrow( $result ); $newest_user_date = $row['user_regdate']; // Most Online data ! $sql = "SELECT * ! FROM " . CONFIG_TABLE . " ! WHERE config_name = 'record_online_users' ! OR config_name = 'record_online_date'"; ! ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't retrieve configuration data", "", __LINE__, __FILE__, $sql ); } ! ! $row = $db->sql_fetchrow( $result ); ! $most_users_date = ( $row['config_value'] > 0 ) ? create_date( $board_config['default_dateformat'], $row['config_value'], $board_config['board_timezone'] ) : $most_users_date = $lang['Not_available']; ! ! $row = $db->sql_fetchrow( $result ); $most_users = ( $row['config_value'] > 0 ) ? $row['config_value'] : $lang['Not_available']; ! $statistic_array = array( $lang['Number_posts'], $lang['Posts_per_day'], $lang['Number_topics'], $lang['Topics_per_day'], $lang['Number_users'], $lang['Users_per_day'], $lang['Board_started'], $lang['Board_Up_Days'], $lang['Database_size'], $lang['Avatar_dir_size'], $lang['Latest_Reg_User_Date'], $lang['Latest_Reg_User'], $lang['Most_Ever_Online_Date'], $lang['Most_Ever_Online'], $lang['Gzip_compression'] ); ! $value_array = array( $total_posts, $posts_per_day, $total_topics, $topics_per_day, $total_users, $users_per_day, $start_date, sprintf( '%.2f', $boarddays ), $dbsize, $avatar_dir_size, create_date( $board_config['default_dateformat'], $newest_user_date, $board_config['board_timezone'] ), sprintf( '<a href="' . append_sid( PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid" ) . '">' . $newest_user . '</a>' ), $most_users_date, $most_users, ( $board_config['gzip_compress'] ) ? $lang['Enabled'] : $lang['Disabled'] ); ! for ( $i = 0; $i < count( $statistic_array ); $i += 2 ) { ! $template->assign_block_vars( "adminrow", array( "STATISTIC" => $statistic_array[$i], ! "VALUE" => $value_array[$i], ! "STATISTIC2" => ( isset( $statistic_array[$i + 1] ) ) ? $statistic_array[$i + 1] : "", ! "VALUE2" => ( isset( $value_array[$i + 1] ) ) ? $value_array[$i + 1] : "" ) ! ); } ! // End forum statistics ! // Output the page ! $page_title = $lang['Statistics']; ! if ( !$is_block ) { ! include( $mx_root_path . 'includes/page_header.' . $phpEx ); } ! $template->pparse( "body" ); ! if ( !$is_block ) { ! include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } --- 408,505 ---- $dbsize = $lang['Not_available']; } ! if ( is_integer($dbsize) ) ! { ! if( $dbsize >= 1048576 ) ! { ! $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 )); ! } ! else if( $dbsize >= 1024 ) ! { ! $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 )); ! } ! else ! { ! $dbsize = sprintf("%.2f Bytes", $dbsize); ! } ! } ! // ! // End Of Administrative Statistics ! // ! // ! // Newest user data ! // ! $newest_userdata = get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; $sql = "SELECT user_regdate ! FROM " . USERS_TABLE . " ! WHERE user_id = " . $newest_userdata['user_id'] . " ! LIMIT 1"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't retrieve users data", "", __LINE__, __FILE__, $sql); } ! $row = $db->sql_fetchrow($result); $newest_user_date = $row['user_regdate']; + // // Most Online data ! // $sql = "SELECT * ! FROM " . CONFIG_TABLE . " ! WHERE config_name = 'record_online_users' ! OR config_name = 'record_online_date'"; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't retrieve configuration data", "", __LINE__, __FILE__, $sql); } ! $row = $db->sql_fetchrow($result); ! $most_users_date = ( $row['config_value'] > 0 ) ? create_date($board_config['default_dateformat'], $row['config_value'], $board_config['board_timezone']) : $lang['Not_available']; ! $row = $db->sql_fetchrow($result); $most_users = ( $row['config_value'] > 0 ) ? $row['config_value'] : $lang['Not_available']; ! $statistic_array = array($lang['Number_posts'], $lang['Posts_per_day'], $lang['Number_topics'], $lang['Topics_per_day'], $lang['Number_users'], $lang['Users_per_day'], $lang['Board_started'], $lang['Board_Up_Days'], $lang['Database_size'], $lang['Avatar_dir_size'], $lang['Latest_Reg_User_Date'], $lang['Latest_Reg_User'], $lang['Most_Ever_Online_Date'], $lang['Most_Ever_Online'], $lang['Gzip_compression']); ! $value_array = array($total_posts, $posts_per_day, $total_topics, $topics_per_day, $total_users, $users_per_day, $start_date, sprintf('%.2f', $boarddays), $dbsize, $avatar_dir_size, create_date($board_config['default_dateformat'], $newest_user_date, $board_config['board_timezone']), sprintf('<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">' . $newest_user . '</a>'), $most_users_date, $most_users, ( $board_config['gzip_compress'] ) ? $lang['Enabled'] : $lang['Disabled']); ! // ! // Disk Usage, if Attachment Mod is installed ! // ! if( defined('ATTACH_VERSION') ) { ! include($phpbb_root_path . 'attach_mod/includes/functions_admin.'.$phpEx); ! $disk_usage = get_formatted_dirsize(); ! $statistic_array[] = $lang['Disk_usage']; ! $value_array[] = $disk_usage; } ! // ! // Output Administrative Statistics ! // ! for( $i = 0; $i < count($statistic_array); $i += 2 ) ! { ! $template->assign_block_vars('adminrow', array( ! "STATISTIC" => $statistic_array[$i], ! "VALUE" => $value_array[$i], ! "STATISTIC2" => ( isset($statistic_array[$i + 1]) ) ? $statistic_array[$i + 1] : '', ! "VALUE2" => ( isset($value_array[$i + 1]) ) ? $value_array[$i + 1] : '') ! ); ! } + // // Output the page ! // $page_title = $lang['Statistics']; ! if( !$is_block ) { ! include($mx_root_path . 'includes/page_header.' . $phpEx); } ! $template->pparse('body'); ! if( !$is_block ) { ! include($mx_root_path . 'includes/page_tail.' . $phpEx); } |