|
From: Jon O. <jon...@us...> - 2006-06-30 19:54:26
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9382/modules/mx_linkdb/linkdb/includes Modified Files: functions_linkdb.php functions_linkdb_field.php linkdb_common.php linkdb_constants.php Log Message: Ok, i'm starting with some code cleanup, before digging deep... Index: linkdb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/linkdb_common.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** linkdb_common.php 17 Jun 2006 20:48:33 -0000 1.5 --- linkdb_common.php 30 Jun 2006 19:54:14 -0000 1.6 *************** *** 14,19 **** } // addslashes to vars if magic_quotes_gpc is off ! if ( !@function_exists( 'slash_input_data' ) ) { --- 14,20 ---- } + // // addslashes to vars if magic_quotes_gpc is off ! // if ( !@function_exists( 'slash_input_data' ) ) { *************** *** 31,36 **** } // to make it work with php version under 4.1 and other stuff ! if ( @phpversion() < '4.1' ) { --- 32,38 ---- } + // // to make it work with php version under 4.1 and other stuff ! // if ( @phpversion() < '4.1' ) { *************** *** 57,61 **** --- 59,65 ---- } + // // Include linkdb data file + // include_once( $module_root_path . 'linkdb/includes/linkdb_constants.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions.' . $phpEx ); *************** *** 66,72 **** $linkdb = new linkdb_public(); // MX add-on // Generate paths for page and standalone mode ! // ...function based on original function written by Markus :-) function linkdb_this_mxurl( $args = '', $force_standalone_mode = false ) { --- 70,78 ---- $linkdb = new linkdb_public(); + + // // MX add-on // Generate paths for page and standalone mode ! // function linkdb_this_mxurl( $args = '', $force_standalone_mode = false ) { *************** *** 91,94 **** return $mxurl; } - ?> \ No newline at end of file --- 97,99 ---- Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_linkdb.php 17 Jun 2006 20:48:33 -0000 1.7 --- functions_linkdb.php 30 Jun 2006 19:54:14 -0000 1.8 *************** *** 14,17 **** --- 14,18 ---- } + // // public linkdb class // *************** *** 60,63 **** --- 61,65 ---- } + // // this will be replaced by the loaded module // *************** *** 67,74 **** } // go ahead and output the page // $page title : send page title // $tpl_name : template file name ! function display( $page_title1, $tpl_name ) { --- 69,77 ---- } + // // go ahead and output the page // $page title : send page title // $tpl_name : template file name ! // function display( $page_title1, $tpl_name ) { *************** *** 80,85 **** } // linkdb class ! class linkdb { --- 83,89 ---- } + // // linkdb class ! // class linkdb { *************** *** 123,126 **** --- 127,131 ---- } + // // Jump menu function // $cat_id : to handle parent cat_id *************** *** 129,133 **** // $for_file: TRUE high category ids will be -1 // $check_upload: if true permission for upload will be checked ! function jumpmenu_option( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { --- 134,138 ---- // $for_file: TRUE high category ids will be -1 // $check_upload: if true permission for upload will be checked ! // function jumpmenu_option( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { *************** *** 192,197 **** } // if there is no cat ! function cat_empty() { --- 197,203 ---- } + // // if there is no cat ! // function cat_empty() { *************** *** 204,210 **** } // get all sub category in side certain category // $cat_id : category id ! function get_sub_cat( $cat_id ) { --- 210,217 ---- } + // // get all sub category in side certain category // $cat_id : category id ! // function get_sub_cat( $cat_id ) { *************** *** 310,322 **** foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ! ); } } ! $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; --- 317,331 ---- foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $template->assign_block_vars( 'navlinks', array( ! 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ! ); } } ! $template->assign_block_vars( 'navlinks', array( ! 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; *************** *** 407,420 **** $template->assign_block_vars( 'CAT_PARENT', array() ); ! $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category if ( isset( $this->subcat_rowset[$cat_id] ) ) { ! // Separate link categories into $catcol columns, script by CRLin ! $catnum = count( $this->subcat_rowset[$cat_id] ); $catcol = $linkdb_config['cat_col']; --- 416,430 ---- $template->assign_block_vars( 'CAT_PARENT', array() ); ! $template->assign_vars( array( ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category if ( isset( $this->subcat_rowset[$cat_id] ) ) { ! // // Separate link categories into $catcol columns, script by CRLin ! // $catnum = count( $this->subcat_rowset[$cat_id] ); $catcol = $linkdb_config['cat_col']; *************** *** 433,443 **** $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! // 'SUB_CAT' => ( !empty($sub_cat) ) ? $sub_cat : $lang['None'], ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'CAT_IMAGE' => $images['linkdb_folder'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); } } --- 443,454 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( ! 'CAT_PARENT.catcol.no_cat_parent', array( 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! // 'SUB_CAT' => ( !empty($sub_cat) ) ? $sub_cat : $lang['None'], ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'CAT_IMAGE' => $images['linkdb_folder'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); } } *************** *** 521,554 **** $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], ! 'L_LINK_SITE_DESC' => $lang['Siteld'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_FILE' => $lang['Link'], ! 'L_SUBMITED_BY' => $lang['Submiter'], ! 'L_VOTES' => $lang['Votes'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'link_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'link_time' ) ? 'selected="selected"' : '', ! 'SORT_LONGDESC' => ( $sort_method == 'link_longdesc' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'link_hits' ) ? 'selected="selected"' : '', ! 'SORT_RATINGS' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( linkdb_this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_file / $linkdb_config['settings_link_page'] ) ), ! 'ID' => $cat_id, ! 'START' => $start, ! 'S_ACTION_SORT' => append_sid( linkdb_this_mxurl( "action=$action" ) ) ) ! ); if ( !$linkdb_config['split_links'] ) --- 532,566 ---- $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_LINK_SITE_DESC' => $lang['Siteld'], ! 'L_DOWNLOADS' => $lang['Hits'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Sitename'], ! 'L_FILE' => $lang['Link'], ! 'L_SUBMITED_BY' => $lang['Submiter'], ! 'L_VOTES' => $lang['Votes'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'link_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'link_time' ) ? 'selected="selected"' : '', ! 'SORT_LONGDESC' => ( $sort_method == 'link_longdesc' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'link_hits' ) ? 'selected="selected"' : '', ! 'SORT_RATINGS' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( linkdb_this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_file / $linkdb_config['settings_link_page'] ) ), ! 'ID' => $cat_id, ! 'START' => $start, ! 'S_ACTION_SORT' => append_sid( linkdb_this_mxurl( "action=$action" ) ) ) ! ); if ( !$linkdb_config['split_links'] ) *************** *** 558,568 **** for ( $i = 0; $i < count( $file_rowset ); $i++ ) { ! // Format the date for the given file ! $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); // If the file is new then put a new image in front of it ! /*$is_new = FALSE; if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $file_rowset[$i]['link_time']) --- 570,581 ---- for ( $i = 0; $i < count( $file_rowset ); $i++ ) { ! // // Format the date for the given file ! // $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); + // // If the file is new then put a new image in front of it ! // /*$is_new = FALSE; if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $file_rowset[$i]['link_time']) *************** *** 581,604 **** // Assign Vars ! $template->assign_block_vars( "FILELIST.file_rows", array( 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), ! 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), ! 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], ! 'FILE_NAME' => $file_rowset[$i]['link_name'], ! 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], ! 'DATE' => $date, ! 'POSTER' => $file_poster, ! 'FILE_DLS' => $file_rowset[$i]['link_hits'], ! 'FILE_VOTES' => $file_rowset[$i]['total_votes'], ! 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', ! 'RATING' => $file_rating, ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, - 'U_CAT' => $cat_url, - 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ) ) - ); if ( $linkdb_config['allow_vote'] ) { --- 594,619 ---- // Assign Vars ! $template->assign_block_vars( "FILELIST.file_rows", array( ! 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), ! 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), ! 'FILE_NEW_IMAGE' => $images['linkdb_link_new'], ! 'FILE_NAME' => $file_rowset[$i]['link_name'], ! 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], ! 'DATE' => $date, ! 'POSTER' => $file_poster, ! 'FILE_DLS' => $file_rowset[$i]['link_hits'], ! 'FILE_VOTES' => $file_rowset[$i]['total_votes'], ! 'L_RATING' => '<a href="' . append_sid( linkdb_this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', ! 'RATING' => $file_rating, ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, ! ! 'U_CAT' => $cat_url, ! 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ) ) ! ); if ( $linkdb_config['allow_vote'] ) { *************** *** 614,621 **** { $template->assign_block_vars( 'NO_FILE', array() ); ! $template->assign_vars( array( 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_links'], ! 'L_NO_FILES_CAT' => $lang['No_links_cat'] ) ! ); } } --- 629,637 ---- { $template->assign_block_vars( 'NO_FILE', array() ); ! $template->assign_vars( array( ! 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_links'], ! 'L_NO_FILES_CAT' => $lang['No_links_cat'] ) ! ); } } *************** *** 1117,1120 **** } } - ?> \ No newline at end of file --- 1133,1135 ---- Index: linkdb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/linkdb_constants.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** linkdb_constants.php 17 Jun 2006 20:12:00 -0000 1.7 --- linkdb_constants.php 30 Jun 2006 19:54:14 -0000 1.8 *************** *** 16,20 **** --- 16,22 ---- define( 'LINKDB_ROOT_CAT', 0 ); + // // Field Types + // define( 'INPUT', 0 ); define( 'TEXTAREA', 1 ); *************** *** 24,28 **** define( 'CHECKBOX', 5 ); ! // tables define( 'LINKS_TABLE', $mx_table_prefix . 'linkdb' ); define( 'LINK_CATEGORIES_TABLE', $mx_table_prefix . 'linkdb_categories' ); --- 26,32 ---- define( 'CHECKBOX', 5 ); ! // ! // Tables ! // define( 'LINKS_TABLE', $mx_table_prefix . 'linkdb' ); define( 'LINK_CATEGORIES_TABLE', $mx_table_prefix . 'linkdb_categories' ); Index: functions_linkdb_field.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb_field.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions_linkdb_field.php 17 Jun 2006 20:12:00 -0000 1.5 --- functions_linkdb_field.php 30 Jun 2006 19:54:14 -0000 1.6 *************** *** 19,24 **** var $field_data_rowset = array(); // prepare data ! function init() { --- 19,25 ---- var $field_data_rowset = array(); + // // prepare data ! // function init() { *************** *** 59,64 **** } // check if there is a data in the database ! function field_data_exist() { --- 60,66 ---- } + // // check if there is a data in the database ! // function field_data_exist() { *************** *** 79,84 **** } // display data in the file page ! function display_data( $file_id ) { --- 81,87 ---- } + // // display data in the file page ! // function display_data( $file_id ) { *************** *** 106,112 **** } ! $template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ! ); } else --- 109,116 ---- } ! $template->assign_block_vars( 'custom_field', array( ! 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ! ); } else *************** *** 176,184 **** { global $template; ! $template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } --- 180,189 ---- { global $template; ! $template->assign_block_vars( 'input', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } *************** *** 186,194 **** { global $template; ! $template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } --- 191,200 ---- { global $template; ! $template->assign_block_vars( 'textarea', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } *************** *** 196,203 **** { global $template; ! $template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); --- 202,210 ---- { global $template; ! $template->assign_block_vars( 'radio', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); *************** *** 208,214 **** foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ! ); } } --- 215,222 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'radio.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ! ); } } *************** *** 218,225 **** { global $template; ! $template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; --- 226,234 ---- { global $template; ! $template->assign_block_vars( 'select', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; *************** *** 230,236 **** foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ! ); } } --- 239,246 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'select.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ! ); } } *************** *** 240,247 **** { global $template; ! $template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); --- 250,258 ---- { global $template; ! $template->assign_block_vars( 'select_multiple', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); *************** *** 261,267 **** } } ! $template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ! ); } } --- 272,279 ---- } } ! $template->assign_block_vars( 'select_multiple.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ! ); } } *************** *** 271,278 **** { global $template; ! $template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); --- 283,291 ---- { global $template; ! $template->assign_block_vars( 'checkbox', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); *************** *** 292,298 **** } } ! $template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ! ); } } --- 305,312 ---- } } ! $template->assign_block_vars( 'checkbox.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ! ); } } *************** *** 452,455 **** } } - ?> \ No newline at end of file --- 466,468 ---- |