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-04-12 19:02:59
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21815/includes Modified Files: mx_functions.php Log Message: updated get_page_id() and get_list_formatted() some index.php fixes Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mx_functions.php 10 Apr 2005 13:15:27 -0000 1.33 --- mx_functions.php 12 Apr 2005 19:02:30 -0000 1.34 *************** *** 1,1315 **** ! <?php ! /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : ! * ------------------------------------------------------------------------- [...2576 lines suppressed...] ! function is_post($var) ! { ! global $HTTP_POST_VARS; ! // Note: _x and _y are used by (at least IE) to return the mouse position at onclick of INPUT TYPE="img" elements. ! return ( isset($HTTP_POST_VARS[$var]) || ( isset($HTTP_POST_VARS[$var.'_x']) && isset($HTTP_POST_VARS[$var.'_y']) ) ); ! } ! function is_get($var) ! { ! global $HTTP_GET_VARS; ! return ( isset($HTTP_GET_VARS[$var]) ); ! } ! function is_request($var) ! { ! return ( $this->is_get($var) || $this->is_post($var) ); ! } ! ! } // class mx_request_vars ! ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 19:02:58
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21815/modules/mx_coreblocks Modified Files: CoreBlocks.pak Log Message: updated get_page_id() and get_list_formatted() some index.php fixes Index: CoreBlocks.pak =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/CoreBlocks.pak,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CoreBlocks.pak 18 Feb 2005 10:05:05 -0000 1.3 --- CoreBlocks.pak 12 Apr 2005 19:02:31 -0000 1.4 *************** *** 1,104 **** ! module=+:10=+:Core Blocks=+:./=+:Core blocks=+: ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:17=+:Announcements=+:Announcements=+:mx_announce.php=+: ! parameter=+:17=+:3=+:announce_display=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:6=+:announce_display_global=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:5=+:announce_display_normal=+:Boolean=+:FALSE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:4=+:announce_display_sticky=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:11=+:announce_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:7=+:announce_img=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:10=+:announce_img_global=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:9=+:announce_img_normal=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:8=+:announce_img_sticky=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:2=+:announce_nbr_days=+:Number=+:14=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:1=+:announce_nbr_display=+:Number=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Announcements=+:Demo block=+:17=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:53=+:DynamicBlock=+:Dynamic block defined by its block_id=+:mx_dynamic.php=+: ! parameter=+:53=+:136=+:default_block_id=+:Function=+:0=+:get_list_formatted("block_list","{parameter_value}","{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - DynamicBlock=+:Demo block=+:53=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:10=+:Forum phpBB=+:Forum phpBB=+:mx_forum.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Forum phpBB=+:Demo block=+:10=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:16=+:Google=+:Google=+:mx_google.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Google=+:Demo block=+:16=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:48=+:IncludeX=+:Include site or file=+:mx_includex.php=+: ! parameter=+:48=+:133=+:x_1=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:134=+:x_2=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:161=+:x_3=+:Text=+:http://www.mx-system.com=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:131=+:x_mode=+:Function=+:0=+:get_mx_select_list( 'includex', "{parameter_value}", "{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - IncludeX=+:Demo block=+:48=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:13=+:Language Select=+:Language Select=+:mx_language.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Language Select=+:Demo block=+:13=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:14=+:Login=+:Login=+:mx_login.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Login=+:Demo block=+:14=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:11=+:Navigation Menu=+:Menu Navigation=+:mx_menu_nav.php=+:admin/admin_mx_menu.php ! parameter=+:11=+:63=+:menu_display_mode=+:Text=+:Vertical=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:11=+:64=+:menu_page_sync=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Navigation Menu=+:Demo block=+:11=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:19=+:Multiple Horizontal Blocks=+:Block that can arrange other blocks in a horizontal line.=+:mx_multiple_blocks.php=+: ! parameter=+:19=+:60=+:block_ids=+:Function=+:1,2,3=+:get_list_multiple( "{parameter_id}[]", BLOCK_TABLE, 'block_id', 'block_title', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:61=+:block_sizes=+:Text=+:20%,30%,*=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:62=+:space_between=+:Number=+:4=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Multiple Horizontal Blocks=+:Demo block=+:19=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:18=+:Who is Online=+:Who is Online=+:mx_online.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Who is Online=+:Demo block=+:18=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:12=+:Polls=+:Polls=+:mx_poll.php=+: ! parameter=+:12=+:13=+:Poll_Display=+:Function=+:0=+:poll_select( {parameter_value}, "{parameter_id}" ) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:12=+:36=+:poll_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Polls=+:Demo block=+:12=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:97=+:Site Log=+:Site change monitor=+:mx_site_log.php=+: ! parameter=+:97=+:317=+:log_filter_date=+:Function=+:5=+:get_list_static("{parameter_id}[]",array("no limit", "1 day", "2 days", "3 days", "1 week", "2 weeks", "3 weeks", "1 month", "2 months", "3 months", "6 months", "1 year"),"{parameter_value}") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:97=+:315=+:numOfEvents=+:Number=+:5=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Site Log=+:Demo block=+:97=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:15=+:Theme Select=+:Theme Select=+:mx_theme.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Theme Select=+:Demo block=+:15=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- 1,104 ---- ! module=+:10=+:Core Blocks=+:modules/mx_coreblocks/=+:Core blocks=+: ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:17=+:Announcements=+:Announcements=+:mx_announce.php=+: ! parameter=+:17=+:3=+:announce_display=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:6=+:announce_display_global=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:5=+:announce_display_normal=+:Boolean=+:FALSE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:4=+:announce_display_sticky=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:11=+:announce_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:7=+:announce_img=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:10=+:announce_img_global=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:9=+:announce_img_normal=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:8=+:announce_img_sticky=+:Text=+:thumb_globe.gif=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:2=+:announce_nbr_days=+:Number=+:14=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:17=+:1=+:announce_nbr_display=+:Number=+:1=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Announcements=+:Demo block=+:17=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:53=+:DynamicBlock=+:Dynamic block defined by its block_id=+:mx_dynamic.php=+: ! parameter=+:53=+:136=+:default_block_id=+:Function=+:0=+:get_list_formatted("block_list","{parameter_value}","{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - DynamicBlock=+:Demo block=+:53=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:10=+:Forum phpBB=+:Forum phpBB=+:mx_forum.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Forum phpBB=+:Demo block=+:10=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:16=+:Google=+:Google=+:mx_google.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Google=+:Demo block=+:16=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:48=+:IncludeX=+:Include site or file=+:mx_includex.php=+: ! parameter=+:48=+:133=+:x_1=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:134=+:x_2=+:Text=+:=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:161=+:x_3=+:Text=+:http://www.mx-system.com=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:48=+:131=+:x_mode=+:Function=+:0=+:get_mx_select_list( 'includex', "{parameter_value}", "{parameter_id}[]") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - IncludeX=+:Demo block=+:48=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:13=+:Language Select=+:Language Select=+:mx_language.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Language Select=+:Demo block=+:13=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:14=+:Login=+:Login=+:mx_login.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Login=+:Demo block=+:14=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:11=+:Navigation Menu=+:Menu Navigation=+:mx_menu_nav.php=+:admin/admin_mx_menu.php ! parameter=+:11=+:63=+:menu_display_mode=+:Text=+:Vertical=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:11=+:64=+:menu_page_sync=+:Text=+:0=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Navigation Menu=+:Demo block=+:11=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:19=+:Multiple Horizontal Blocks=+:Block that can arrange other blocks in a horizontal line.=+:mx_multiple_blocks.php=+: ! parameter=+:19=+:60=+:block_ids=+:Function=+:1,2,3=+:get_list_multiple( "{parameter_id}[]", BLOCK_TABLE, 'block_id', 'block_title', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:61=+:block_sizes=+:Text=+:20%,30%,*=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:19=+:62=+:space_between=+:Number=+:4=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Multiple Horizontal Blocks=+:Demo block=+:19=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:18=+:Who is Online=+:Who is Online=+:mx_online.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Who is Online=+:Demo block=+:18=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:12=+:Polls=+:Polls=+:mx_poll.php=+: ! parameter=+:12=+:13=+:Poll_Display=+:Function=+:0=+:poll_select( {parameter_value}, "{parameter_id}" ) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:12=+:36=+:poll_forum=+:Function=+:=+:get_list_multiple("{parameter_id}[]", FORUMS_TABLE, 'forum_id', 'forum_name', "{parameter_value}", TRUE) ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Polls=+:Demo block=+:12=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:97=+:Site Log=+:Site change monitor=+:mx_site_log.php=+: ! parameter=+:97=+:317=+:log_filter_date=+:Function=+:5=+:get_list_static("{parameter_id}[]",array("no limit", "1 day", "2 days", "3 days", "1 week", "2 weeks", "3 weeks", "1 month", "2 months", "3 months", "6 months", "1 year"),"{parameter_value}") ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:97=+:315=+:numOfEvents=+:Number=+:5=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Site Log=+:Demo block=+:97=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:10=+:15=+:Theme Select=+:Theme Select=+:mx_theme.php=+: ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - Theme Select=+:Demo block=+:15=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! function=+:0=+:0=+:0=+:endoflist=+:0=+:0 |
|
From: Jon O. <jon...@us...> - 2005-04-12 17:39:25
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5654/admin Modified Files: pagestart.php Log Message: Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/pagestart.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pagestart.php 17 Mar 2005 11:30:34 -0000 1.8 --- pagestart.php 12 Apr 2005 17:38:36 -0000 1.9 *************** *** 51,55 **** $block_config = read_block_config( $block_id, false ); ! $is_auth_ary = array(); $block_edit_auth = block_auth( AUTH_EDIT, $block_id , $userdata, $block_config[$block_id][auth_edit], $block_config[$block_id][auth_edit_group] ); --- 51,55 ---- $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] ); |
|
From: Jon O. <jon...@us...> - 2005-04-12 17:39:05
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5654 Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** index.php 3 Apr 2005 12:54:24 -0000 1.27 --- index.php 12 Apr 2005 17:38:36 -0000 1.28 *************** *** 1,335 **** ! <?php ! /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * author : jon ohlsson, marc morisette and the MX-Team ! * credits : 2001 The phpBB Group ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : the main mx-portal file ! * ------------------------------------------------------------------------- ! * ! * $Id$ ! */ ! ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! //define('MX_DEBUG', 1); ! define( 'IN_PORTAL', 1 ); ! $mx_root_path = "./"; ! ! include($mx_root_path . 'extension.inc'); ! include($mx_root_path . 'common.' . $phpEx); ! ! $view_page = false; ! ! // Page selector ! ! $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); ! ! // Start session management ! $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); ! mx_init_userprefs($userdata); ! ! if ( $mx_request_vars->is_request('mx_copy') ) ! { ! compose_mx_copy(); ! } ! ! // 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(); ! } ! ! $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] && $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 ( !$is_auth_ary[auth_view] && !$userdata['session_logged_in'] ) ! { ! mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true)); ! } ! include($mx_root_path . 'includes/page_header.' . $phpEx); ! ! // Initialize template ! ! $layouttemplate = new mx_Template($template->root, $board_config, $db); ! ! $layouttemplate->set_filenames(array( ! 'mx_main_layout' => 'mx_main_layout.tpl') ! ); ! ! // 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 ! ! 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 ! ! $show_edit_blocks_icon = false; ! ! 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'] ) ! { ! $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%' ) ! )); ! ! //if ( $block_rows[$block]['function_file'] != 'mx_multiple_blocks.php' ) ! //{ ! // $layouttemplate->assign_block_vars('layout_column.blocks.no_split', array()); ! //} ! ! // 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]) ) ! { ! $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_' . ( $edit_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_' . ( $edit_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); ! ?> \ No newline at end of file --- 1,338 ---- ! <?php ! /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal ! * author : jon ohlsson, marc morisette and the MX-Team ! * credits : 2001 The phpBB Group ! * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... ! * project site : www.mx-system.com ! * ! * description : the main mx-portal file ! * ------------------------------------------------------------------------- ! * ! * $Id$ ! */ ! ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! //define('MX_DEBUG', 1); ! define( 'IN_PORTAL', 1 ); ! $mx_root_path = "./"; ! ! include($mx_root_path . 'extension.inc'); ! include($mx_root_path . 'common.' . $phpEx); ! ! $view_page = false; ! ! // Page selector ! ! $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); ! ! // Start session management ! $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); ! mx_init_userprefs($userdata); ! ! if ( $mx_request_vars->is_request('mx_copy') ) ! { ! compose_mx_copy(); ! } ! ! // 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(); ! } ! ! $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] && $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 ( !$is_auth_ary[auth_view] && !$userdata['session_logged_in'] ) ! { ! mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true)); ! } ! include($mx_root_path . 'includes/page_header.' . $phpEx); ! ! // Initialize template ! ! $layouttemplate = new mx_Template($template->root, $board_config, $db); ! ! $layouttemplate->set_filenames(array( ! 'mx_main_layout' => 'mx_main_layout.tpl') ! ); ! ! // 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 ! ! 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 ! ! $show_edit_blocks_icon = false; ! ! 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'] ) ! { ! $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%' ) ! )); ! ! //if ( $block_rows[$block]['function_file'] != 'mx_multiple_blocks.php' ) ! //{ ! // $layouttemplate->assign_block_vars('layout_column.blocks.no_split', array()); ! //} ! ! // 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 = array(); ! $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']) ) ! { ! $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 = array(); ! $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_' . ( $edit_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_' . ( $edit_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); ! ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-12 17:39:04
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5654/modules/mx_textblocks Modified Files: TextBlocks.pak mx_textblock_bbcode.php mx_textblock_blog.php mx_textblock_html.php mx_textblock_multi.php Log Message: Index: mx_textblock_html.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_html.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_textblock_html.php 9 Jan 2005 21:53:02 -0000 1.5 --- mx_textblock_html.php 12 Apr 2005 17:38:37 -0000 1.6 *************** *** 24,27 **** --- 24,29 ---- $message = $block_config[$block_id][Html]['parameter_value']; + $message = str_replace("\n", "\n<br />\n", $message); + // Start output of page Index: TextBlocks.pak =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/TextBlocks.pak,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TextBlocks.pak 18 Feb 2005 10:10:46 -0000 1.5 --- TextBlocks.pak 12 Apr 2005 17:38:37 -0000 1.6 *************** *** 1,9 **** module=+:20=+:Text Blocks=+:modules/mx_textblocks/=+:Textblocks module=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:20=+:20=+:TextBlock_BBcode=+:TextBlock_BBcode=+:mx_textblock_bbcode.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php parameter=+:20=+:15=+:Text=+:BBText=+:Insert your text here=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - TextBlock_BBcode=+:Demo block=+:20=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:20=+:80=+:TextBlock_Blog=+:UserBlog Textblock=+:mx_textblock_blog.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php --- 1,9 ---- module=+:20=+:Text Blocks=+:modules/mx_textblocks/=+:Textblocks module=+: New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:20=+:20=+:TextBlock (phpBB)=+:BBcodes, html and smilies usage defined by phpBB config=+:mx_textblock_bbcode.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php parameter=+:20=+:15=+:Text=+:BBText=+:Insert your text here=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - TextBlock (phpBB)=+:Demo block=+:20=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:20=+:80=+:TextBlock_Blog=+:UserBlog Textblock=+:mx_textblock_blog.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php *************** *** 13,23 **** block=+:=+:Demo - TextBlock_Blog=+:Demo block=+:80=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:20=+:21=+:TextBlock_Html=+:TextBlock_Html=+:mx_textblock_html.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php parameter=+:21=+:16=+:Html=+:Html=+:Entre your Html code here=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - TextBlock_Html=+:Demo block=+:21=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:20=+:22=+:TextBlock_Multi=+:Textblock for bbcode and html with parameters=+:mx_textblock_multi.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php parameter=+:22=+:52=+:block_style=+:Boolean=+:TRUE=+: option=+:0=+:0=+:0=+:endoflist=+: --- 13,31 ---- block=+:=+:Demo - TextBlock_Blog=+:Demo block=+:80=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:20=+:21=+:TextBlock (Html/wysiwyg)=+:Plain html textblock, or featuring wysiwyg =+:mx_textblock_html.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php parameter=+:21=+:16=+:Html=+:Html=+:Entre your Html code here=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - TextBlock (Html/wysiwyg)=+:Demo block=+:21=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:20=+:22=+:TextBlock (Multi)=+:Textblock, featuring block defined settings=+:mx_textblock_multi.php=+:modules/mx_textblocks/admin/mx_textblock_edit.php ! parameter=+:22=+:327=+:allow_bbcode=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:22=+:326=+:allow_html=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:22=+:326=+:html_tags=+:Text=+:b,i,u,img=+: ! option=+:0=+:0=+:0=+:endoflist=+: ! parameter=+:22=+:328=+:allow_smilies=+:Boolean=+:TRUE=+: ! option=+:0=+:0=+:0=+:endoflist=+: parameter=+:22=+:52=+:block_style=+:Boolean=+:TRUE=+: option=+:0=+:0=+:0=+:endoflist=+: *************** *** 29,32 **** option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - TextBlock_Multi=+:Demo block=+:22=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- 37,40 ---- option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Demo - TextBlock (Multi)=+:Demo block=+:22=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 Index: mx_textblock_multi.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_multi.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_textblock_multi.php 18 Feb 2005 10:10:46 -0000 1.7 --- mx_textblock_multi.php 12 Apr 2005 17:38:37 -0000 1.8 *************** *** 22,31 **** $title = $block_config[$block_id]['block_title']; ! $message = $block_config[$block_id][Text]['parameter_value']; - $block_style = $block_config[$block_id][block_style]['parameter_value']; - $text_style = $block_config[$block_id][text_style]['parameter_value']; - $title_style = $block_config[$block_id][title_style]['parameter_value']; - $show_title = $block_config[$block_id][show_title]['parameter_value']; // ********************************************************************** // Read language definition --- 22,36 ---- $title = $block_config[$block_id]['block_title']; ! $message = $block_config[$block_id]['Text']['parameter_value']; ! ! $block_style = $block_config[$block_id]['block_style']['parameter_value']; ! $text_style = $block_config[$block_id]['text_style']['parameter_value']; ! $title_style = $block_config[$block_id]['title_style']['parameter_value']; ! $show_title = $block_config[$block_id]['show_title']['parameter_value']; ! ! $allow_bbcode = $block_config[$block_id]['allow_bbcode']['parameter_value'] == 'TRUE'; ! $allow_html = $block_config[$block_id]['allow_html']['parameter_value'] == 'TRUE'; ! $allow_smilies = $block_config[$block_id]['allow_smilies']['parameter_value'] == 'TRUE'; // ********************************************************************** // Read language definition *************** *** 53,60 **** $message = trim( $art_pages[$page_num] ); $message = str_replace( '[toc]', '', $message ); // End Pages/TOC - $bbcode_uid = $block_config[$block_id][Text]['bbcode_uid']; - $message = mx_decode( $message, $bbcode_uid ) ; // Start output of page --- 58,76 ---- $message = trim( $art_pages[$page_num] ); $message = str_replace( '[toc]', '', $message ); + + // End Pages/TOC + if ( !$allow_html ) + { + $message = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $message ); + } + + if ( $allow_bbcode ) + { + $bbcode_uid = $block_config[$block_id]['Text']['bbcode_uid']; + $message = mx_decode( $message, $bbcode_uid, $allow_smilies, $allow_bbcode ) ; + } + // Start output of page *************** *** 97,104 **** ) ); - // article pages table of contents - $xtra_dynamic = isset( $HTTP_GET_VARS['dynamic_block'] ) ? '&dynamic_block=' . $HTTP_GET_VARS['dynamic_block']: ''; ! if ( count( $art_pages ) > 1 ) { --- 113,120 ---- ) ); $xtra_dynamic = isset( $HTTP_GET_VARS['dynamic_block'] ) ? '&dynamic_block=' . $HTTP_GET_VARS['dynamic_block']: ''; ! ! // Formatting the TOC ! if ( count( $art_pages ) > 1 ) { *************** *** 106,109 **** --- 122,126 ---- $i = 0; + while ( $i < count( $art_pages ) ) { *************** *** 113,118 **** $article_toc = $art_split[0]; // $article_body = $art_split[1]; // Fix up the toc title ! if ( !$board_config['allow_html'] ) { $article_toc = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $article_toc ); --- 130,136 ---- $article_toc = $art_split[0]; // $article_body = $art_split[1]; + // Fix up the toc title ! if ( !$allow_html ) { $article_toc = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $article_toc ); *************** *** 121,133 **** // Parse message - // $bbcode_uid = $row['bbcode_uid']; - // $article_toc = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $article_toc); $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); - // $txt = preg_replace("/<a href=\"(.*)\">(.*)<\/a>/i", "\\2 (\\1)", $txt); $article_toc = make_clickable( $article_toc ); // Parse smilies ! if ( $board_config['allow_smilies'] ) { $article_toc = mx_smilies_pass( $article_toc ); --- 139,148 ---- // Parse message $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); $article_toc = make_clickable( $article_toc ); // Parse smilies ! if ( $allow_smilies ) { $article_toc = mx_smilies_pass( $article_toc ); *************** *** 140,146 **** --- 155,163 ---- $article_toc = str_replace( '\"', '"', substr( preg_replace( '#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $article_toc . '<' ), 1, -1 ) ); } + // Replace newlines (we use this rather than nl2br because // till recently it wasn't XHTML compliant) // $article_toc = str_replace("\n", "\n<br />\n", $article_toc); + $page_toc = $art_pages[$i]; *************** *** 159,169 **** $page_link .= '<br />'; } $template->assign_block_vars( 'switch_toc.pages', array( 'TOC_ITEM' => $page_link ) ); $i++; } } ! // article pages if ( count( $art_pages ) > 1 ) --- 176,188 ---- $page_link .= '<br />'; } + $template->assign_block_vars( 'switch_toc.pages', array( 'TOC_ITEM' => $page_link ) ); + $i++; } } ! // Formatting the TOC navigation/pagination if ( count( $art_pages ) > 1 ) *************** *** 172,178 **** --- 191,199 ---- $i = 0; + while ( $i < count( $art_pages ) ) { $page_number = $i + 1; + if ( $page_num != $i ) { *************** *** 189,194 **** --- 210,217 ---- $page_link .= ', '; } + $template->assign_block_vars( 'switch_pages.pages', array( 'PAGE_LINK' => $page_link ) ); + $i++; } Index: mx_textblock_blog.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_blog.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_textblock_blog.php 18 Feb 2005 10:10:46 -0000 1.4 --- mx_textblock_blog.php 12 Apr 2005 17:38:37 -0000 1.5 *************** *** 41,46 **** $title = $block_config[$block_id]['block_title']; ! $message = $block_config[$block_id][Blog]['parameter_value']; ! $blog_id = $block_config[$block_id][blog_id]['parameter_value']; // $block_style = $block_config[$block_id][block_style]['parameter_value']; --- 41,46 ---- $title = $block_config[$block_id]['block_title']; ! $message = $block_config[$block_id]['Blog']['parameter_value']; ! $blog_id = $block_config[$block_id]['blog_id']['parameter_value']; // $block_style = $block_config[$block_id][block_style]['parameter_value']; *************** *** 74,78 **** $message = str_replace( '[toc]', '', $message ); // End Pages/TOC ! $bbcode_uid = $block_config[$block_id][Blog]['bbcode_uid']; $message = mx_decode( $message, $bbcode_uid ) ; --- 74,78 ---- $message = str_replace( '[toc]', '', $message ); // End Pages/TOC ! $bbcode_uid = $block_config[$block_id]['Blog']['bbcode_uid']; $message = mx_decode( $message, $bbcode_uid ) ; Index: mx_textblock_bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_bbcode.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_textblock_bbcode.php 9 Jan 2005 21:53:02 -0000 1.6 --- mx_textblock_bbcode.php 12 Apr 2005 17:38:37 -0000 1.7 *************** *** 26,32 **** $message = $block_config[$block_id][Text]['parameter_value']; ! $bbcode_uid = $block_config[$block_id][Text]['bbcode_uid']; ! $message = mx_decode( $message, $bbcode_uid ) ; // Start output of page --- 26,43 ---- $message = $block_config[$block_id][Text]['parameter_value']; ! $bbcode_on = $board_config['allow_bbcode'] ? true : false; ! $html_on = $board_config['allow_html'] ? true : false; ! $smilies_on = $board_config['allow_smilies'] ? true : false; ! ! if ( !$html_on ) ! { ! $message = preg_replace( '#(<)([\/]?.*?)(>)#is', "<\\2>", $message ); ! } ! if ( $bbcode_on ) ! { ! $bbcode_uid = $block_config[$block_id][Text]['bbcode_uid']; ! $message = mx_decode( $message, $bbcode_uid, $smilies_on, $bbcode_on ) ; ! } // Start output of page |
|
From: Jon O. <jon...@us...> - 2005-04-12 17:38:49
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5654/modules/mx_textblocks/templates/subSilver Modified Files: mx_textblock_edit.tpl Log Message: Index: mx_textblock_edit.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/templates/subSilver/mx_textblock_edit.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_textblock_edit.tpl 6 Mar 2005 01:13:53 -0000 1.7 --- mx_textblock_edit.tpl 12 Apr 2005 17:38:38 -0000 1.8 *************** *** 204,207 **** --- 204,220 ---- </script> + <!-- BEGIN tinyMCE --> + <script language="javascript" type="text/javascript" src="../../tinymce/jscripts/tiny_mce/tiny_mce.js"></script> + <script language="javascript" type="text/javascript"> + tinyMCE.init({ + mode : "textareas", + theme : "advanced", + theme_advanced_toolbar_location : "top", + plugins : "table", + theme_advanced_buttons3_add_before : "tablecontrols, separator" + }); + </script> + <!-- END tinyMCE --> + <h1>{L_TITLE}</h1> *************** *** 278,284 **** </table> </td> ! <td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span> <table width="450" border="0" cellspacing="0" cellpadding="2"> ! <!-- BEGIN switch_bbcodes --> <tr align="center" valign="middle"> <td><span class="genmed"> --- 291,297 ---- </table> </td> ! <td class="row2" valign="top"><span class="gen"> <table width="450" border="0" cellspacing="0" cellpadding="2"> ! <!-- BEGIN switch_bbcodes --> <tr align="center" valign="middle"> <td><span class="genmed"> *************** *** 352,356 **** <tr> <td colspan="9"><span class="gen"> ! <textarea name="{BLOCK_TEXT_NAME}" rows="15" cols="35" wrap="virtual" style="width:550px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{BLOCK_INFO}</textarea> </span></td> </tr> --- 365,369 ---- <tr> <td colspan="9"><span class="gen"> ! <textarea name="{BLOCK_TEXT_NAME}" rows="40" cols="35" wrap="virtual" style="width:550px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{BLOCK_INFO}</textarea> </span></td> </tr> *************** *** 362,365 **** --- 375,402 ---- <td class="row2"><span class="gen"> </span> <table cellspacing="0" cellpadding="1" border="0"> + <!-- BEGIN switch_allow_bbcode --> + <tr> + <td class="row2" width="50%"><span class="genmed">{L_ALLOW_BBCODE}</span></td> + <td class="row2" width="50%"><input type="radio" name="allow_bbcode" value="TRUE" {S_ALLOW_BBCODE_YES} /> <span class="gensmall">{L_YES}</span> <input type="radio" name="allow_bbcode" value="FALSE" {S_ALLOW_BBCODE_NO} /> <span class="gensmall">{L_NO}</span></td> + </tr> + <!-- END switch_allow_bbcode --> + <!-- BEGIN switch_allow_html --> + <tr> + <td class="row2" width="50%"><span class="genmed">{L_ALLOW_HTML}</span></td> + <td class="row2" width="50%"><input type="radio" name="allow_html" value="TRUE" {S_ALLOW_HTML_YES} /> <span class="gensmall">{L_YES}</span> <input type="radio" name="allow_html" value="FALSE" {S_ALLOW_HTML_NO} /> <span class="gensmall">{L_NO}</span></td> + </tr> + <!-- END switch_allow_html --> + <!-- BEGIN switch_html_tags --> + <tr> + <td class="row2" width="30%"><span class="genmed">{L_HTML_TAGS}</span></td> + <td class="row2"><input type="text" size="35" name="html_tags" value="{S_HTML_TAGS}" class="post" /></td> + </tr> + <!-- END switch_html_tags --> + <!-- BEGIN switch_allow_smilies --> + <tr> + <td class="row2" width="50%"><span class="genmed">{L_ALLOW_SMILIES}</span></td> + <td class="row2" width="50%"><input type="radio" name="allow_smilies" value="TRUE" {S_ALLOW_SMILIES_YES} /> <span class="gensmall">{L_YES}</span> <input type="radio" name="allow_smilies" value="FALSE" {S_ALLOW_SMILIES_NO} /> <span class="gensmall">{L_NO}</span></td> + </tr> + <!-- END switch_allow_smilies --> <!-- BEGIN switch_block_style --> <tr> |
|
From: Jon O. <jon...@us...> - 2005-04-12 17:38:49
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5654/modules/mx_textblocks/admin Modified Files: mx_textblock_edit.php Log Message: Index: mx_textblock_edit.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/admin/mx_textblock_edit.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mx_textblock_edit.php 21 Mar 2005 21:52:40 -0000 1.15 --- mx_textblock_edit.php 12 Apr 2005 17:38:37 -0000 1.16 *************** *** 59,63 **** // Blog mode: - // $blog_validate = ( $blog_mode == 'group' ) ? mx_auth_group( $sub_id, $userdata['user_id'], true ) : $sub_id == $userdata['user_id']; $blog_validate = ( $blog_mode == 'group' ) ? mx_auth_group_cache( $sub_id, true ) : $sub_id == $userdata['user_id']; --- 59,62 ---- *************** *** 101,151 **** $error = false; - /* - // Toggles - - if ( !$board_config['allow_html'] ) - { - $html_on = 0; - } - else - { - // $html_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_html']) ) ? 0 : TRUE ) : $userdata['user_allowhtml']; - $html_on = true; - } - - if ( !$board_config['allow_bbcode'] ) - { - $bbcode_on = 0; - } - else - { - // $bbcode_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_bbcode']) ) ? 0 : TRUE ) : $userdata['user_allowbbcode']; - $bbcode_on = true; - } - */ - - if ( !$board_config['allow_smilies'] ) - { - $smilies_on = 0; - } - else - { - $smilies_on = ( $submit || $refresh ) ? ( ( !empty( $HTTP_POST_VARS['disable_smilies'] ) ) ? 0 : true ) : $userdata['user_allowsmile']; - } - - $attach_sig = ( $submit || $refresh ) ? ( ( !empty( $HTTP_POST_VARS['attach_sig'] ) ) ? true : 0 ) : $userdata['user_attachsig']; - $user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : ""; - // Define all config data // Main parameters ! $block_title_par = "block_title"; ! $block_desc_par = "block_desc"; ! $show_block_par = "show_block"; ! $show_title_par = "show_title"; ! $show_stats_par = "show_stats"; ! ! if ( isset( $block_config[$block_id]['Html'] ) ) // Html Textblock { $block_text_par = "Html"; --- 100,108 ---- $error = false; // Define all config data // Main parameters ! if ( isset( $block_config[$block_id]['Html']['parameter_value'] ) ) // Html Textblock { $block_text_par = "Html"; *************** *** 153,179 **** $bbcode_on = false; $html_on = true; $html_entities_match = array( ); $html_entities_replace = array( ); } ! else if ( isset( $block_config[$block_id]['Text'] ) ) // Multi or BBcode Textblock { ! $block_text_par = "Text"; ! $mode = "edit"; ! $bbcode_on = true; ! $html_on = true; ! $html_entities_match = array( '#&#', '#<#', '#>#' ); ! $html_entities_replace = array( '&', '<', '>' ); ! } ! else if ( isset( $block_config[$block_id]['Blog'] ) ) // Blog Textblock ! { ! $block_text_par = "Blog"; ! $mode = "editblog"; ! $bbcode_on = true; ! $html_on = true; ! ! $html_entities_match = array( '#&#', '#<#', '#>#' ); ! $html_entities_replace = array( '&', '<', '>' ); } else --- 110,144 ---- $bbcode_on = false; $html_on = true; + $smilies_on = false; $html_entities_match = array( ); $html_entities_replace = array( ); + + // This switch is for enabling the wysiwyg html editor addon "tiny mce". to disable this feature either remove this section or delete the modules/tinymce folder + if ( file_exists( $mx_root_path . 'modules/tinymce/jscripts/tiny_mce/blank.htm' ) ) + { + $template->assign_block_vars( "tinyMCE", array() ); + } + } ! else if ( isset( $block_config[$block_id]['Text']['parameter_value'] ) || isset( $block_config[$block_id]['Blog']['parameter_value'] ) ) // Multi, phpBB, Blog Textblock { ! $block_text_par = isset( $block_config[$block_id]['Blog']['parameter_value'] ) ? "Blog" : "Text"; ! $mode = isset( $block_config[$block_id]['Blog']['parameter_value'] ) ? "editblog" : "edit"; ! if ( isset( $block_config[$block_id]['allow_html'] ) ) ! { ! $bbcode_on = $block_config[$block_id]['allow_bbcode']['parameter_value'] == 'TRUE' ? true : false; ! $html_on = $block_config[$block_id]['allow_html']['parameter_value'] == 'TRUE' ? true : false; ! $smilies_on = $block_config[$block_id]['allow_smilies']['parameter_value'] == 'TRUE' ? true : false; ! ! $board_config['allow_html_tags'] = $block_config[$block_id]['html_tags']['parameter_value']; ! } ! else ! { ! $bbcode_on = $board_config['allow_bbcode'] ? true : false; ! $html_on = $board_config['allow_html'] ? true : false; ! $smilies_on = $board_config['allow_smilies'] ? true : false; ! } } else *************** *** 183,190 **** --- 148,168 ---- } + // Main parameters + $block_title_par = "block_title"; + $block_desc_par = "block_desc"; + $show_block_par = "show_block"; + $show_title_par = "show_title"; + $show_stats_par = "show_stats"; + // Style parameters $block_style_par = "block_style"; $text_style_par = "text_style"; $title_style_par = "title_style"; + + $allow_smilies_par = "allow_smilies"; + $allow_html_par = "allow_html"; + $allow_bbcode_par = "allow_bbcode"; + $html_tags_par = "html_tags"; + $blog_id_par = "blog_id"; *************** *** 193,197 **** $new_vars = array(); ! $new_vars = array( $block_text_par, $block_style_par, $text_style_par, $title_style_par, $blog_id_par ); $new = array(); --- 171,175 ---- $new_vars = array(); ! $new_vars = array( $block_text_par, $block_style_par, $text_style_par, $title_style_par, $allow_smilies_par, $allow_html_par, $allow_bbcode_par, $html_tags_par, $blog_id_par ); $new = array(); *************** *** 217,221 **** $bbcode_uid = make_bbcode_uid(); } - //Format the input: $new[$new_vars[$j]] = prepare_message( trim($new[$new_vars[$j]]), $html_on, $bbcode_on, $smilies_on, $bbcode_uid ); --- 195,198 ---- *************** *** 224,227 **** --- 201,205 ---- if ( $block_config[$block_id][$new_vars[$j]]['sub_id'] == $sub_id ) { + // Note: is str_replace really needed here ?? $sql = "UPDATE " . BLOCK_SYSTEM_PARAMETER_TABLE . " SET parameter_value = '" . str_replace( "\'", "''", $new[$new_vars[$j]] ) . "', *************** *** 276,280 **** show_title = '" . intval( $show_title ) . "', show_stats = '" . intval( $show_stats ) . "' ! WHERE block_id = $block_id"; if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) --- 254,258 ---- show_title = '" . intval( $show_title ) . "', show_stats = '" . intval( $show_stats ) . "' ! WHERE block_id = $block_id"; if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) *************** *** 305,330 **** } - $block_text = $new[$block_text_par]; - $bbcode_uid = $block_config[$block_id][$block_text_par]['bbcode_uid']; ! $blog_id = trim( stripslashes( $new[$blog_id_par] )); ! $block_text = htmlspecialchars( trim( stripslashes( $block_text ) ) ) ; ! $block_title = htmlspecialchars( trim( stripslashes( $block_title ) ) ) ; - if ( $mode != 'edithtml' ) - { - $block_text = preg_replace( "/\:(([a-z0-9]:)?)$bbcode_uid/si", '', $block_text ); - $block_text = str_replace( '<br />', "\n", $block_text ); - $block_text = preg_replace( '#</textarea>#si', '</textarea>', $block_text ); - $block_text = trim( stripslashes( $block_text ) ); - } - else - { - $block_title = trim( strip_tags( stripslashes( $block_title ) ) ); - $block_text = str_replace( '<br />', "\n", $block_text ); - $block_text = preg_replace( '#</textarea>#si', '</textarea>', $block_text ); - $block_text = trim( stripslashes( $block_text ) ); - } // Style parameters $block_style_yes = ( $new[$block_style_par] == 'TRUE' ) ? "checked=\"checked\"" : ""; --- 283,296 ---- } ! // Main ------------------------------------- ! // First (re)declare basic variables ! $block_title = ( isset( $HTTP_POST_VARS[$block_title_par] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS[$block_title_par] ) ) ) : $block_config[$block_id][$block_title_par]; ! $block_desc = ( isset( $HTTP_POST_VARS[$block_desc_par] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS[$block_desc_par] ) ) ): $block_config[$block_id][$block_desc_par]; ! $block_text = ( isset( $HTTP_POST_VARS[$block_text_par] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS[$block_text_par] ) ) ) : $block_config[$block_id][$block_text_par]['parameter_value']; ! ! $blog_id = trim( stripslashes( $new[$blog_id_par] )); // Style parameters $block_style_yes = ( $new[$block_style_par] == 'TRUE' ) ? "checked=\"checked\"" : ""; *************** *** 352,361 **** $title_style_no = ( !( $new[$title_style_par] == 'TRUE' ) ) ? "checked=\"checked\"" : ""; // Main parameters ! $block_title = ( isset( $HTTP_POST_VARS[$block_title_par] ) ) ? stripslashes( htmlspecialchars( $HTTP_POST_VARS[$block_title_par] ) ) : $block_config[$block_id][$block_title_par]; ! $block_desc = ( isset( $HTTP_POST_VARS[$block_desc_par] ) ) ? stripslashes( htmlspecialchars( $HTTP_POST_VARS[$block_desc_par] ) ) : $block_config[$block_id][$block_desc_par]; ! $show_block = ( isset( $HTTP_POST_VARS[$show_block_par] ) ) ? intval( $HTTP_POST_VARS[$show_block_par] ) : $block_config[$block_id][$show_block_par]; ! $show_title = ( isset( $HTTP_POST_VARS[$show_title_par] ) ) ? intval( $HTTP_POST_VARS[$show_title_par] ) : $block_config[$block_id][$show_title_par]; ! $show_stats = ( isset( $HTTP_POST_VARS[$show_stats_par] ) ) ? intval( $HTTP_POST_VARS[$show_stats_par] ) : $block_config[$block_id][$show_stats_par]; $show_title_yes = ( $show_title == 1 ) ? "checked=\"checked\"" : ""; --- 318,336 ---- $title_style_no = ( !( $new[$title_style_par] == 'TRUE' ) ) ? "checked=\"checked\"" : ""; + $allow_smilies_yes = ( $new[$allow_smilies_par] == 'TRUE' ) ? "checked=\"checked\"" : ""; + $allow_smilies_no = ( !( $new[$allow_smilies_par] == 'TRUE' ) ) ? "checked=\"checked\"" : ""; + + $allow_html_yes = ( $new[$allow_html_par] == 'TRUE' ) ? "checked=\"checked\"" : ""; + $allow_html_no = ( !( $new[$allow_html_par] == 'TRUE' ) ) ? "checked=\"checked\"" : ""; + + $allow_bbcode_yes = ( $new[$allow_bbcode_par] == 'TRUE' ) ? "checked=\"checked\"" : ""; + $allow_bbcode_no = ( !( $new[$allow_bbcode_par] == 'TRUE' ) ) ? "checked=\"checked\"" : ""; + + $textblock_allowed_html_tags = $new[$html_tags_par]; + // Main parameters ! $show_block = ( isset( $HTTP_POST_VARS[$show_block_par] ) ) ? intval( $HTTP_POST_VARS[$show_block_par] ) : $block_config[$block_id][$show_block_par]['parameter_value']; ! $show_title = ( isset( $HTTP_POST_VARS[$show_title_par] ) ) ? intval( $HTTP_POST_VARS[$show_title_par] ) : $block_config[$block_id][$show_title_par]['parameter_value']; ! $show_stats = ( isset( $HTTP_POST_VARS[$show_stats_par] ) ) ? intval( $HTTP_POST_VARS[$show_stats_par] ) : $block_config[$block_id][$show_stats_par]['parameter_value']; $show_title_yes = ( $show_title == 1 ) ? "checked=\"checked\"" : ""; *************** *** 370,375 **** // Start output, first preview, then errors then post form ! $title = $block_config[$block_id]['block_title']; ! $page_title = $title; $template->assign_block_vars( "switch_view", array() ); --- 345,349 ---- // Start output, first preview, then errors then post form ! $page_title = $block_title; $template->assign_block_vars( "switch_view", array() ); *************** *** 384,387 **** --- 358,362 ---- include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } + // -------------------------------------------------------- // Previews Layout *************** *** 389,396 **** if ( $preview && !$error ) { ! $preview_title = $block_title; $preview_text = $block_text; ! ! // $preview_text = preg_replace( '#<textarea>#si', '<textarea>', $preview_text ); $orig_word = array(); --- 364,370 ---- if ( $preview && !$error ) { ! $preview_title = $block_title; $preview_text = $block_text; ! $orig_word = array(); *************** *** 398,414 **** obtain_word_list( $orig_word, $replacement_word ); ! if ( $bbcode_on && $mode != 'edithtml' ) ! { ! $bbcode_uid = make_bbcode_uid(); ! } ! ! //$mxbb_tmp = $board_config['allow_html_tags']; //Should we have specfic allowed tags spec for mx textblocks? ! //$board_config['allow_html_tags'] = ''; $preview_text = stripslashes(prepare_message(addslashes(unprepare_message($preview_text)), $html_on, $bbcode_on, $smilies_on, $bbcode_uid)); - //$board_config['allow_html_tags'] = $mxbb_tmp; - - // Finalise processing as per viewtopic ! if ( $bbcode_on && $mode != 'edithtml' ) { $preview_text = bbencode_second_pass( $preview_text, $bbcode_uid ); --- 372,379 ---- obtain_word_list( $orig_word, $replacement_word ); ! $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : ''; $preview_text = stripslashes(prepare_message(addslashes(unprepare_message($preview_text)), $html_on, $bbcode_on, $smilies_on, $bbcode_uid)); ! if ( $bbcode_on ) { $preview_text = bbencode_second_pass( $preview_text, $bbcode_uid ); *************** *** 421,425 **** } ! if ( $smilies_on && $mode != 'edithtml' ) { $preview_text = mx_smilies_pass( $preview_text ); --- 386,390 ---- } ! if ( $smilies_on ) { $preview_text = mx_smilies_pass( $preview_text ); *************** *** 428,435 **** $preview_text = make_clickable( $preview_text ); ! if ( $mode != 'edithtml' ) ! { ! $preview_text = str_replace( "\n", '<br />', $preview_text ); ! } $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />'; --- 393,397 ---- $preview_text = make_clickable( $preview_text ); ! $preview_text = str_replace( "\n", '<br />', $preview_text ); $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />'; *************** *** 451,454 **** --- 413,448 ---- $template->assign_var_from_handle( 'POST_PREVIEW_BOX', 'preview' ); } + else + { + + $bbcode_uid = $block_config[$block_id][$block_text_par]['bbcode_uid']; + + if ( $bbcode_uid != '' ) + { + $block_text = preg_replace('/\:(([a-z0-9]:)?)' . $bbcode_uid . '/s', '', $block_text); + } + + $block_text = str_replace('<', '<', $block_text); + $block_text = str_replace('>', '>', $block_text); + $block_text = str_replace('<br />', "\n", $block_text); + + /* + if ( $mode != 'edithtml' ) + { + $block_text = preg_replace( "/\:(([a-z0-9]:)?)$bbcode_uid/si", '', $block_text ); + $block_text = str_replace( '<br />', "\n", $block_text ); + $block_text = preg_replace( '#</textarea>#si', '</textarea>', $block_text ); + $block_text = trim( stripslashes( $block_text ) ); + $block_text = unprepare_message($block_text); + } + else + { + $block_title = trim( strip_tags( stripslashes( $block_title ) ) ); + $block_text = str_replace( '<br />', "\n", $block_text ); + $block_text = preg_replace( '#</textarea>#si', '</textarea>', $block_text ); + $block_text = trim( stripslashes( $block_text ) ); + } + */ + } // -------------------------------------------------------- // Default Layout *************** *** 465,471 **** } // Send smilies to template ! if ( $mode != 'edithtml' ) { mx_generate_smilies( 'inline', PAGE_INDEX ); --- 459,498 ---- } + // HTML toggle selection + + if ( $html_on ) + { + $html_status = $lang['HTML_is_ON']; + } + else + { + $html_status = $lang['HTML_is_OFF']; + } + + // BBCode toggle selection + + if ( $bbcode_on ) + { + $bbcode_status = $lang['BBCode_is_ON']; + } + else + { + $bbcode_status = $lang['BBCode_is_OFF']; + } + + // Smilies toggle selection + + if ( $smilies_on ) + { + $smilies_status = $lang['Smilies_are_ON']; + } + else + { + $smilies_status = $lang['Smilies_are_OFF']; + } + // Send smilies to template ! if ( $smilies_on ) { mx_generate_smilies( 'inline', PAGE_INDEX ); *************** *** 489,493 **** } ! if ( $mode != 'edithtml' ) { $template->assign_block_vars( "switch_bbcodes", array() ); --- 516,520 ---- } ! if ( $bbcode_on ) { $template->assign_block_vars( "switch_bbcodes", array() ); *************** *** 499,514 **** } ! if ( !empty( $new[$text_style_par] ) ) { $template->assign_block_vars( "switch_text_style", array() ); - } - if ( !empty( $new[$block_style_par] ) ) - { $template->assign_block_vars( "switch_block_style", array() ); - } - if ( !empty( $new[$title_style_par] ) ) - { $template->assign_block_vars( "switch_title_style", array() ); } if ( !empty( $new[$blog_id_par] ) && $sub_id == 0 ) { --- 526,544 ---- } ! echo(var_export($block_edit_auth)); ! ! // For Multi block ! if ( !empty( $new[$text_style_par] ) && $block_edit_auth['auth_mod']) { $template->assign_block_vars( "switch_text_style", array() ); $template->assign_block_vars( "switch_block_style", array() ); $template->assign_block_vars( "switch_title_style", array() ); + $template->assign_block_vars( "switch_allow_smilies", array() ); + $template->assign_block_vars( "switch_allow_bbcode", array() ); + $template->assign_block_vars( "switch_allow_html", array() ); + $template->assign_block_vars( "switch_html_tags", array() ); } + + // For Blogs if ( !empty( $new[$blog_id_par] ) && $sub_id == 0 ) { *************** *** 519,525 **** 'L_TITLE' => $lang['Block_admin'], 'L_EXPLAIN' => $lang['Block_admin_explain'], ! 'BLOCK_TITLE' => $block_title, ! 'BLOCK_INFO' => $block_text, 'HTML_STATUS' => $html_status, 'SMILIES_STATUS' => $smilies_status, --- 549,556 ---- 'L_TITLE' => $lang['Block_admin'], 'L_EXPLAIN' => $lang['Block_admin_explain'], ! //'BLOCK_TITLE' => $block_title, ! 'HTML_STATUS' => $html_status, + 'BBCODE_STATUS' => $bbcode_status, 'SMILIES_STATUS' => $smilies_status, *************** *** 529,532 **** --- 560,568 ---- 'L_TEXT_STYLE' => $lang['Text_Style'], 'L_TITLE_STYLE' => $lang['Title_Style'], + + 'L_ALLOW_SMILIES' => $lang['Allow_smilies'], + 'L_ALLOW_HTML' => $lang['Allow_HTML'], + 'L_ALLOW_BBCODE' => $lang['Allow_BBCode'], + 'L_HTML_TAGS' => $lang['Allowed_tags'], 'L_YES' => $lang['Yes'], *************** *** 606,609 **** --- 642,656 ---- 'S_TITLE_STYLE_NO' => $title_style_no, + 'S_ALLOW_BBCODE_YES' => $allow_bbcode_yes, + 'S_ALLOW_BBCODE_NO' => $allow_bbcode_no, + + 'S_ALLOW_HTML_YES' => $allow_html_yes, + 'S_ALLOW_HTML_NO' => $allow_html_no, + + 'S_ALLOW_SMILIES_YES' => $allow_smilies_yes, + 'S_ALLOW_SMILIES_NO' => $allow_smilies_no, + + 'S_HTML_TAGS' => $textblock_allowed_html_tags, + 'L_BLOCK_TITLE' => $lang['Block_title'], 'L_BLOCK_DESC' => $lang['Block_desc'], *************** *** 614,617 **** --- 661,665 ---- 'E_BLOCK_TITLE' => $block_title, 'E_BLOCK_DESC' => $block_desc, + 'BLOCK_INFO' => $block_text, 'S_SHOW_BLOCK_YES' => $show_block_yes, |
|
From: Markus P. <mar...@us...> - 2005-04-12 02:08:16
|
Update of /cvsroot/mxbb/core/modules/mx_core_portal/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26287/subSilver Added Files: keepme.txt Log Message: Added templates/subSilver folder for Core Blocks module. --- NEW FILE: keepme.txt --- |
|
From: Markus P. <mar...@us...> - 2005-04-12 00:32:15
|
Update of /cvsroot/mxbb/core/modules/mx_core_portal/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13384/subSilver Log Message: Directory /cvsroot/mxbb/core/modules/mx_core_portal/templates/subSilver added to the repository |
|
From: Markus P. <mar...@us...> - 2005-04-12 00:30:31
|
Update of /cvsroot/mxbb/core/modules/mx_core_portal/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12351/templates Log Message: Directory /cvsroot/mxbb/core/modules/mx_core_portal/templates added to the repository |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:08:35
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20618/modules/mx_kb/admin Modified Files: admin_kb_cat.php admin_kb_custom.php admin_kb_rebuild_search.php Log Message: fixing up Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin_kb_cat.php 9 Apr 2005 21:41:27 -0000 1.12 --- admin_kb_cat.php 11 Apr 2005 20:07:55 -0000 1.13 *************** *** 679,683 **** $template->pparse( 'body' ); - // include('./page_footer_admin.'.$phpEx); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 679,682 ---- Index: admin_kb_rebuild_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_rebuild_search.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_kb_rebuild_search.php 9 Apr 2005 21:41:27 -0000 1.5 --- admin_kb_rebuild_search.php 11 Apr 2005 20:07:56 -0000 1.6 *************** *** 146,152 **** } - // include ('./page_header_admin.'.$phpEx); - include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); - $template->assign_vars (array ( 'PERCENT' => round ((($start + $num_rows) / $total_num_rows) * 100), --- 146,149 ---- *************** *** 160,167 **** "body" => "admin/kb_rebuild_search_progress.tpl") ); ! } else { ! // include('./page_header_admin.'.$phpEx); ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); ! $template->assign_vars (array ( 'L_REBUILD_SEARCH' => $lang['Rebuild_search'], --- 157,163 ---- "body" => "admin/kb_rebuild_search_progress.tpl") ); ! } ! else ! { $template->assign_vars (array ( 'L_REBUILD_SEARCH' => $lang['Rebuild_search'], Index: admin_kb_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_custom.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_kb_custom.php 9 Apr 2005 21:41:27 -0000 1.5 --- admin_kb_custom.php 11 Apr 2005 20:07:56 -0000 1.6 *************** *** 235,241 **** 'L_FIELD_ORDER' => $lang['Field_order'], ! 'DATA' => ( $field_type != INPUT && $field_type != TEXTAREA ) ? true : false, ! 'REGEX' => ( $field_type == INPUT || $field_type == TEXTAREA ) ? true : false, ! 'ORDER' => ( $field_id ) ? true : false, 'FIELD_NAME' => $data['custom_name'], --- 235,241 ---- 'L_FIELD_ORDER' => $lang['Field_order'], ! //'DATA' => ( $field_type != INPUT && $field_type != TEXTAREA ) ? true : false, ! //'REGEX' => ( $field_type == INPUT || $field_type == TEXTAREA ) ? true : false, ! //'ORDER' => ( $field_id ) ? true : false, 'FIELD_NAME' => $data['custom_name'], *************** *** 245,248 **** --- 245,261 ---- 'FIELD_ORDER' => $data['field_order'] ) ); + + if ( $field_type != INPUT && $field_type != TEXTAREA ) + { + $template->assign_block_vars( 'data', array() ); + } + if ( $field_type == INPUT || $field_type == TEXTAREA ) + { + $template->assign_block_vars( 'regex', array() ); + } + if ( $field_id ) + { + $template->assign_block_vars( 'order', array() ); + } } elseif ( $mode == 'add' ) *************** *** 274,283 **** $template->pparse( 'admin' ); - //$pafiledb->_pafiledb(); - //$cache->unload(); - - /* Original - include('./page_footer_admin.'.$phpEx); - */ // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 287,290 ---- |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:08:09
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20618/modules/mx_kb/includes Modified Files: functions_kb_field.php kb_constants.php Log Message: fixing up Index: functions_kb_field.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb_field.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_kb_field.php 2 Apr 2005 20:37:02 -0000 1.3 --- functions_kb_field.php 11 Apr 2005 20:07:57 -0000 1.4 *************** *** 470,476 **** { $return_array = $this->field_rowset[$field_id]; ! $return_array['data'] = implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ); return $return_array; } // =================================================== // file data in custom field operations --- 470,477 ---- { $return_array = $this->field_rowset[$field_id]; ! $return_array['data'] = !empty( $return_array['data'] ) ? implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ) : ''; return $return_array; } + // =================================================== // file data in custom field operations Index: kb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_constants.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** kb_constants.php 9 Apr 2005 21:41:28 -0000 1.25 --- kb_constants.php 11 Apr 2005 20:07:57 -0000 1.26 *************** *** 111,115 **** if ( !MXBB_MODULE || MXBB_27x ) { ! $kb_module_version = "Knowledge Base v. 2.0"; $kb_module_author = "Haplo"; $kb_module_orig_author = "wGEric"; --- 111,115 ---- if ( !MXBB_MODULE || MXBB_27x ) { ! $kb_module_version = "Knowledge Base v. 2.0.x"; $kb_module_author = "Haplo"; $kb_module_orig_author = "wGEric"; |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:08:08
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20618/modules/mx_kb Modified Files: db_install.php db_upgrade.php install_kb_tables.php Log Message: fixing up Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/install_kb_tables.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** install_kb_tables.php 9 Apr 2005 21:41:28 -0000 1.1 --- install_kb_tables.php 11 Apr 2005 20:07:57 -0000 1.2 *************** *** 53,64 **** } - $userdata = session_pagestart($user_ip, PAGE_INDEX); - init_userprefs($userdata); - - if ( $userdata['user_level'] != ADMIN ) - { - message_die(GENERAL_ERROR, "You must be an Administrator to use this page."); - } - define('KB_VERSION','KB MOD 2.0.1e'); ?> --- 53,56 ---- Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** db_install.php 9 Apr 2005 21:41:27 -0000 1.27 --- db_install.php 11 Apr 2005 20:07:56 -0000 1.28 *************** *** 24,28 **** $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.0'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; --- 24,28 ---- $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.1c'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** db_upgrade.php 9 Apr 2005 21:41:27 -0000 1.20 --- db_upgrade.php 11 Apr 2005 20:07:56 -0000 1.21 *************** *** 24,28 **** $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.0'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; --- 24,28 ---- $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.1c'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; *************** *** 261,264 **** --- 261,269 ---- $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_fixup', '0')"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_articles MODIFY article_author_id mediumint(8) NOT NULL "; + + // Upgrade the config table to avoid duplicate entries + //$sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config MODIFY config_name VARCHAR(255) NOT NULL default '' "; + //$sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; + //$sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; } |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:08:08
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20618/modules/mx_kb/language/lang_english Modified Files: lang_kb.php Log Message: fixing up Index: lang_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_kb.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** lang_kb.php 9 Apr 2005 21:41:28 -0000 1.19 --- lang_kb.php 11 Apr 2005 20:07:58 -0000 1.20 *************** *** 383,387 **** $lang['Wysiwyg_path'] = 'Path to wysiwyg software'; ! $lang['Wysiwyg_path_explain'] = 'This is the path (from mxBB root) to the wysiwyg software folder, eg \'modules/\' if you have uploaded for example tinemce in modules/tinymce.'; $lang['Formatting_fixup'] = 'Fixup formatting'; --- 383,387 ---- $lang['Wysiwyg_path'] = 'Path to wysiwyg software'; ! $lang['Wysiwyg_path_explain'] = 'This is the path (from mxBB/phpBB root) to the wysiwyg software folder, eg \'modules/\' if you have uploaded for example tinemce in modules/tinymce.'; $lang['Formatting_fixup'] = 'Fixup formatting'; |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:08:08
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20618/modules/mx_kb/templates/subSilver/admin Modified Files: kb_field_add.tpl Log Message: fixing up Index: kb_field_add.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_field_add.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kb_field_add.tpl 28 Mar 2005 20:22:48 -0000 1.1 --- kb_field_add.tpl 11 Apr 2005 20:07:58 -0000 1.2 *************** *** 5,9 **** <form action="{S_FIELD_ACTION}" method="post"> ! <!-- IF ERROR neq '' --> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> --- 5,9 ---- <form action="{S_FIELD_ACTION}" method="post"> ! <!-- BEGIN error --> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> *************** *** 12,16 **** </table> <br /> ! <!-- ENDIF --> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> --- 12,17 ---- </table> <br /> ! <!-- END error --> ! <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> *************** *** 25,48 **** <td class="row2"><input type="text" class="post" size="50" name="field_desc" value="{FIELD_DESC}" /></td> </tr> ! <!-- IF DATA --> <tr> <td class="row1">{L_FIELD_DATA}<br><span class="gensmall">{L_FIELD_DATA_INFO}</span></td> <td class="row2"><textarea rows="6" name="data" cols="32">{FIELD_DATA}</textarea></td> </tr> ! <!-- ENDIF --> ! <!-- IF REGEX --> <tr> <td class="row1">{L_FIELD_REGEX}<br><span class="gensmall">{L_FIELD_REGEX_INFO}</span></td> <td class="row2"><input type="text" class="post" size="50" name="regex" value="{FIELD_REGEX}" /></td> </tr> ! <!-- ENDIF --> ! <!-- IF ORDER --> <tr> <td width="50%" class="row1">{L_FIELD_ORDER}</td> <td class="row2"><input type="text" class="post" size="6" name="field_order" value="{FIELD_ORDER}" /></td> </tr> ! <!-- ENDIF --> <tr> <td align="center" class="cat" colspan="2"> --- 26,49 ---- <td class="row2"><input type="text" class="post" size="50" name="field_desc" value="{FIELD_DESC}" /></td> </tr> ! <!-- BEGIN data --> <tr> <td class="row1">{L_FIELD_DATA}<br><span class="gensmall">{L_FIELD_DATA_INFO}</span></td> <td class="row2"><textarea rows="6" name="data" cols="32">{FIELD_DATA}</textarea></td> </tr> ! <!-- END data --> ! <!-- BEGIN regex --> <tr> <td class="row1">{L_FIELD_REGEX}<br><span class="gensmall">{L_FIELD_REGEX_INFO}</span></td> <td class="row2"><input type="text" class="post" size="50" name="regex" value="{FIELD_REGEX}" /></td> </tr> ! <!-- END regex --> ! <!-- BEGIN order --> <tr> <td width="50%" class="row1">{L_FIELD_ORDER}</td> <td class="row2"><input type="text" class="post" size="6" name="field_order" value="{FIELD_ORDER}" /></td> </tr> ! <!-- END order --> <tr> <td align="center" class="cat" colspan="2"> |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:00:30
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15485/modules/mx_pafiledb/pafiledb/includes Modified Files: pafiledb_constants.php Log Message: fixing up Index: pafiledb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/pafiledb_constants.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pafiledb_constants.php 11 Apr 2005 17:55:41 -0000 1.9 --- pafiledb_constants.php 11 Apr 2005 20:00:19 -0000 1.10 *************** *** 31,34 **** --- 31,35 ---- $is_block = false; // This also makes the script work for phpBB ;) } + define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) // define('PAFILEDB_DEBUG', 0); // Pafiledb Mod Debugging off |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:00:30
|
Update of /cvsroot/mxbb/mx_pafiledb/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15485/modules/mx_pafiledb/language/lang_english Modified Files: lang_admin_pafiledb.php Log Message: fixing up Index: lang_admin_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/language/lang_english/lang_admin_pafiledb.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** lang_admin_pafiledb.php 11 Apr 2005 17:55:40 -0000 1.11 --- lang_admin_pafiledb.php 11 Apr 2005 20:00:18 -0000 1.12 *************** *** 135,141 **** $lang['Max_filesize_explain'] = 'Maximum filesize for Files. A value of 0 means \'unlimited\'. This Setting is restricted by your Server Configuration. For example, if your php Configuration only allows a maximum of 2 MB uploads, this cannot be overwritten by the Mod.'; $lang['Upload_directory'] = 'Upload Directory'; ! $lang['Upload_directory_explain'] = 'Enter the relative path from your module installation to the Files upload directory. For example, enter \'pafiledb/uploads/\' if your module installation is located at http://www.yourdomain.com/mx/modules/mx_pafiledb and the Attachment Upload Directory is located at http://www.yourdomain.com/mx/modules/mx_pafiledb/ pafiledb/uploads.'; $lang['Screenshots_directory'] = 'Screenshots Directory'; ! $lang['Screenshots_directory_explain'] = 'Enter the relative path from your module installation to the Screenshots upload directory. For example, enter \'pafiledb/images/screenshots/\' if your module installation is located at http://www.yourdomain.com/mx/modules/mx_pafiledb and the Attachment Upload Directory is located at http://www.yourdomain.com/mx/modules/mx_pafiledb/ pafiledb/images/screenshots.'; $lang['Forbidden_extensions'] = 'Forbidden Extensions'; $lang['Forbidden_extensions_explain'] = 'Here you can add or delete the forbidden extensions. Seprate each extenstion with comma.'; --- 135,141 ---- $lang['Max_filesize_explain'] = 'Maximum filesize for Files. A value of 0 means \'unlimited\'. This Setting is restricted by your Server Configuration. For example, if your php Configuration only allows a maximum of 2 MB uploads, this cannot be overwritten by the Mod.'; $lang['Upload_directory'] = 'Upload Directory'; ! $lang['Upload_directory_explain'] = 'Enter the relative path from your root installation (where phpBB or mxBB is located) to the files upload directory. If you stick to the file structure provided in the shipped package, enter \'pafiledb/uploads/\'.'; $lang['Screenshots_directory'] = 'Screenshots Directory'; ! $lang['Screenshots_directory_explain'] = 'Enter the relative path from your root installation (where phpBB or mxBB is located) to the Screenshots upload directory. If you stick to the file structure provided in the shipped package, enter \'pafiledb/images/screenshots/\'.'; $lang['Forbidden_extensions'] = 'Forbidden Extensions'; $lang['Forbidden_extensions_explain'] = 'Here you can add or delete the forbidden extensions. Seprate each extenstion with comma.'; |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:00:27
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15485/modules/mx_pafiledb/pafiledb/docs Modified Files: pafiledb_installer.php update_009d_mx201.sql Log Message: fixing up Index: pafiledb_installer.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/docs/pafiledb_installer.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pafiledb_installer.php 11 Apr 2005 17:55:44 -0000 1.3 --- pafiledb_installer.php 11 Apr 2005 20:00:18 -0000 1.4 *************** *** 1,9 **** --- 1,13 ---- <?php + define( 'MXBB_MODULE', false ); // Switch for making this run as a phpBB mod or mxBB module define( 'IN_PHPBB', true ); define( 'IN_DOWNLOAD', true ); + $phpbb_root_path = './../../'; include( $phpbb_root_path . 'extension.inc' ); include( $phpbb_root_path . 'common.' . $phpEx ); + define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) + // Start session management *************** *** 15,19 **** if ( $userdata['user_level'] != ADMIN ) { ! message_die( GENERAL_MESSAGE, $lang['Not_admin'] ); } --- 19,23 ---- if ( $userdata['user_level'] != ADMIN ) { ! die( 'not authorized - login as admin' ); } *************** *** 195,200 **** <b><a href="pafiledb_installer.php?action=update009a">Update From pafiledb 0.0.9a</a></b><br /> <b><a href="pafiledb_installer.php?action=update009b">Update From pafiledb 0.0.9b</a></b><br /> ! <b><a href="pafiledb_installer.php?action=update009d_mx10">Update From pafiledb 0.0.9d</a></b> ! <b><a href="pafiledb_installer.php?action=update009d_mx201">Update From pafiledb 0.0.9d + mxaddon 1.0.3</a></b> </center>'; } --- 199,204 ---- <b><a href="pafiledb_installer.php?action=update009a">Update From pafiledb 0.0.9a</a></b><br /> <b><a href="pafiledb_installer.php?action=update009b">Update From pafiledb 0.0.9b</a></b><br /> ! <b><a href="pafiledb_installer.php?action=update009d_mx10">Update From pafiledb 0.0.9d</a></b><br /> ! <b><a href="pafiledb_installer.php?action=update009d_mx201">Update From pafiledb 0.0.9d + mxaddon 1.02</a></b><br /> </center>'; } Index: update_009d_mx201.sql =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/docs/update_009d_mx201.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** update_009d_mx201.sql 11 Apr 2005 17:55:44 -0000 1.1 --- update_009d_mx201.sql 11 Apr 2005 20:00:18 -0000 1.2 *************** *** 1,7 **** ALTER TABLE phpbb_pa_cat ! ADD auth_approval tinyint(1) DEFAULT '0' NOT NULL AFTER auth_delete_comment; ALTER TABLE phpbb_pa_auth ! ADD auth_approval tinyint(2) DEFAULT '0' NOT NULL AFTER auth_delete_comment, MODIFY auth_edit_file tinyint(2) DEFAULT '0' NOT NULL, MODIFY auth_delete_file tinyint(2) DEFAULT '0' NOT NULL; --- 1,9 ---- ALTER TABLE phpbb_pa_cat ! ADD auth_approval tinyint(2) DEFAULT '0' NOT NULL AFTER auth_delete_comment; ALTER TABLE phpbb_pa_auth ! ADD auth_approval tinyint(1) DEFAULT '0' NOT NULL AFTER auth_delete_comment; ! ! ALTER TABLE phpbb_pa_cat MODIFY auth_edit_file tinyint(2) DEFAULT '0' NOT NULL, MODIFY auth_delete_file tinyint(2) DEFAULT '0' NOT NULL; |
|
From: Jon O. <jon...@us...> - 2005-04-11 20:00:26
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15485/modules/mx_pafiledb Modified Files: db_upgrade.php Log Message: fixing up Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** db_upgrade.php 11 Apr 2005 17:55:40 -0000 1.6 --- db_upgrade.php 11 Apr 2005 20:00:18 -0000 1.7 *************** *** 106,114 **** { ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_cat ADD auth_approval tinyint(1) DEFAULT '0' NOT NULL AFTER auth_delete_comment "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_auth ADD auth_approval tinyint(2) DEFAULT '0' NOT NULL AFTER auth_delete_comment "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_auth MODIFY auth_edit_file tinyint(2) DEFAULT '0' NOT NULL "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_auth MODIFY auth_delete_file tinyint(2) DEFAULT '0' NOT NULL "; // Upgrade the config table to avoid duplicate entries --- 106,114 ---- { ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_cat ADD auth_approval tinyint(2) DEFAULT '0' NOT NULL AFTER auth_delete_comment "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_auth ADD auth_approval tinyint(1) DEFAULT '0' NOT NULL AFTER auth_delete_comment "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_cat MODIFY auth_edit_file tinyint(2) DEFAULT '0' NOT NULL "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_cat MODIFY auth_delete_file tinyint(2) DEFAULT '0' NOT NULL "; // Upgrade the config table to avoid duplicate entries |
|
From: Jon O. <jon...@us...> - 2005-04-11 17:58:13
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5043/modules/mx_pafiledb/pafiledb/docs Removed Files: update_to_0.0.9d.txt update_to_0.0.9d_mx_addon_1.0.txt Log Message: removed not used files --- update_to_0.0.9d.txt DELETED --- --- update_to_0.0.9d_mx_addon_1.0.txt DELETED --- |
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2875/modules/mx_pafiledb/pafiledb/includes Modified Files: functions.php functions_comment.php functions_field.php functions_pafiledb.php pafiledb_constants.php Added Files: functions_mx.php Log Message: finally upgrading this module/mod - merging phpBB mod, mxBB module (2.7.x and 2.8) -.permissions reviewed - pm notification added - and many many minor fixes all over the place Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** functions.php 9 Jan 2005 21:44:14 -0000 1.12 --- functions.php 11 Apr 2005 17:55:40 -0000 1.13 *************** *** 168,172 **** global $phpbb_root_path, $lang, $phpEx, $board_config, $pafiledb_config, $userdata; // MX ! global $mx_root_path, $module_root_path, $is_block, $phpEx; @set_time_limit( 0 ); --- 168,172 ---- global $phpbb_root_path, $lang, $phpEx, $board_config, $pafiledb_config, $userdata; // MX ! global $pafiledb, $cat_id, $mx_root_path, $module_root_path, $is_block, $phpEx; @set_time_limit( 0 ); *************** *** 185,189 **** // if the file size is more than the allowed size another error message // ======================================================= ! if ( $userfile_size > $pafiledb_config['max_file_size'] && $userdata['user_level'] != ADMIN && $userdata['session_logged_in'] ) { $file_info['error'] = true; --- 185,189 ---- // if the file size is more than the allowed size another error message // ======================================================= ! if ( $userfile_size > $pafiledb_config['max_file_size'] && ( $pafiledb->modules[$pafiledb->module_name]->auth[$cat_id]['auth_mod'] || $userdata['user_level'] != ADMIN ) && $userdata['session_logged_in'] ) { $file_info['error'] = true; *************** *** 933,935 **** --- 933,1372 ---- } + // email admin + + function pa_notify( $action = 1, $message, $to_id, $from_id, $info = 'new' ) + { + global $lang, $board_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx, $userdata; + + switch ( $info ) + { + case 'new': + $subject_tmp = $lang['PA_notify_subject_new']; + break; + + case 'edited': + $subject_tmp = $lang['PA_notify_subject_edited']; + break; + + case 'approved': + $subject_tmp = $lang['PA_notify_subject_approved']; + break; + + case 'unapproved': + $subject_tmp = $lang['PA_notify_subject_unapproved']; + break; + } + + if ( $action == 2 ) // Mail + { + $email_subject = $lang['PA_title'] . ' - ' . $subject_tmp; + $email_body = $lang['PA_notify_body'] . '\n\n\n' . $message; + + pa_mailer( $to_id, $email_body, $email_subject, $from_id ); + + } + else if ( $action == 1 ) // PM + { + $email_subject = $lang['PA_title'] . ' - ' . $subject_tmp; + $email_body = $lang['PA_notify_body'] . '\n\n\n' . $message; + + pa_insert_pm( $to_id, $email_body, $email_subject, $from_id ); + } + } + + // wgErics good old insert_pm function + function pa_insert_pm( + $to_id, + $message, + $subject, + $from_id, + $html_on = 0, + $bbcode_on = 1, + $smilies_on = 1) + { + global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; + + if ( empty( $from_id ) ) + { + $from_id = $userdata['user_id']; + } + + //get varibles ready + $to_id = intval($to_id); + $from_id = intval($from_id); + $msg_time = time(); + $attach_sig = $userdata['user_attachsig']; + + // Why send PM to yourself??? + if ( $to_id == $from_id ) + { + return; + } + + //get to users info + $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active + FROM " . USERS_TABLE . " + WHERE user_id = '$to_id' + AND user_id <> " . ANONYMOUS; + if ( !($result = $db->sql_query($sql)) ) + { + $error = TRUE; + $error_msg = $lang['No_such_user']; + } + + $to_userdata = $db->sql_fetchrow($result); + + $privmsg_subject = trim(strip_tags($subject)); + if ( empty($privmsg_subject) ) + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_subject']; + } + + if ( !empty($message) ) + { + if ( !$error ) + { + if ( $bbcode_on ) + { + $bbcode_uid = make_bbcode_uid(); + } + + $privmsg_message = prepare_message($message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); + $privmsg_message = str_replace('\\\n', '\n', $privmsg_message); + } + } + else + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_message']; + } + + // + // See if recipient is at their inbox limit + // + $sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time + FROM " . PRIVMSGS_TABLE . " + WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " + OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " + OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) + AND privmsgs_to_userid = " . $to_userdata['user_id']; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_MESSAGE, $lang['No_such_user']); + } + + $sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : ''; + + if ( $inbox_info = $db->sql_fetchrow($result) ) + { + if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) + { + $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " + WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " + OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " + OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) + AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " + AND privmsgs_to_userid = " . $to_userdata['user_id']; + if ( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not find oldest privmsgs (inbox)', '', __LINE__, __FILE__, $sql); + } + $old_privmsgs_id = $db->sql_fetchrow($result); + $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; + + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " + WHERE privmsgs_id = $old_privmsgs_id"; + if ( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (inbox)'.$sql, '', __LINE__, __FILE__, $sql); + } + + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " + WHERE privmsgs_text_id = $old_privmsgs_id"; + if ( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (inbox)', '', __LINE__, __FILE__, $sql); + } + } + } + + $sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) + VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace("\'", "''", $privmsg_subject) . "', " . $from_id . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', $html_on, $bbcode_on, $smilies_on, $attach_sig)"; + + if ( !($result = $db->sql_query($sql_info, BEGIN_TRANSACTION)) ) + { + message_die(GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info); + } + + $privmsg_sent_id = $db->sql_nextid(); + + $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) + VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace("\'", "''", $privmsg_message) . "')"; + + if ( !$db->sql_query($sql, END_TRANSACTION) ) + { + message_die(GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql); + } + + // + // Add to the users new pm counter + // + $sql = "UPDATE " . USERS_TABLE . " + SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " + WHERE user_id = " . $to_userdata['user_id']; + if ( !$status = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql); + } + + if ( $to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active'] ) + { + $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); + $script_name = ( $script_name != '' ) ? $script_name . '/privmsg.'.$phpEx : 'privmsg.'.$phpEx; + $server_name = trim($board_config['server_name']); + $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; + $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; + + include($phpbb_root_path . 'includes/emailer.'.$phpEx); + $emailer = new emailer($board_config['smtp_delivery']); + + $emailer->from($board_config['board_email']); + $emailer->replyto($board_config['board_email']); + + $emailer->use_template('privmsg_notify', $to_userdata['user_lang']); + $emailer->email_address($to_userdata['user_email']); + $emailer->set_subject($lang['Notification_subject']); + + $emailer->assign_vars(array( + 'USERNAME' => $to_username, + 'SITENAME' => $board_config['sitename'], + 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', + + 'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox') + ); + + $emailer->send(); + $emailer->reset(); + } + + return; + + $msg = $lang['Message_sent'] . '<br /><br />' . sprintf($lang['Click_return_inbox'], '<a href="' . append_sid("privmsg.$phpEx?folder=inbox") . '">', '</a> ') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); + + message_die(GENERAL_MESSAGE, $msg); + + } // insert_pm() + + function pa_mailer( + $to_id, + $message, + $subject, + $from_id, + $html_on = 0, + $bbcode_on = 1, + $smilies_on = 1) + { + global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; + + if ( !$from_id ) + { + $from_id = $userdata['user_id']; + } + + //get varibles ready + $to_id = intval($to_id); + $from_id = intval($from_id); + $msg_time = time(); + $attach_sig = $userdata['user_attachsig']; + + //get to users info + $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active + FROM " . USERS_TABLE . " + WHERE user_id = '$to_id' + AND user_id <> " . ANONYMOUS; + if ( !($result = $db->sql_query($sql)) ) + { + $error = TRUE; + $error_msg = $lang['No_such_user']; + } + + $to_userdata = $db->sql_fetchrow($result); + + $privmsg_subject = trim(strip_tags($subject)); + if ( empty($privmsg_subject) ) + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_subject']; + } + + if ( !empty($message) ) + { + if ( !$error ) + { + if ( $bbcode_on ) + { + $bbcode_uid = make_bbcode_uid(); + } + + $privmsg_message = prepare_message($message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); + $privmsg_message = str_replace('\\\n', '\n', $privmsg_message); + + } + } + else + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_message']; + } + + + $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); + $script_name = ( $script_name != '' ) ? $script_name . '/privmsg.'.$phpEx : 'privmsg.'.$phpEx; + $server_name = trim($board_config['server_name']); + $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; + $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; + + include($phpbb_root_path . 'includes/emailer.'.$phpEx); + $emailer = new emailer($board_config['smtp_delivery']); + + $emailer->from( $board_config['board_email'] ); + $emailer->replyto( $board_config['board_email'] ); + + $emailer->email_address($to_userdata['user_email'] ); + $emailer->set_subject( $subject ); + $emailer->msg = $message; + + $emailer->send(); + $emailer->reset(); + } + + // Compose phpbb comment header + function pa_compose_pm( $pa_pm ) + { + global $lang, $phpEx, $pa_custom_field; + + $search = array ( "'&(quot|#34);'i", // Replace HTML entities + "'&(amp|#38);'i", + "'&(lt|#60);'i", + "'&(gt|#62);'i" + ); + + $replace = array ( "\"", + "&", + "<", + ">" + ); + + // Compose phpBB post header + $temp_url = PORTAL_URL . pa_this_mxurl("action=" . "file&file_id=" . $pa_pm['file_id']); + + $message = "[b]" . $lang['File'] . ":[/b] " . preg_replace( $search, $replace, $pa_pm['file_title'] ) . "\n"; + $message .= "[b]" . $lang['Submiter'] . ":[/b] " . $pa_pm['file_author'] . "\n"; + $message .= "[b]" . $lang['Desc'] . ":[/b] [i]" . preg_replace( $search, $replace, $pa_pm['file_desc'] ) . "[/i]\n\n"; + + $message .= "\n\n[b][url=" . $temp_url . "]" . $lang['PA_goto_file'] . "[/url][/b]"; + + + + $message_update_text = "[i]" . $lang['Edited_Article_info'] . $pa_pm['article_editor'] . "[/i]" . "\n\n"; + + return array( 'message' => $message, 'update_message' => $message_update_text ); + } + + function pa_get_pm_data( $file_id = 0 ) + { + global $db, $lang; + // ======================================================= + // file id is not set, give him/her a nice error message + // ======================================================= + switch ( SQL_LAYER ) + { + case 'oracle': + $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments + FROM " . PA_FILES_TABLE . " AS f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c + WHERE f.file_id = r.votes_file(+) + AND f.user_id = u.user_id(+) + AND f.file_id = c.file_id(+) + AND f.file_id = $file_id + GROUP BY f.file_id "; + break; + + default: + $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments + FROM " . PA_FILES_TABLE . " AS f + LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file + LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id + LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id + WHERE f.file_id = $file_id + GROUP BY f.file_id "; + break; + } + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + message_die( GENERAL_ERROR, 'Couldnt Query file info', '', __LINE__, __FILE__, $sql ); + } + // =================================================== + // file doesn't exist' + // =================================================== + if ( !$file_data = $db->sql_fetchrow( $result ) ) + { + message_die( GENERAL_MESSAGE, $lang['File_not_exist'] ); + } + $db->sql_freeresult( $result ); + + // File data + $pa_pm['file_id'] = $file_id; + $pa_pm['file_title'] = $file_data['file_name']; + $pa_pm['file_desc'] = $file_data['file_desc']; + + $pa_pm['file_category_id'] = $file_data['file_catid']; + + // File author + $pa_pm['file_author_id'] = $file_data['user_id']; + $pa_pm['file_author'] = ( $file_data['user_id'] != ANONYMOUS ) ? $file_data['username'] : $lang['Guest']; + + // File editor + $pa_pm['file_editor_id'] = $userdata['user_id']; + $pa_pm['file_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; + + return $pa_pm; + + } + + function pa_get_admins( $get_all_userdata = false ) + { + global $db; + + $admin_type = ADMIN; + + $sql = "SELECT * + FROM " . USERS_TABLE . " + WHERE user_level = '$admin_type'"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, "Could not obtain author data", '', __LINE__, __FILE__, $sql ); + } + + if ( $row = $db->sql_fetchrow( $result ) ) + { + if ( $get_all_userdata ) + { + $name = $row; + } + else + { + $name = $row['username']; + } + } + else + { + $name = ''; + } + + return $name; + } + ?> \ No newline at end of file --- NEW FILE: functions_mx.php --- <?php /** ------------------------------------------------------------------------ * subject : mx-portal, CMS & portal * begin : june, 2002 * copyright : (C) 2002-2005 MX-System * email : jon...@ho... * project site : www.mx-system.com * * description : * ------------------------------------------------------------------------- * * $Id: functions_mx.php,v 1.1 2005/04/11 17:55:41 jonohlsson Exp $ */ /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License', or * ('at your option) any later version. */ if ( !function_exists( mx_smilies_pass ) ) { function mx_smilies_pass($message) { global $board_config; $smilies_path = $board_config['smilies_path']; $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; $message = smilies_pass($message); $board_config['smilies_path'] = $smilies_path; return $message; } } if ( !function_exists( mx_generate_smilies ) ) { function mx_generate_smilies($mode, $page_id) { global $board_config, $template, $phpEx; $smilies_path = $board_config['smilies_path']; $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; generate_smilies($mode, $page_id); $board_config['smilies_path'] = $smilies_path; $template->assign_vars(array( 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ); } } if ( !function_exists( mx_message_die ) ) { function mx_message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') { global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; global $userdata, $user_ip, $session_length; global $starttime; message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); } } if ( !function_exists( mx_auth_group_cache ) ) { // Validates if user belongs to group included in group_ids list // Also, adds all usergroups to userdata array function mx_auth_group_cache( $group_ids = '', $group_mod_mode = false ) { global $userdata, $db; if ( $group_ids == '' ) { return false; } $group_ids_array = explode(",", $group_ids); // Try to reuse usergroups result. if ( $group_mod_mode ) { $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; if ( empty( $userdata[$userdata_key] ) ) { // Check if user is group moderator.. $sql = "SELECT gr.group_id FROM " . GROUPS_TABLE . " gr, " . USER_GROUP_TABLE . " ugr WHERE gr.group_id = ugr.group_id AND gr.group_moderator = '" . $userdata['user_id'] . "' AND ugr.user_pending = '0' "; if ( !( $result = $db->sql_query( $sql ) ) ) { message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); } $group_row = $db->sql_fetchrowset( $result ); $userdata[$userdata_key_mod] = $group_row; } } else { $userdata_key = 'mx_usergroups' . $userdata['user_id']; if ( empty( $userdata[$userdata_key] ) ) { // Check if user is member of the proper group.. $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; if ( !( $result = $db->sql_query( $sql ) ) ) { message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); } $group_row = $db->sql_fetchrowset( $result ); $userdata[$userdata_key] = $group_row; } } for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) { if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) { $is_member = true; return $is_member; } } return false; } } if ( !function_exists( mx_add_search_words ) ) { // Add search words for blocks function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') { global $db, $phpbb_root_path, $board_config, $lang; // $search_match_table = SEARCH_MATCH_TABLE; // $search_word_table = SEARCH_WORD_TABLE; switch ( $mx_mode ) { case 'mx': $search_match_table = MX_MATCH_TABLE; $search_word_table = MX_WORD_TABLE; $db_key = 'block_id'; break; case 'kb': $search_match_table = KB_MATCH_TABLE; $search_word_table = KB_WORD_TABLE; $db_key = 'article_id'; break; } $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); $search_raw_words = array(); $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); @set_time_limit(0); $word = array(); $word_insert_sql = array(); while ( list($word_in, $search_matches) = @each($search_raw_words) ) { $word_insert_sql[$word_in] = ''; if ( !empty($search_matches) ) { for ($i = 0; $i < count($search_matches); $i++) { $search_matches[$i] = trim($search_matches[$i]); if( $search_matches[$i] != '' ) { $word[] = $search_matches[$i]; if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") ) { $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; } } } } } if ( count($word) ) { sort($word); $prev_word = ''; $word_text_sql = ''; $temp_word = array(); for($i = 0; $i < count($word); $i++) { if ( $word[$i] != $prev_word ) { $temp_word[] = $word[$i]; $word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'"; } $prev_word = $word[$i]; } $word = $temp_word; $check_words = array(); switch( SQL_LAYER ) { case 'postgresql': case 'msaccess': case 'mssql-odbc': case 'oracle': case 'db2': $sql = "SELECT word_id, word_text FROM " . $search_word_table . " WHERE word_text IN ($word_text_sql)"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) { $check_words[$row['word_text']] = $row['word_id']; } break; } $value_sql = ''; $match_word = array(); for ($i = 0; $i < count($word); $i++) { $new_match = true; if ( isset($check_words[$word[$i]]) ) { $new_match = false; } if ( $new_match ) { switch( SQL_LAYER ) { case 'mysql': case 'mysql4': $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)'; break; case 'mssql': case 'mssql-odbc': $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0"; break; default: $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) VALUES ('" . $word[$i] . "', 0)"; if( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } break; } } } if ( $value_sql != '' ) { switch ( SQL_LAYER ) { case 'mysql': case 'mysql4': $sql = "INSERT IGNORE INTO " . $search_word_table . " (word_text, word_common) VALUES $value_sql"; break; case 'mssql': case 'mssql-odbc': $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) $value_sql"; break; } if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } } } while( list($word_in, $match_sql) = @each($word_insert_sql) ) { $title_match = ( $word_in == 'title' ) ? 1 : 0; if ( $match_sql != '' ) { $sql = "INSERT INTO " . $search_match_table . " ($db_key, word_id, title_match) SELECT $post_id, word_id, $title_match FROM " . $search_word_table . " WHERE word_text IN ($match_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); } } } if ($mode == 'single') { // remove_common('single', 4/10, $word); } return; } function mx_remove_search_post($post_id_sql, $mx_mode = 'mx') { global $db; // $search_match_table = SEARCH_MATCH_TABLE; // $search_word_table = SEARCH_WORD_TABLE; switch ( $mx_mode ) { case 'mx': $search_match_table = MX_MATCH_TABLE; $search_word_table = MX_WORD_TABLE; $db_key = 'block_id'; break; case 'kb': $search_match_table = KB_MATCH_TABLE; $search_word_table = KB_WORD_TABLE; $db_key = 'article_id'; break; } $words_removed = false; switch ( SQL_LAYER ) { case 'mysql': case 'mysql4': $sql = "SELECT word_id FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql) GROUP BY word_id"; if ( $result = $db->sql_query($sql) ) { $word_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; } $sql = "SELECT word_id FROM " . $search_match_table . " WHERE word_id IN ($word_id_sql) GROUP BY word_id HAVING COUNT(word_id) = 1"; if ( $result = $db->sql_query($sql) ) { $word_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; } if ( $word_id_sql != '' ) { $sql = "DELETE FROM " . $search_word_table . " WHERE word_id IN ($word_id_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); } $words_removed = $db->sql_affectedrows(); } } } break; default: $sql = "DELETE FROM " . $search_word_table . " WHERE word_id IN ( SELECT word_id FROM " . $search_match_table . " WHERE word_id IN ( SELECT word_id FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql) GROUP BY word_id ) GROUP BY word_id HAVING COUNT(word_id) = 1 )"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); } $words_removed = $db->sql_affectedrows(); break; } $sql = "DELETE FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } return $words_removed; } } if ( !function_exists(mx_do_install_upgrade) ) { // Generating output function mx_do_install_upgrade( $sql = '', $main_install = false ) { global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; $inst_error = false; $n = 0; $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; while ( $sql[$n] ) { if ( !$result = $db->sql_query( $sql[$n] ) ) { $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; $inst_error = true; } else { $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; } $n++; } $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; if ( $main_install ) { if ( !$inst_error ) { $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; } else { $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; } } return $message; } } ?> Index: functions_field.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_field.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_field.php 9 Jan 2005 21:44:14 -0000 1.3 --- functions_field.php 11 Apr 2005 17:55:41 -0000 1.4 *************** *** 410,416 **** { $return_array = $this->field_rowset[$field_id]; ! $return_array['data'] = implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ); return $return_array; } // =================================================== // file data in custom field operations --- 410,417 ---- { $return_array = $this->field_rowset[$field_id]; ! $return_array['data'] = !empty( $return_array['data'] ) ? implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ) : ''; return $return_array; } + // =================================================== // file data in custom field operations Index: pafiledb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/pafiledb_constants.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pafiledb_constants.php 6 Mar 2005 01:13:11 -0000 1.8 --- pafiledb_constants.php 11 Apr 2005 17:55:41 -0000 1.9 *************** *** 16,19 **** --- 16,35 ---- * (at your option) any later version. */ + + if ( !MXBB_MODULE ) + { + $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; + $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); + $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; + $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); + $script_name = ($script_name == '') ? $script_name : '/' . $script_name; + + define( 'PORTAL_URL', $server_protocol . $server_name . $server_port . $script_name . '/' ); + define( 'PHPBB_URL', PORTAL_URL ); + + $mx_table_prefix = $table_prefix; + $is_block = false; // This also makes the script work for phpBB ;) + } + // define('PAFILEDB_DEBUG', 0); // Pafiledb Mod Debugging off define( 'PAFILEDB_DEBUG', 1 ); // Pafiledb Mod Debugging on *************** *** 39,42 **** --- 55,59 ---- define( 'PA_AUTH_COMMENT_EDIT', 10 ); define( 'PA_AUTH_COMMENT_DELETE', 11 ); + // Field Types define( 'INPUT', 0 ); *************** *** 48,66 **** define( 'ICONS_DIR', 'pafiledb/images/icons/' ); ! // tables ! /* - orig ! define('PA_CATEGORY_TABLE', $table_prefix.'pa_cat'); ! define('PA_COMMENTS_TABLE', $table_prefix.'pa_comments'); ! define('PA_CUSTOM_TABLE', $table_prefix.'pa_custom'); ! define('PA_CUSTOM_DATA_TABLE', $table_prefix.'pa_customdata'); ! define('PA_DOWNLOAD_INFO_TABLE', $table_prefix.'pa_download_info'); ! define('PA_FILES_TABLE', $table_prefix.'pa_files'); ! define('PA_LICENSE_TABLE', $table_prefix.'pa_license'); ! define('PA_CONFIG_TABLE', $table_prefix.'pa_config'); ! define('PA_VOTES_TABLE', $table_prefix.'pa_votes'); ! define('PA_AUTH_ACCESS_TABLE', $table_prefix.'pa_auth'); ! define('PA_MIRRORS_TABLE', $table_prefix.'pa_mirrors'); ! */ ! // MX define( 'PA_CATEGORY_TABLE', $mx_table_prefix . 'pa_cat' ); define( 'PA_COMMENTS_TABLE', $mx_table_prefix . 'pa_comments' ); --- 65,69 ---- define( 'ICONS_DIR', 'pafiledb/images/icons/' ); ! define( 'PA_CATEGORY_TABLE', $mx_table_prefix . 'pa_cat' ); define( 'PA_COMMENTS_TABLE', $mx_table_prefix . 'pa_comments' ); *************** *** 74,77 **** --- 77,81 ---- define( 'PA_AUTH_ACCESS_TABLE', $mx_table_prefix . 'pa_auth' ); define( 'PA_MIRRORS_TABLE', $mx_table_prefix . 'pa_mirrors' ); + // ********************************************************************** // Read language definition *************** *** 89,95 **** include( $module_root_path . 'language/' . $link_language . '/lang_admin_pafiledb.' . $phpEx ); } ! // ---------- ! // $current_template_images = $module_root_path . 'templates/subSilver/images' ; ! // ---------- if ( file_exists( $module_root_path . "templates/" . $theme['template_name'] . "/images" ) ) { --- 93,97 ---- include( $module_root_path . 'language/' . $link_language . '/lang_admin_pafiledb.' . $phpEx ); } ! if ( file_exists( $module_root_path . "templates/" . $theme['template_name'] . "/images" ) ) { *************** *** 116,121 **** $images['pa_file_new'] = "$current_template_images/icon_pa_new.gif"; ! $mxbb_footer_addup[] = 'mxBB pafileDB Module'; ! ! ?> \ No newline at end of file --- 118,130 ---- $images['pa_file_new'] = "$current_template_images/icon_pa_new.gif"; ! if ( !MXBB_MODULE || MXBB_27x ) ! { ! $kb_module_version = "Knowledge Base v. 2.0.x"; ! $kb_module_author = "Haplo"; ! $kb_module_orig_author = "wGEric"; ! } ! else ! { ! $mxbb_footer_addup[] = 'mxBB pafileDB Module'; ! } ?> \ No newline at end of file Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_comment.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** functions_comment.php 9 Jan 2005 21:44:14 -0000 1.11 --- functions_comment.php 11 Apr 2005 17:55:41 -0000 1.12 *************** *** 37,41 **** // MX global $mx_root_path, $module_root_path, $is_block, $phpEx; ! // include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx); // Define censored word matches --- 37,41 ---- // MX global $mx_root_path, $module_root_path, $is_block, $phpEx; ! include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx); // Define censored word matches Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** functions_pafiledb.php 6 Mar 2005 01:13:11 -0000 1.15 --- functions_pafiledb.php 11 Apr 2005 17:55:41 -0000 1.16 *************** *** 495,500 **** global $db, $db, $lang, $userdata, $pafiledb_config; ! $a_sql = 'a.auth_view, a.auth_read, a.auth_view_file, a.auth_edit_file, a.auth_delete_file, a.auth_upload, a.auth_download, a.auth_rate, a.auth_email, a.auth_view_comment, a.auth_post_comment, a.auth_edit_comment, a.auth_delete_comment, a.auth_mod, a.auth_search, a.auth_stats, a.auth_toplist, a.auth_viewall'; ! $auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment' ); $auth_fields_global = array( 'auth_search', 'auth_stats', 'auth_toplist', 'auth_viewall' ); --- 495,500 ---- global $db, $db, $lang, $userdata, $pafiledb_config; ! $a_sql = 'a.auth_view, a.auth_read, a.auth_view_file, a.auth_edit_file, a.auth_delete_file, a.auth_upload, a.auth_download, a.auth_rate, a.auth_email, a.auth_view_comment, a.auth_post_comment, a.auth_edit_comment, a.auth_delete_comment, a.auth_mod, a.auth_search, a.auth_stats, a.auth_toplist, a.auth_viewall, a.auth_approval'; ! $auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment', 'auth_approval' ); $auth_fields_global = array( 'auth_search', 'auth_stats', 'auth_toplist', 'auth_viewall' ); *************** *** 1064,1069 **** { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments ! FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c WHERE f1.file_id = r.votes_file(+) AND f1.user_id = u.user_id(+) --- 1064,1069 ---- { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments ! FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat WHERE f1.file_id = r.votes_file(+) AND f1.user_id = u.user_id(+) *************** *** 1071,1074 **** --- 1071,1075 ---- AND f1.file_pin = " . FILE_PINNED . " AND f1.file_approved = 1 + AND f1.file_catid = cat.cat_id $cat_where GROUP BY f1.file_id *************** *** 1077,1085 **** default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id WHERE f1.file_pin = " . FILE_PINNED . " AND f1.file_approved = 1 --- 1078,1087 ---- default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id + LEFT JOIN " . PA_CATEGORY_TABLE . " AS cat ON f1.file_catid = cat.cat_id WHERE f1.file_pin = " . FILE_PINNED . " AND f1.file_approved = 1 *************** *** 1111,1116 **** { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) ! FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c WHERE f1.file_id = r.votes_file(+) AND f1.user_id = u.user_id(+) --- 1113,1118 ---- { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id), cat.cat_allow_ratings, cat.cat_allow_comments ! FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat WHERE f1.file_id = r.votes_file(+) AND f1.user_id = u.user_id(+) *************** *** 1118,1121 **** --- 1120,1124 ---- AND f1.file_pin <> " . FILE_PINNED . " AND f1.file_approved = 1 + AND f1.file_catid = cat.cat_id $cat_where GROUP BY f1.file_id *************** *** 1124,1132 **** default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id WHERE f1.file_pin <> " . FILE_PINNED . " AND f1.file_approved = 1 --- 1127,1136 ---- default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id), cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id + LEFT JOIN " . PA_CATEGORY_TABLE . " AS cat ON f1.file_catid = cat.cat_id WHERE f1.file_pin <> " . FILE_PINNED . " AND f1.file_approved = 1 *************** *** 1168,1172 **** $total_file = $row['total_file']; unset( $row ); ! for ( $i = 0; $i < count( $file_rowset ); $i++ ) { --- 1172,1186 ---- $total_file = $row['total_file']; unset( $row ); ! ! $pa_use_ratings = false; ! for ( $i = 0; $i < count( $file_rowset ); $i++ ) ! { ! if ( $file_rowset[$i]['cat_allow_ratings'] ) ! { ! $pa_use_ratings = true; ! break; ! } ! } ! for ( $i = 0; $i < count( $file_rowset ); $i++ ) { *************** *** 1227,1230 **** --- 1241,1245 ---- // Assign Vars // =================================================== + $pafiledb_template->assign_block_vars( "file_rows", array( 'L_NEW_FILE' => $lang['New_file'], *************** *** 1240,1244 **** 'FILE_DESC' => $file_rowset[$i]['file_desc'], 'DATE' => $date, ! 'RATING' => $rating, 'FILE_DLS' => $file_rowset[$i]['file_dls'], 'CAT_NAME' => $cat_name, --- 1255,1259 ---- 'FILE_DESC' => $file_rowset[$i]['file_desc'], 'DATE' => $date, ! 'RATING' => ( $file_rowset[$i]['cat_allow_ratings'] ? $rating : $lang['kb_no_ratings'] ), 'FILE_DLS' => $file_rowset[$i]['file_dls'], 'CAT_NAME' => $cat_name, *************** *** 1246,1249 **** --- 1261,1265 ---- 'U_CAT' => $cat_url, + 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), /* - orig 'U_FILE' => append_sid('dload.'.$phpEx.'?action=file&file_id=' . $file_rowset[$i]['file_id'])) *************** *** 1253,1256 **** --- 1269,1273 ---- ); $filelist = true; + $pa_use_ratings = $file_rowset[$i]['cat_allow_ratings']; } *************** *** 1258,1262 **** { $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $pafiledb_template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], 'L_RATING' => $lang['DlRating'], 'L_DOWNLOADS' => $lang['Dls'], --- 1275,1280 ---- { $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], 'L_RATING' => $lang['DlRating'], 'L_DOWNLOADS' => $lang['Dls'], *************** *** 1282,1289 **** 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', - /* - orig - 'PAGINATION' => generate_pagination(append_sid("dload.$phpEx?action=$action&sort_method=$sort_method&sort_order=$sort_order"), $total_file, $pafiledb_config['settings_file_page'], $start), - */ - // MX 'PAGINATION' => generate_pagination( append_sid( pa_this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $pafiledb_config['settings_file_page'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['settings_file_page'] ) + 1 ), ceil( $total_file / $pafiledb_config['settings_file_page'] ) ), --- 1300,1303 ---- *************** *** 1291,1299 **** 'ID' => $cat_id, 'START' => $start, - /* - orig - 'S_ACTION_SORT' => append_sid("dload.$phpEx?action=$action")) - */ - // MX 'S_ACTION_SORT' => append_sid( pa_this_mxurl( "action=$action" ) ) ) ); --- 1305,1310 ---- 'ID' => $cat_id, 'START' => $start, + 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, 'S_ACTION_SORT' => append_sid( pa_this_mxurl( "action=$action" ) ) ) ); *************** *** 1301,1305 **** else { ! $pafiledb_template->assign_vars( array( 'NO_FILE' => $show_file_message, 'L_NO_FILES' => $lang['No_files'], 'L_NO_FILES_CAT' => $lang['No_files_cat'] ) --- 1312,1325 ---- else { ! $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'NO_FILE' => $show_file_message, 'L_NO_FILES' => $lang['No_files'], 'L_NO_FILES_CAT' => $lang['No_files_cat'] ) *************** *** 2020,2032 **** $file_pin = ( isset( $_POST['pin'] ) ) ? intval( $_POST['pin'] ) : 0; $file_ss_link = ( isset( $_POST['sshot_link'] ) ) ? intval( $_POST['sshot_link'] ) : 0; - // MX addon - // if ( $pafiledb_config['need_validation'] == 0 ) - // { - // $file_approved = 1; - // } - // else - // { - // $file_approved = ( isset($_POST['approved']) ) ? intval($_POST['approved']) : 0; - // } $file_dls = ( isset( $_POST['file_download'] ) ) ? intval( $_POST['file_download'] ) : 0; --- 2040,2043 ---- *************** *** 2137,2142 **** } } ! // MX addon ! if ( $pafiledb_config['need_validation'] == 0 ) { if ( !$file_id ) --- 2148,2153 ---- } } ! ! if ( $pafiledb->modules[$pafiledb->module_name]->auth[$cat_id]['auth_approval'] || ( $pafiledb->modules[$pafiledb->module_name]->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in'] ) ) { if ( !$file_id ) *************** *** 2146,2163 **** else { ! $file_approved = isset( $file_data['file_approved'] ) ? $file_data['file_approved'] : 0; } ! }elseif ( $pafiledb_config['need_validation'] == 1 ) { ! if ( !$file_id ) ! { ! $file_approved = ( ( $pafiledb->modules[$pafiledb->module_name]->auth[$_REQUEST['cat_id']]['auth_mod'] || $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? 1 : 0; ! } ! else ! { ! $file_approved = isset( $file_data['file_approved'] ) ? $file_data['file_approved'] : 0; ! } } ! if ( !$file_id ) { --- 2157,2168 ---- else { ! $file_approved = isset( $file_data['file_approved'] ) && !( $pafiledb->modules[$pafiledb->module_name]->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in'] ) ? $file_data['file_approved'] : 1; } ! } ! else { ! $file_approved = 0; } ! if ( !$file_id ) { |
|
From: Jon O. <jon...@us...> - 2005-04-11 17:56:22
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2875/modules/mx_pafiledb/pafiledb Modified Files: pafiledb_common.php Log Message: finally upgrading this module/mod - merging phpBB mod, mxBB module (2.7.x and 2.8) -.permissions reviewed - pm notification added - and many many minor fixes all over the place Index: pafiledb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/pafiledb_common.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pafiledb_common.php 9 Jan 2005 21:44:14 -0000 1.8 --- pafiledb_common.php 11 Apr 2005 17:55:42 -0000 1.9 *************** *** 18,32 **** */ - /* - orig - if ( !defined('IN_PHPBB') ) - { - die("Hacking attempt"); - } - */ - // MX if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } // =================================================== // addslashes to vars if magic_quotes_gpc is off --- 18,26 ---- */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } + // =================================================== // addslashes to vars if magic_quotes_gpc is off *************** *** 73,97 **** } - /* - orig - //=================================================== - // Get Language - //=================================================== - - $language = $board_config['default_lang']; - - if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_pafiledb.'.$phpEx) ) - { - $language = 'english'; - } - - if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_admin_pafiledb.'.$phpEx) ) - { - $language = 'english'; - } - - include($phpbb_root_path . 'language/lang_' . $language . '/lang_pafiledb.' . $phpEx); - include($phpbb_root_path . 'language/lang_' . $language . '/lang_admin_pafiledb.' . $phpEx); - */ - // MX // =================================================== // Get Language --- 67,70 ---- *************** *** 111,128 **** include( $module_root_path . 'language/lang_' . $language . '/lang_pafiledb.' . $phpEx ); include( $module_root_path . 'language/lang_' . $language . '/lang_admin_pafiledb.' . $phpEx ); // =================================================== // Include pafiledb data file // =================================================== ! /* - orig ! include($phpbb_root_path . 'pafiledb/includes/pafiledb_constants.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/functions_cache.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/functions.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/template.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/functions_pafiledb.'.$phpEx); ! */ ! // MX include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_cache.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/template.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); --- 84,96 ---- include( $module_root_path . 'language/lang_' . $language . '/lang_pafiledb.' . $phpEx ); include( $module_root_path . 'language/lang_' . $language . '/lang_admin_pafiledb.' . $phpEx ); + // =================================================== // Include pafiledb data file // =================================================== ! include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_cache.' . $phpEx ); + include_once( $module_root_path . 'pafiledb/includes/functions_mx.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/template.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); *************** *** 146,149 **** --- 114,118 ---- $pafiledb = new pafiledb_public(); + // MX add-on // Generate paths for page and standalone mode |
|
From: Jon O. <jon...@us...> - 2005-04-11 17:56:22
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2875/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_file.php pa_mcp.php pa_post_comment.php pa_toplist.php pa_user_upload.php pa_viewall.php Log Message: finally upgrading this module/mod - merging phpBB mod, mxBB module (2.7.x and 2.8) -.permissions reviewed - pm notification added - and many many minor fixes all over the place Index: pa_viewall.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_viewall.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pa_viewall.php 9 Jan 2005 21:44:14 -0000 1.8 --- pa_viewall.php 11 Apr 2005 17:55:42 -0000 1.9 *************** *** 78,82 **** { message_die( GENERAL_MESSAGE, $lang['viewall_disabled'] ); ! }elseif ( !$this->auth_global['auth_viewall'] ) { if ( !$userdata['session_logged_in'] ) --- 78,83 ---- { message_die( GENERAL_MESSAGE, $lang['viewall_disabled'] ); ! } ! elseif ( !$this->auth_global['auth_viewall'] ) { if ( !$userdata['session_logged_in'] ) Index: pa_mcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_mcp.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pa_mcp.php 9 Jan 2005 21:44:14 -0000 1.6 --- pa_mcp.php 11 Apr 2005 17:55:41 -0000 1.7 *************** *** 48,52 **** // Pafiledb auth for mcp // =================================================== ! if ( ( !$this->auth[$cat_id]['auth_mod'] ) || !$userdata['session_logged_in'] ) { // if ( !$userdata['session_logged_in'] ) --- 48,52 ---- // Pafiledb auth for mcp // =================================================== ! if ( !($this->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in']) ) { // if ( !$userdata['session_logged_in'] ) *************** *** 138,143 **** if ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { ! if ( ( $pafiledb_config['validator'] == 'validator_mod' && $this->auth[$cat_id]['auth_mod'] ) || $userdata['user_level'] == ADMIN ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) { --- 138,145 ---- if ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { ! if ( $this->auth[$cat_id]['auth_mod'] || $userdata['user_level'] == ADMIN ) { + $mode_temp = $mode == 'do_approve' ? 'approved' : 'unapproved'; + if ( is_array( $file_ids ) && !empty( $file_ids ) ) { *************** *** 145,148 **** --- 147,171 ---- { $this->file_approve( $mode, $temp_file_id ); + + if ( $pafiledb_config['pm_notify'] ) + { + $pa_pm = array(); + + // Populate the pa_pm variable + $pa_pm = pa_get_pm_data( $temp_file_id ); + + // Compose post header + $pa_message_tmp = pa_compose_pm( $pa_pm ); + $pa_message = $pa_message_tmp['message']; + $pa_update_message = $pa_message_tmp['update_message']; + + // PM notify + $pa_admins = pa_get_admins( true ); + + for ($i = 0; $i < count($pa_admins) || $i < 10; $ii) + { + pa_notify( $pafiledb_config['pm_notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = $mode_temp ); + } + } } } *************** *** 150,154 **** --- 173,199 ---- { $this->file_approve( $mode, $file_id ); + + if ( $pafiledb_config['pm_notify'] ) + { + $pa_pm = array(); + + // Populate the pa_pm variable + $pa_pm = pa_get_pm_data( $file_id ); + + // Compose post header + $pa_message_tmp = pa_compose_pm( $pa_pm ); + $pa_message = $pa_message_tmp['message']; + $pa_update_message = $pa_message_tmp['update_message']; + + // PM notify + $pa_admins = pa_get_admins( true ); + + for ($i = 0; $i < count($pa_admins) || $i < 10; $ii) + { + pa_notify( $pafiledb_config['pm_notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = $mode_temp ); + } + } } + $this->_pafiledb(); } *************** *** 294,298 **** 'row_set' => $all_file_rowset, 'approval' => 'unapprove' ) ); ! }elseif ( $mode == 'all_file' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], --- 339,344 ---- 'row_set' => $all_file_rowset, 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'all_file' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], *************** *** 305,319 **** 'row_set' => $all_file_rowset, 'approval' => 'unapprove' ) ); ! }elseif ( $mode == 'file_cat' ) { $global_array = array( 0 => array( 'lang_var' => $lang['All_files'], 'row_set' => $all_file_rowset, 'approval' => 'unapprove' ) ); ! }elseif ( $mode == 'approved' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ) ); ! }elseif ( $mode == 'broken' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Broken_files'], --- 351,368 ---- 'row_set' => $all_file_rowset, 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'file_cat' ) { $global_array = array( 0 => array( 'lang_var' => $lang['All_files'], 'row_set' => $all_file_rowset, 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'approved' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ) ); ! } ! elseif ( $mode == 'broken' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Broken_files'], *************** *** 372,379 **** { $approve = $unapprove = true; ! }elseif ( $files_data['approval'] == 'approve' ) { $approve = true; ! }elseif ( $files_data['approval'] == 'unapprove' ) { $unapprove = true; --- 421,430 ---- { $approve = $unapprove = true; ! } ! elseif ( $files_data['approval'] == 'approve' ) { $approve = true; ! } ! elseif ( $files_data['approval'] == 'unapprove' ) { $unapprove = true; Index: pa_post_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_post_comment.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pa_post_comment.php 9 Jan 2005 21:44:14 -0000 1.7 --- pa_post_comment.php 11 Apr 2005 17:55:41 -0000 1.8 *************** *** 32,36 **** global $mx_root_path, $module_root_path, $is_block, $phpEx; // MX FIX ! // include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx); include( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); --- 32,36 ---- global $mx_root_path, $module_root_path, $is_block, $phpEx; // MX FIX ! include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx); include( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); Index: pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_file.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pa_file.php 9 Jan 2005 21:44:14 -0000 1.10 --- pa_file.php 11 Apr 2005 17:55:41 -0000 1.11 *************** *** 42,47 **** { case 'oracle': ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments ! FROM " . PA_FILES_TABLE . " AS f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c WHERE f.file_id = r.votes_file(+) AND f.user_id = u.user_id(+) --- 42,47 ---- { case 'oracle': ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments, cat.cat_allow_ratings, cat.cat_allow_comments ! FROM " . PA_FILES_TABLE . " AS f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat WHERE f.file_id = r.votes_file(+) AND f.user_id = u.user_id(+) *************** *** 49,61 **** AND f.file_id = $file_id AND f.file_approved = 1 GROUP BY f.file_id "; break; default: ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments FROM " . PA_FILES_TABLE . " AS f LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id WHERE f.file_id = $file_id AND f.file_approved = 1 --- 49,63 ---- AND f.file_id = $file_id AND f.file_approved = 1 + AND f.file_catid = cat.cat_id GROUP BY f.file_id "; break; default: ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments, cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id + LEFT JOIN " . PA_CATEGORY_TABLE . " AS cat ON f.file_catid = cat.cat_id WHERE f.file_id = $file_id AND f.file_approved = 1 *************** *** 147,151 **** $file_poster .= ( $file_data['user_id'] != ANONYMOUS ) ? $file_data['username'] : $lang['Guest']; $file_poster .= ( $file_data['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $pafiledb_template->assign_vars( array( 'L_CLICK_HERE' => $lang['Click_here'], 'L_AUTHOR' => $lang['Creator'], --- 149,158 ---- $file_poster .= ( $file_data['user_id'] != ANONYMOUS ) ? $file_data['username'] : $lang['Guest']; $file_poster .= ( $file_data['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! ! if ( $file_data['cat_allow_ratings'] ) ! { ! $pafiledb_template->assign_block_vars( 'show_ratings', array( ) ); ! } ! $pafiledb_template->assign_vars( array( 'L_CLICK_HERE' => $lang['Click_here'], 'L_AUTHOR' => $lang['Creator'], *************** *** 190,196 **** 'AUTH_DOWNLOAD' => ( $this->auth[$file_data['file_catid']]['auth_download'] ) ? true : false, ! 'AUTH_RATE' => ( $this->auth[$file_data['file_catid']]['auth_rate'] ) ? true : false, 'AUTH_EMAIL' => ( $this->auth[$file_data['file_catid']]['auth_email'] ) ? true : false, ! 'INCLUDE_COMMENTS' => ( $this->auth[$file_data['file_catid']]['auth_view_comment'] ) ? true : false, 'DELETE_IMG' => $phpbb_root_path . $images['icon_delpost'], 'EDIT_IMG' => $phpbb_root_path . $images['icon_edit'], --- 197,203 ---- 'AUTH_DOWNLOAD' => ( $this->auth[$file_data['file_catid']]['auth_download'] ) ? true : false, ! 'AUTH_RATE' => ( $this->auth[$file_data['file_catid']]['auth_rate'] && $file_data['cat_allow_ratings'] ) ? true : false, 'AUTH_EMAIL' => ( $this->auth[$file_data['file_catid']]['auth_email'] ) ? true : false, ! 'INCLUDE_COMMENTS' => ( $this->auth[$file_data['file_catid']]['auth_view_comment'] && $file_data['cat_allow_comments'] ) ? true : false, 'DELETE_IMG' => $phpbb_root_path . $images['icon_delpost'], 'EDIT_IMG' => $phpbb_root_path . $images['icon_edit'], *************** *** 228,232 **** $custom_field->display_data( $file_id ); ! if ( $this->auth[$file_data['file_catid']]['auth_view_comment'] ) { /* - orig --- 235,239 ---- $custom_field->display_data( $file_id ); ! if ( $this->auth[$file_data['file_catid']]['auth_view_comment'] && $file_data['cat_allow_comments'] ) { /* - orig Index: pa_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_user_upload.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pa_user_upload.php 9 Jan 2005 21:44:14 -0000 1.9 --- pa_user_upload.php 11 Apr 2005 17:55:41 -0000 1.10 *************** *** 118,123 **** $temp_id = $this->update_add_file(); $custom_field->file_update_data( $temp_id ); ! $this->_pafiledb(); ! if ( $pafiledb_config['need_validation'] == '0' ) { $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $temp_id ) ) . '">', '</a>' ); --- 118,123 ---- $temp_id = $this->update_add_file(); $custom_field->file_update_data( $temp_id ); ! ! if ( $this->auth[$cat_id]['auth_approval'] || ( $this->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in'] )) { $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $temp_id ) ) . '">', '</a>' ); *************** *** 127,138 **** $message = $lang['Fileadded_not_validated'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); } ! // $mode = 'edit'; ! }elseif ( $file_id != '' ) { $file_id = $this->update_add_file( $file_id ); $custom_field->file_update_data( $file_id ); $this->_pafiledb(); $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); - // $mode = 'edit'; } --- 127,176 ---- $message = $lang['Fileadded_not_validated'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); } ! ! $this->_pafiledb(); ! ! $pa_pm = array(); ! ! // Populate the pa_pm variable ! $pa_pm = pa_get_pm_data( $temp_id ); ! ! // Compose post header ! $pa_message_tmp = pa_compose_pm( $pa_pm ); ! $pa_message = $pa_message_tmp['message']; ! $pa_update_message = $pa_message_tmp['update_message']; ! ! // PM notify ! $pa_admins = pa_get_admins( true); ! ! for ($i = 0; $i < count($pa_admins) || $i < 10; $ii) ! { ! pa_notify( $pafiledb_config['pm_notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = 'new' ); ! } ! } ! elseif ( $file_id != '' ) { $file_id = $this->update_add_file( $file_id ); $custom_field->file_update_data( $file_id ); $this->_pafiledb(); + + $pa_pm = array(); + + // Populate the pa_pm variable + $pa_pm = pa_get_pm_data( $file_id ); + + // Compose post header + $pa_message_tmp = pa_compose_pm( $pa_pm ); + $pa_message = $pa_message_tmp['message']; + $pa_update_message = $pa_message_tmp['update_message']; + + // PM notify + $pa_admins = pa_get_admins( true); + + for ($i = 0; $i < count($pa_admins) || $i < 10; $i++) + { + pa_notify( $pafiledb_config['pm_notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = 'edited' ); + } + $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); } *************** *** 157,161 **** $file_website = ''; $file_posticons = $pafiledb_functions->post_icons(); - // MX $file_cat_list = $this->jumpmenu_option(0, 0, '', true); $file_cat_list = ( !$cat_id ) ? $this->jumpmenu_option( 0, 0, '', true ) : $this->jumpmenu_option( 0, 0, array( $cat_id => 1 ), true, true ); $file_license = $pafiledb_functions->license_list(); --- 195,198 ---- *************** *** 172,176 **** $mode = 'ADD'; $l_title = $lang['Afiletitle']; ! }elseif ( $file_id != '' ) { $sql = 'SELECT * --- 209,214 ---- $mode = 'ADD'; $l_title = $lang['Afiletitle']; ! } ! elseif ( $file_id != '' ) { $sql = 'SELECT * *************** *** 182,185 **** --- 220,224 ---- } $file_info = $db->sql_fetchrow( $result ); + // AUTH CHECK if ( !( ( $this->auth[$file_info['file_catid']]['auth_edit_file'] && $file_info['user_id'] == $userdata['user_id'] ) || $this->auth[$file_info['file_catid']]['auth_mod'] ) ) *************** *** 203,207 **** $approved_checked_yes = ( $file_info['file_approved'] ) ? ' checked' : ''; $approved_checked_no = ( !$file_info['file_approved'] ) ? ' checked' : ''; - // MX addon $file_approved = ( $file_info['file_approved'] == '1' ) ? 1 : 0; $file_ssurl = $file_info['file_ssurl']; --- 242,245 ---- Index: pa_toplist.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_toplist.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pa_toplist.php 9 Jan 2005 21:44:14 -0000 1.9 --- pa_toplist.php 11 Apr 2005 17:55:41 -0000 1.10 *************** *** 149,152 **** --- 149,153 ---- 'L_30_DAYS' => $lang['30_days'], 'L_NEW_FILES' => sprintf( $lang['New_Files'], $days ), + /* - orig *************** *** 218,222 **** { case 'oracle': ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(c.comments_id) AS total_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c, " . PA_COMMENTS_TABLE . " AS cm WHERE f1.file_id = r.votes_file(+) --- 219,223 ---- { case 'oracle': ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(c.comments_id) AS total_comments, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c, " . PA_COMMENTS_TABLE . " AS cm WHERE f1.file_id = r.votes_file(+) *************** *** 231,235 **** default: ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(cm.comments_id) AS total_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_CATEGORY_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file --- 232,236 ---- default: ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, COUNT(cm.comments_id) AS total_comments, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_CATEGORY_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file *************** *** 262,265 **** --- 263,276 ---- } + $pa_use_ratings = false; + for ( $i = 0; $i < count( $file_rowset ); $i++ ) + { + if ( $file_rowset[$i]['cat_allow_ratings'] ) + { + $pa_use_ratings = true; + break; + } + } + for ( $i = 0; $i < count( $file_rowset ); $i++ ) { *************** *** 335,340 **** 'FILE_SUBMITER' => $poster, 'DATE' => $date, ! 'RATING' => $rating, 'DOWNLOADS' => $file_rowset[$i]['file_dls'], 'U_FILE' => $file_url, --- 346,353 ---- 'FILE_SUBMITER' => $poster, 'DATE' => $date, ! 'RATING' => ( $file_rowset[$i]['cat_allow_ratings'] ? $rating : $lang['kb_no_ratings'] ), 'DOWNLOADS' => $file_rowset[$i]['file_dls'], + + 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, 'U_FILE' => $file_url, *************** *** 429,433 **** { case 'oracle': ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c WHERE f1.file_id = r.votes_file(+) --- 442,446 ---- { case 'oracle': ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c WHERE f1.file_id = r.votes_file(+) *************** *** 441,445 **** default: ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name FROM " . PA_FILES_TABLE . " AS f1, " . PA_CATEGORY_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file --- 454,458 ---- default: ! $sql = "SELECT f1.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, c.cat_id, c.cat_name, c.cat_allow_ratings, c.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_CATEGORY_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file *************** *** 464,467 **** --- 477,490 ---- } + $pa_use_ratings = false; + for ( $i = 0; $i < count( $searchset ); $i++ ) + { + if ( $searchset[$i]['cat_allow_ratings'] ) + { + $pa_use_ratings = true; + break; + } + } + for( $i = 0; $i < count( $searchset ); $i++ ) { *************** *** 541,545 **** 'FILE_SUBMITER' => $poster, 'DATE' => $date, ! 'RATING' => $rating, 'DOWNLOADS' => $searchset[$i]['file_dls'], 'U_FILE' => $file_url, --- 564,569 ---- 'FILE_SUBMITER' => $poster, 'DATE' => $date, ! 'RATING' => ( $searchset[$i]['cat_allow_ratings'] ? $rating : $lang['kb_no_ratings'] ), ! 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), 'DOWNLOADS' => $searchset[$i]['file_dls'], 'U_FILE' => $file_url, *************** *** 550,553 **** --- 574,579 ---- } + $pafiledb_template->assign_vars( array( 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false ) ); + $this->display( $lang['Download'], 'pa_toplist_body.tpl' ); } |
|
From: Jon O. <jon...@us...> - 2005-04-11 17:56:22
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2875/modules/mx_pafiledb/admin Modified Files: admin_pa_catauth.php admin_pa_category.php admin_pa_custom.php admin_pa_fchecker.php admin_pa_file.php admin_pa_license.php admin_pa_settings.php admin_pa_ug_auth.php pa_block_config.php Log Message: finally upgrading this module/mod - merging phpBB mod, mxBB module (2.7.x and 2.8) -.permissions reviewed - pm notification added - and many many minor fixes all over the place Index: admin_pa_fchecker.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_fchecker.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_pa_fchecker.php 9 Jan 2005 21:44:07 -0000 1.7 --- admin_pa_fchecker.php 11 Apr 2005 17:55:38 -0000 1.8 *************** *** 1,62 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - Original - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! //$module['Download'][$lang['Fchecker']] = "$file"; ! return; ! } ! ! $phpbb_root_path = "./../"; ! ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_pafiledb.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! ! $this_dir = $phpbb_root_path . 'pafiledb/uploads/'; ! ! $html_path = 'http://' . $HTTP_SERVER_VARS['HTTP_HOST'] . '' . $board_config['script_path'] . 'pafiledb/uploads/'; ! */ ! // MX Portal ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File: Maintenance'] = 'modules/mx_pafiledb/admin/' . "$file"; ! return; } - $module_root_path = './../'; - $mx_root_path = './../../../'; - require( $mx_root_path . 'extension.inc' ); - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - - include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_pafiledb.' . $phpEx ); - - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); $this_dir = $module_root_path . 'pafiledb/uploads/'; - /* - orig - $html_path = get_formated_url() . '/pafiledb/uploads/'; - */ // MX ! $html_path = PORTAL_URL . 'modules/mx_pafiledb/pafiledb/uploads/'; if ( isset( $HTTP_GET_VARS['safety'] ) || isset( $HTTP_POST_VARS['safety'] ) ) --- 1,73 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Fchecker_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Fchecker_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } $this_dir = $module_root_path . 'pafiledb/uploads/'; // MX ! $html_path = PORTAL_URL . $module_root_path . 'pafiledb/uploads/'; if ( isset( $HTTP_GET_VARS['safety'] ) || isset( $HTTP_POST_VARS['safety'] ) ) *************** *** 198,202 **** 'SAVED' => $saved ) ); - $template->pparse( 'admin' ); } else --- 209,212 ---- *************** *** 210,221 **** 'L_FILE_SAFTEY' => $lang['File_saftey'] ) ); - - $template->pparse( 'admin' ); } ! /* ! include('./page_footer_admin.'.$phpEx); ! */ ! // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 220,228 ---- 'L_FILE_SAFTEY' => $lang['File_saftey'] ) ); } ! // Output ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); ! $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: pa_block_config.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/pa_block_config.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pa_block_config.php 6 Mar 2005 14:32:55 -0000 1.1 --- pa_block_config.php 11 Apr 2005 17:55:39 -0000 1.2 *************** *** 1,12 **** <?php /** ! * admin_news.php ! * ------------------ ! * begin : Friday, Mar 22, 2002 ! * copyright : (C) 2002 MX System ! * email : jon...@ho... * ! * $Id$ */ define( 'IN_PORTAL', true ); --- 1,20 ---- <?php /** ! * mxBB pafileDB adminCP ! * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * email : jon...@ho... * ! * $Id$ */ + + /** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + define( 'IN_PORTAL', true ); *************** *** 27,59 **** $block_id = isset( $HTTP_GET_VARS['block_id'] ) ? intval( $HTTP_GET_VARS['block_id'] ) : intval( $HTTP_POST_VARS['block_id'] ); $portalpage = isset( $HTTP_GET_VARS['portalpage'] ) ? intval( $HTTP_GET_VARS['portalpage'] ) : intval( $HTTP_POST_VARS['portalpage'] ); - //$f_id = isset( $HTTP_GET_VARS['f'] ) ? intval( $HTTP_GET_VARS['f'] ) : intval( $HTTP_POST_VARS['f'] ); - //$p_id = isset( $HTTP_GET_VARS['p'] ) ? intval( $HTTP_GET_VARS['p'] ) : intval( $HTTP_POST_VARS['p'] ); - //$t_id = isset( $HTTP_GET_VARS['t'] ) ? intval( $HTTP_GET_VARS['t'] ) : intval( $HTTP_POST_VARS['t'] ); $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; $s_hidden_fields .= '<input type="hidden" name="block_id" value="' . $block_id . '" />'; $s_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $portalpage . '" />'; - //$s_hidden_fields .= '<input type="hidden" name="f" value="' . $f_id . '" />'; - //$s_hidden_fields .= '<input type="hidden" name="t" value="' . $t_id . '" />'; - //$s_hidden_fields .= '<input type="hidden" name="p" value="' . $p_id . '" />'; // Setup config parameters $block_config = read_block_config( $block_id, false ); - /* - if ( $f_id != 0 ) - { - $url_opt = '&f=' . $f_id; - } - else if ( $t_id != 0 ) - { - $url_opt = '&t=' . $t_id; - } - else if ( $p_id != 0 ) - { - $url_opt = '&p=' . $p_id; - } - */ - // Setup config parameters $config_name = array( 'pa_mapping', 'pa_quick_cat' ); --- 35,46 ---- *************** *** 65,71 **** } - //include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); - //include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); --- 52,55 ---- *************** *** 352,358 **** for( $i = 0; $i < $total_maps; $i++ ) { - //$pa_cat_row = get_info( PA_CATEGORY_TABLE, 'cat_id', $pa_mapping_data[$i]['map_cat_id'] ); - //$pa_dyn_row = get_info( BLOCK_TABLE, 'block_id', $pa_mapping_data[$i]['map_dyn_id'] ); - $pa_map_cat_tmp = $pafiledb->jumpmenu_option( 0, 0, array( $pa_mapping_data[$i]['map_cat_id'] => 1 ), false ); $pa_map_dynid_id = 'map_dyn_id_'.$i; --- 336,339 ---- Index: admin_pa_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_custom.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_pa_custom.php 9 Jan 2005 21:44:07 -0000 1.8 --- admin_pa_custom.php 11 Apr 2005 17:55:38 -0000 1.9 *************** *** 1,55 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* Orignial code - define('IN_PHPBB', 1); - - if( !empty($setmodules) ) - { - $file = basename(__FILE__); - $module['Download'][$lang['Afield']] = "$file?mode=add"; - $module['Download'][$lang['Efield']] = "$file?mode=edit"; - $module['Download'][$lang['Dfield']] = "$file?mode=delete"; - return; - } - - $phpbb_root_path = "./../"; ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/functions_field.'.$phpEx); ! */ ! // MX Module ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Custom Field'] = "modules/mx_pafiledb/admin/" . "$file"; ! // $module['Download']['Custom Field: Add'] = "modules/mx_pafiledb/admin/" . "$file?mode=add"; ! // $module['Download']['Custom Field: Edit'] = "modules/mx_pafiledb/admin/" . "$file?mode=edit"; ! // $module['Download']['Custom Field: Delete'] = "modules/mx_pafiledb/admin/" . "$file?mode=delete"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - require( $mx_root_path . 'extension.inc' ); - - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - - include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); $custom_field = new custom_field(); --- 1,70 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! if ( file_exists( './../viewtopic.php' ) ) ! { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Custom_manage_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); ! ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Custom_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } $custom_field = new custom_field(); *************** *** 67,70 **** --- 82,88 ---- $template_file = 'admin/pa_admin_field_add.tpl'; break; + case 'editfield': + $template_file = 'admin/pa_admin_field_add.tpl'; + break; case 'edit': $template_file = 'admin/pa_admin_select_field.tpl'; *************** *** 89,93 **** $message = $lang['Fieldadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! }elseif ( $mode == 'do_add' && $field_id ) { $custom_field->update_add_field( $field_type, $field_id ); --- 107,112 ---- $message = $lang['Fieldadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! elseif ( $mode == 'do_add' && $field_id ) { $custom_field->update_add_field( $field_type, $field_id ); *************** *** 95,99 **** $message = $lang['Fieldedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! }elseif ( $mode == 'delete' ) { foreach( $field_ids as $key => $value ) --- 114,119 ---- $message = $lang['Fieldedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_pa_custom.' . $phpEx ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! elseif ( $mode == 'do_delete' ) { foreach( $field_ids as $key => $value ) *************** *** 107,112 **** } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ! ); switch ( $mode ) --- 127,131 ---- } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); switch ( $mode ) *************** *** 119,122 **** --- 138,144 ---- $l_title = $lang['Efieldtitle']; break; + case 'editfield': + $l_title = $lang['Efieldtitle']; + break; case 'delete': $l_title = $lang['Dfieldtitle']; *************** *** 130,148 **** { $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; ! }elseif ( $mode == 'addfield' ) { $s_hidden_fields = '<input type="hidden" name="field_type" value="' . $field_type . '">'; $s_hidden_fields .= '<input type="hidden" name="field_id" value="' . $field_id . '">'; $s_hidden_fields .= '<input type="hidden" name="mode" value="do_add">'; ! }elseif ( $mode == 'edit' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; ! }elseif ( $mode == 'delete' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="delete">'; } ! $pafiledb_template->assign_vars( array( 'L_FIELD_TITLE' => $l_title, 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, --- 152,176 ---- { $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; ! } ! elseif ( $mode == 'addfield' || $mode == 'editfield') { $s_hidden_fields = '<input type="hidden" name="field_type" value="' . $field_type . '">'; $s_hidden_fields .= '<input type="hidden" name="field_id" value="' . $field_id . '">'; $s_hidden_fields .= '<input type="hidden" name="mode" value="do_add">'; ! } ! elseif ( $mode == 'edit' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="editfield">'; ! } ! elseif ( $mode == 'delete' ) { ! $s_hidden_fields = '<input type="hidden" name="mode" value="do_delete">'; } ! ! $pafiledb_template->assign_vars( array( ! 'L_FIELD_TITLE' => $l_title, 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], + 'L_SELECT_TITLE' => $lang['Fieldselecttitle'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, *************** *** 150,154 **** ); ! if ( $mode == 'addfield' ) { if ( $field_id ) --- 178,182 ---- ); ! if ( $mode == 'addfield' || $mode == 'editfield') { if ( $field_id ) *************** *** 177,183 **** 'FIELD_ORDER' => $data['field_order'] ) ); ! }elseif ( $mode == 'add' ) { ! $field_types = array( INPUT => $lang['Input'], TEXTAREA => $lang['Textarea'], RADIO => $lang['Radio'], SELECT => $lang['Select'], SELECT_MULTIPLE => $lang['Select_multiple'], CHECKBOX => $lang['Checkbox'] ); $field_type_list = '<select name="field_type">'; --- 205,212 ---- 'FIELD_ORDER' => $data['field_order'] ) ); ! } ! elseif ( $mode == 'add' ) { ! $field_types = array( INPUT => $lang['Field_Input'], TEXTAREA => $lang['Field_Textarea'], RADIO => $lang['Field_Radio'], SELECT => $lang['Field_Select'], SELECT_MULTIPLE => $lang['Field_Select_multiple'], CHECKBOX => $lang['Field_Checkbox'] ); $field_type_list = '<select name="field_type">'; *************** *** 188,198 **** $field_type_list .= '</select>'; ! $pafiledb_template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ! ); ! }elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) { foreach( $custom_field->field_rowset as $field_id => $field_data ) { ! $pafiledb_template->assign_block_vars( 'field_row', array( 'FIELD_ID' => $field_id, 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_DESC' => $field_data['custom_description'] ) --- 217,228 ---- $field_type_list .= '</select>'; ! $pafiledb_template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ); ! } ! elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) { foreach( $custom_field->field_rowset as $field_id => $field_data ) { ! $pafiledb_template->assign_block_vars( 'field_row', array( ! 'FIELD_ID' => $field_id, 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_DESC' => $field_data['custom_description'] ) *************** *** 201,213 **** } $pafiledb_template->display( 'admin' ); - $pafiledb->_pafiledb(); $cache->unload(); - - /* Original - include('./page_footer_admin.'.$phpEx); - */ - // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 231,239 ---- } + // Output + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); $pafiledb->_pafiledb(); $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_pa_category.php 9 Jan 2005 21:44:06 -0000 1.7 --- admin_pa_category.php 11 Apr 2005 17:55:38 -0000 1.8 *************** *** 1,50 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Download']['Cat_manage_title'] = "$file"; ! return; ! } ! ! $phpbb_root_path = './../'; ! ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Category: Handling'] = "modules/mx_pafiledb/admin/" . "$file"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - - require( $mx_root_path . 'extension.inc' ); - - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - $pafiledb->init(); --- 1,69 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Cat_manage_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Cat_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } $pafiledb->init(); *************** *** 63,67 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'do_add' && $cat_id ) { $cat_id = $pafiledb->update_add_cat( $cat_id ); --- 82,87 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_add' && $cat_id ) { $cat_id = $pafiledb->update_add_cat( $cat_id ); *************** *** 72,76 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'do_delete' ) { $pafiledb->delete_cat( $cat_id ); --- 92,97 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_delete' ) { $pafiledb->delete_cat( $cat_id ); *************** *** 81,91 **** mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'cat_order' ) { $pafiledb->order_cat( $cat_id_other ); ! }elseif ( $mode == 'sync' ) { $pafiledb->sync( $cat_id_other ); ! }elseif ( $mode == 'sync_all' ) { $pafiledb->sync_all(); --- 102,115 ---- mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'cat_order' ) { $pafiledb->order_cat( $cat_id_other ); ! } ! elseif ( $mode == 'sync' ) { $pafiledb->sync( $cat_id_other ); ! } ! elseif ( $mode == 'sync_all' ) { $pafiledb->sync_all(); *************** *** 162,166 **** ); admin_cat_main( $cat_id ); ! }elseif ( $mode == 'add' || $mode == 'edit' ) { if ( $mode == 'add' ) --- 186,191 ---- ); admin_cat_main( $cat_id ); ! } ! elseif ( $mode == 'add' || $mode == 'edit' ) { if ( $mode == 'add' ) *************** *** 264,268 **** 'S_CAT_LIST' => $cat_list ) ); ! }elseif ( $mode == 'delete' ) { $select_cat = $pafiledb->jumpmenu_option( 0, 0, array( $cat_id => 1 ) ); --- 289,294 ---- 'S_CAT_LIST' => $cat_list ) ); ! } ! elseif ( $mode == 'delete' ) { $select_cat = $pafiledb->jumpmenu_option( 0, 0, array( $cat_id => 1 ) ); *************** *** 282,285 **** --- 308,312 ---- } + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); *************** *** 287,294 **** $cache->unload(); - /* Original - include('./page_footer_admin.'.$phpEx); - */ - // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 314,317 ---- Index: admin_pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_file.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** admin_pa_file.php 9 Jan 2005 21:44:07 -0000 1.10 --- admin_pa_file.php 11 Apr 2005 17:55:38 -0000 1.11 *************** *** 1,45 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Download']['File_manage_title'] = "$file"; ! return; } ! ! $phpbb_root_path = './../'; ! ! require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! include($phpbb_root_path . 'pafiledb/includes/functions_field.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File: Handling'] = "modules/mx_pafiledb/admin/" . "$file"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - require( $mx_root_path . 'extension.inc' ); - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); $custom_field = new custom_field(); --- 1,69 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File_manage_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['File_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } $custom_field = new custom_field(); *************** *** 705,717 **** ); $pafiledb_template->display( 'admin' ); - $pafiledb->_pafiledb(); $cache->unload(); - - /* Original - include('./page_footer_admin.'.$phpEx); - */ - // MX Module include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 729,737 ---- ); + // Output + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); $pafiledb->_pafiledb(); $cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); Index: admin_pa_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_settings.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_pa_settings.php 9 Jan 2005 21:44:07 -0000 1.8 --- admin_pa_settings.php 11 Apr 2005 17:55:39 -0000 1.9 *************** *** 1,48 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); - define('IN_PA_CONFIG_ADMIN', 1); - if( !empty($setmodules) ) - { - $file = basename(__FILE__); - $module['Download'][$lang['Settings']] = "$file"; - return; - } - - $phpbb_root_path = "./../"; - - require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! define( 'IN_PA_CONFIG_ADMIN', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Configuration'] = 'modules/mx_pafiledb/admin/' . "$file"; ! return; } - $module_root_path = '../'; - $mx_root_path = '../../../'; - require( $mx_root_path . 'extension.inc' ); - - require( $mx_root_path . 'admin/pagestart.' . $phpEx ); - include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); - // include_once($mx_root_path . 'admin/page_header_admin.' . $phpEx); $submit = ( isset( $_POST['submit'] ) ) ? true : false; $size = ( isset( $_POST['max_size'] ) ) ? $_POST['max_size'] : ''; --- 1,68 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! if ( file_exists( './../viewtopic.php' ) ) ! { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Configuration_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Configuration_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } $submit = ( isset( $_POST['submit'] ) ) ? true : false; $size = ( isset( $_POST['max_size'] ) ) ? $_POST['max_size'] : ''; *************** *** 113,117 **** 'admin' => 'admin/pa_admin_settings.tpl' ) ); ! // MX Addon $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); --- 133,137 ---- 'admin' => 'admin/pa_admin_settings.tpl' ) ); ! $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); *************** *** 156,167 **** $allow_comment_images_yes = ( $new['allow_comment_images'] ) ? ' selected' : ''; $allow_comment_images_no = ( !$new['allow_comment_images'] ) ? ' selected' : ''; - // MX Addon - $need_validation_yes = ( $new['need_validation'] ) ? ' selected' : ''; - $need_validation_no = ( !$new['need_validation'] ) ? ' selected' : ''; $pm_notify_yes = ( $new['pm_notify'] ) ? ' selected' : ''; $pm_notify_no = ( !$new['pm_notify'] ) ? ' selected' : ''; ! $template->assign_vars( array( 'S_SETTINGS_ACTION' => append_sid( "admin_pa_settings.$phpEx" ), 'L_MAX_FILE_SIZE' => $lang['Max_filesize'], --- 176,185 ---- $allow_comment_images_yes = ( $new['allow_comment_images'] ) ? ' selected' : ''; $allow_comment_images_no = ( !$new['allow_comment_images'] ) ? ' selected' : ''; $pm_notify_yes = ( $new['pm_notify'] ) ? ' selected' : ''; $pm_notify_no = ( !$new['pm_notify'] ) ? ' selected' : ''; ! $template->assign_vars( array( ! 'S_SETTINGS_ACTION' => append_sid( "admin_pa_settings.$phpEx" ), 'L_MAX_FILE_SIZE' => $lang['Max_filesize'], *************** *** 229,241 **** 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], ! // MX Addon 'L_VALIDATION_SETTINGS' => $lang['Validation_settings'], - 'L_NEED_VALIDATION' => $lang['Need_validate'], - 'L_VALIDATOR' => $lang['Validator'], 'L_PM_NOTIFY' => $lang['PM_notify'], - 'L_VALIDATOR_ADMIN_OPTION' => $lang['Validator_admin_option'], - 'L_VALIDATOR_MOD_OPTION' => $lang['Validator_mod_option'], - 'SETTINGS_DBNAME' => $new['settings_dbname'], 'SETTINGS_FILE_PAGE' => $new['settings_file_page'], --- 247,254 ---- 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], ! 'L_VALIDATION_SETTINGS' => $lang['Validation_settings'], 'L_PM_NOTIFY' => $lang['PM_notify'], 'SETTINGS_DBNAME' => $new['settings_dbname'], 'SETTINGS_FILE_PAGE' => $new['settings_file_page'], *************** *** 257,264 **** 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! // MX addon ! 'VALIDATOR_ADMIN' => ( $new['validator'] == 'validator_admin' ) ? 'selected="selected"' : '', ! 'VALIDATOR_MOD' => ( $new['validator'] == 'validator_mod' ) ? 'selected="selected"' : '', ! 'MAX_FILE_SIZE' => $new['max_file_size'], 'UPLOAD_DIR' => $new['upload_dir'], --- 270,274 ---- 'SORT_ASC' => ( $new['sort_order'] == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $new['sort_order'] == 'DESC' ) ? 'selected="selected"' : '', ! 'MAX_FILE_SIZE' => $new['max_file_size'], 'UPLOAD_DIR' => $new['upload_dir'], *************** *** 288,313 **** 'S_ALLOW_LINKS_YES' => $allow_comment_links_yes, 'S_ALLOW_LINKS_NO' => $allow_comment_links_no, ! // MX Addon ! 'S_NEED_VALIDATION_YES' => $need_validation_yes, ! 'S_NEED_VALIDATION_NO' => $need_validation_no, ! 'S_PM_NOTIFY_YES' => $pm_notify_yes, 'S_PM_NOTIFY_NO' => $pm_notify_no, ! 'S_ALLOW_IMAGES_YES' => $allow_comment_images_yes, 'S_ALLOW_IMAGES_NO' => $allow_comment_images_no ) ); $template->pparse( 'admin' ); - - $pafiledb->_pafiledb(); - $cache->unload(); - - /* - orig - include('./page_footer_admin.'.$phpEx); - */ - // MX include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); function pa_size_select( $select_name, $size_compare ) { --- 298,315 ---- 'S_ALLOW_LINKS_YES' => $allow_comment_links_yes, 'S_ALLOW_LINKS_NO' => $allow_comment_links_no, ! 'S_PM_NOTIFY_YES' => $pm_notify_yes, 'S_PM_NOTIFY_NO' => $pm_notify_no, ! 'S_ALLOW_IMAGES_YES' => $allow_comment_images_yes, 'S_ALLOW_IMAGES_NO' => $allow_comment_images_no ) ); + // Output + include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); + function pa_size_select( $select_name, $size_compare ) { Index: admin_pa_ug_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_ug_auth.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_pa_ug_auth.php 9 Jan 2005 21:44:07 -0000 1.4 --- admin_pa_ug_auth.php 11 Apr 2005 17:55:39 -0000 1.5 *************** *** 1,11 **** <?php /** ! * admin_pa_ug_auth.php * ------------------- ! * begin : Saturday, Feb 13, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... * ! * $Id$ */ --- 1,12 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ *************** *** 16,54 **** * (at your option) any later version. */ ! /* - orig ! define('IN_PHPBB', 1); ! ! if( !empty($setmodules) ) { ! $filename = basename(__FILE__); ! //$module['Download']['User_Permissions'] = $filename . "?mode=user"; ! //$module['Download']['Group_Permissions'] = $filename . "?mode=group"; ! return; } ! ! $no_page_header = TRUE; ! $phpbb_root_path = './../'; ! require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! define( 'IN_PA_CONFIG_ADMIN', 1 ); ! if ( !empty( $setmodules ) ) { ! $file = basename( __FILE__ ); ! // $module['Download']['Permissions: Users'] = 'modules/mx_pafiledb/admin/' . "$file"; ! return; ! } ! $module_root_path = '../'; ! $mx_root_path = '../../../'; ! require( $mx_root_path . 'extension.inc' ); ! ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); $pafiledb->init(); --- 17,70 ---- * (at your option) any later version. */ ! ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! } ! else { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); ! ! } $pafiledb->init(); Index: admin_pa_catauth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_catauth.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_pa_catauth.php 9 Jan 2005 21:44:06 -0000 1.6 --- admin_pa_catauth.php 11 Apr 2005 17:55:38 -0000 1.7 *************** *** 1,11 **** <?php /** ! * admin_forumauth.php * ------------------- ! * begin : Saturday, Feb 13, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... * ! * $Id$ */ --- 1,12 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ *************** *** 17,76 **** */ ! /* Orignial code --------------------------------- ! define('IN_PHPBB', 1); ! ! if( !empty($setmodules) ) ! { ! $filename = basename(__FILE__); ! $module['Download']['Permissions'] = $filename; ! ! return; ! } ! */ ! // MX Module ! define( 'IN_PORTAL', 1 ); ! ! if ( !empty( $setmodules ) ) { ! $filename = basename( __FILE__ ); ! $module['pafileDB_Download']['Permissions'] = 'modules/mx_pafiledb/admin/' . $filename; ! return; } ! ! /* ! // ! // Load default header - orignial code ! // ! $no_page_header = TRUE; ! $phpbb_root_path = './../'; ! require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! ! // Load default header - MX module ! ! $no_page_header = true; ! $module_root_path = '../'; ! $mx_root_path = '../../../'; ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! $pafiledb->init(); ! $cat_auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment' ); $field_names = array( 'auth_view' => $lang['View'], 'auth_read' => $lang['Read'], 'auth_view_file' => $lang['View_file'], - // MX Addon 'auth_edit_file' => $lang['Edit_file'], 'auth_delete_file' => $lang['Delete_file'], - // End 'auth_upload' => $lang['Upload'], 'auth_download' => $lang['Download_file'], 'auth_rate' => $lang['Rate'], --- 18,79 ---- */ ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Permissions_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } ! else ! { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['Permissions_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } ! $pafiledb->init(); ! $cat_auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment', 'auth_approval' ); $field_names = array( 'auth_view' => $lang['View'], 'auth_read' => $lang['Read'], 'auth_view_file' => $lang['View_file'], 'auth_edit_file' => $lang['Edit_file'], 'auth_delete_file' => $lang['Delete_file'], 'auth_upload' => $lang['Upload'], + 'auth_approval' => $lang['Approval'], 'auth_download' => $lang['Download_file'], 'auth_rate' => $lang['Rate'], *************** *** 137,142 **** // specified ! $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_cat_body.tpl' ) ! ); $permissions_menu = array( append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], --- 140,144 ---- // specified ! $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_cat_body.tpl' ) ); $permissions_menu = array( append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], *************** *** 167,171 **** admin_display_cat_auth( $cat_parent ); $cat_name = ''; ! }elseif ( !empty( $cat_id ) ) { $pafiledb_template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $pafiledb->cat_rowset[$cat_id]['cat_name'], --- 169,174 ---- admin_display_cat_auth( $cat_parent ); $cat_name = ''; ! } ! elseif ( !empty( $cat_id ) ) { $pafiledb_template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $pafiledb->cat_rowset[$cat_id]['cat_name'], *************** *** 207,227 **** ); ! /* Original code ! include('./page_header_admin.'.$phpEx); ! $pafiledb_template->display('body'); ! ! $pafiledb->_pafiledb(); ! $cache->unload(); ! ! include('./page_footer_admin.'.$phpEx); ! ! */ ! // MX Module include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'body' ); - include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - $pafiledb->_pafiledb(); $cache->unload(); function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) --- 210,219 ---- ); ! // Output include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'body' ); $pafiledb->_pafiledb(); $cache->unload(); + include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) Index: admin_pa_license.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_license.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_pa_license.php 9 Jan 2005 21:44:07 -0000 1.7 --- admin_pa_license.php 11 Apr 2005 17:55:38 -0000 1.8 *************** *** 1,52 **** <?php /** ! * pafiledb mx module * ------------------- ! * copyright : (C) 2002 MX-System ! * begin : oct 23, 2003 ! * email : jon...@ho... ! * based on code by Mohd Basri, and pafilDB * ! * $Id$ */ - /* - orig - define('IN_PHPBB', 1); ! if( !empty($setmodules) ) { ! $file = basename(__FILE__); ! $module['Download'][$lang['Alicense']] = "$file?license=add"; ! $module['Download'][$lang['Elicense']] = "$file?license=edit"; ! $module['Download'][$lang['Dlicense']] = "$file?license=delete"; ! return; ! } ! ! $phpbb_root_path = "./../"; ! ! require($phpbb_root_path . 'extension.inc'); ! ! require('./pagestart.' . $phpEx); ! ! include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); ! */ ! // MX ! define( 'IN_PORTAL', 1 ); ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['License'] = "modules/mx_pafiledb/admin/" . "$file"; ! // $module['Download']['License: Add'] = "modules/mx_pafiledb/admin/" . "$file?license=add"; ! // $module['Download']['License: Edit'] = "modules/mx_pafiledb/admin/" . "$file?license=edit"; ! // $module['Download']['License: Delete'] = "modules/mx_pafiledb/admin/" . "$file?license=delete"; ! return; } ! $module_root_path = '../'; ! $mx_root_path = '../../../'; ! require( $mx_root_path . 'extension.inc' ); ! ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); if ( isset( $HTTP_GET_VARS['license'] ) || isset( $HTTP_POST_VARS['license'] ) ) --- 1,67 ---- <?php /** ! * mxBB pafileDB adminCP * ------------------- ! * subject : mx-portal, CMS & portal ! * copyright : (C) 2003-2005 mxBB ! * original author : based on code by Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena ! * email : jon...@ho... * ! * $Id$ */ ! /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! if ( file_exists( './../viewtopic.php' ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', false ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['License_title'] = $file; ! return; ! } ! // Load default header ! ! $no_page_header = true; ! $phpbb_root_path = $module_root_path = $mx_root_path = './../'; ! require( $phpbb_root_path . 'extension.inc' ); ! require( './pagestart.' . $phpEx ); ! ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } ! else ! { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! if ( !empty( $setmodules ) ) ! { ! $file = basename( __FILE__ ); ! $module['pafileDB_Download']['License_title'] = 'modules/mx_pafiledb/admin/' . $file; ! return; ! } ! ! $no_page_header = true; ! $module_root_path = './../'; ! $mx_root_path = './../../../'; ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'more_smilies.php' ) ); ! ! require( $mx_root_path . 'extension.inc' ); ! require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! } if ( isset( $HTTP_GET_VARS['license'] ) || isset( $HTTP_POST_VARS['license'] ) ) *************** *** 100,105 **** } - $template->pparse( 'admin' ); - break; } --- 115,118 ---- *************** *** 198,203 **** } - $template->pparse( 'admin' ); - break; } --- 211,214 ---- *************** *** 277,282 **** } - $template->pparse( 'admin' ); - break; } --- 288,291 ---- *************** *** 314,323 **** 'ROW' => $row ) ); - $template->pparse( 'admin' ); } ! /* - orig ! include('./page_footer_admin.'.$phpEx); ! */ ! // MX include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 323,331 ---- 'ROW' => $row ) ); } ! ! // Output ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); ! $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); |
|
From: Jon O. <jon...@us...> - 2005-04-11 17:56:21
|
Update of /cvsroot/mxbb/mx_pafiledb/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2875/modules/mx_pafiledb/language/lang_english Modified Files: lang_admin_pafiledb.php lang_pafiledb.php Log Message: finally upgrading this module/mod - merging phpBB mod, mxBB module (2.7.x and 2.8) -.permissions reviewed - pm notification added - and many many minor fixes all over the place Index: lang_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/language/lang_english/lang_pafiledb.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** lang_pafiledb.php 6 Mar 2005 01:13:11 -0000 1.10 --- lang_pafiledb.php 11 Apr 2005 17:55:40 -0000 1.11 *************** *** 246,248 **** --- 246,258 ---- $lang['Pa_settings_explain'] = "Here you can edit the configuration for the pa module. This panel lets you associate pa cats and dynamic blocks for the quickdl block."; + // PM Notification + $lang['PA_title'] = 'Download database'; + $lang['PA_goto_file'] = 'View file'; + $lang['PA_notify_subject_new'] = 'New file uploaded!'; + $lang['PA_notify_subject_edited'] = 'Edited File!'; + $lang['PA_notify_subject_approved'] = 'Approved File!'; + $lang['PA_notify_subject_unapproved'] = 'Unapproved File!'; + $lang['PA_notify_body'] = 'A file has been uploaded or modified:'; + + $lang['kb_no_ratings'] = 'Disabled in this category'; ?> \ No newline at end of file Index: lang_admin_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/language/lang_english/lang_admin_pafiledb.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** lang_admin_pafiledb.php 9 Jan 2005 21:44:14 -0000 1.10 --- lang_admin_pafiledb.php 11 Apr 2005 17:55:40 -0000 1.11 *************** *** 68,71 **** --- 68,72 ---- $lang['Edit_file'] = 'Edit File'; $lang['Upload'] = 'Upload File'; + $lang['Approval'] = 'Approval Level'; $lang['Download_file'] = 'Download File'; $lang['Rate'] = 'Rate'; *************** *** 111,115 **** $lang['Dbdlinfo'] = 'This will make the download section unavailable to users. This is a good option to use when making modifications to your database. Only Admins will be able to view the database'; $lang['Isdisabled'] = 'The download section is currently unavailable, please try again later.'; - $lang['Com_settings'] = 'Comment Settings'; $lang['Com_allowh'] = 'Allow HTML'; $lang['Com_allowb'] = 'Allow BBCode'; --- 112,115 ---- *************** *** 155,158 **** --- 155,159 ---- // Custom Field + $lang['Fieldselecttitle'] = 'Select what to do'; $lang['Afield'] = 'Custom Field: Add'; $lang['Efield'] = 'Custom Field: Edit'; *************** *** 276,297 **** //Fields Types ! $lang['Input'] = 'Single-Line Text Box'; ! $lang['Textarea'] = 'Multiple-Line Text Box'; ! $lang['Radio'] = 'Single-Selection Radio Buttons'; ! $lang['Select'] = 'Single-Selection Menu'; ! $lang['Select_multiple'] = 'Multiple-Selection Menu'; ! $lang['Checkbox'] = 'Multiple-Selection Checkbox'; ! // MX Addon ! $lang['Validation_settings'] = 'Validation of uploads'; ! $lang['Need_validate'] = 'Validate uploads?'; ! $lang['Validator'] = 'Validator'; ! $lang['PM_notify'] = 'PM Notify to validator(s) (n/a)'; ! $lang['Validator_admin_option'] = 'Admin'; ! $lang['Validator_mod_option'] = 'Admin and cat moderator'; ! $lang['Allow_comments'] = 'Enable comments (n/a)'; $lang['Allow_comments_info'] = 'Enable/disable comments in this category.'; ! $lang['Allow_ratings'] = 'Enable ratings (n/a)'; $lang['Allow_ratings_info'] = 'Enable/disable ratings in this category.'; --- 277,298 ---- //Fields Types ! $lang['Field_Input'] = 'Single-Line Text Box'; ! $lang['Field_Textarea'] = 'Multiple-Line Text Box'; ! $lang['Field_Radio'] = 'Single-Selection Radio Buttons'; ! $lang['Field_Select'] = 'Single-Selection Menu'; ! $lang['Field_Select_multiple'] = 'Multiple-Selection Menu'; ! $lang['Field_Checkbox'] = 'Multiple-Selection Checkbox'; ! $lang['Com_settings'] = 'Comment Settings'; ! $lang['Validation_settings'] = 'Approval Settings'; ! $lang['Ratings_settings'] = 'Ratings Settings'; ! $lang['PM_notify'] = 'PM Notification (to admin)'; ! $lang['Use_comments'] = 'Enable comments'; ! $lang['Allow_comments'] = 'Enable comments'; $lang['Allow_comments_info'] = 'Enable/disable comments in this category.'; ! ! $lang['Use_ratings'] = 'Enable ratings'; ! $lang['Allow_ratings'] = 'Enable ratings'; $lang['Allow_ratings_info'] = 'Enable/disable ratings in this category.'; |