|
From: Jon O. <jon...@us...> - 2006-07-05 22:49:25
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6984/modules/mx_linkdb/linkdb/includes Modified Files: functions.php functions_comment.php functions_linkdb.php Log Message: massive update Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** functions.php 4 Jul 2006 22:34:37 -0000 1.11 --- functions.php 5 Jul 2006 22:49:20 -0000 1.12 *************** *** 14,19 **** --- 14,34 ---- } + /** + * linkdb_functions. + * + * This class is used for general linkdb handling + * + * @access public + * @author Jon Ohlsson [...1365 lines suppressed...] ! $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : ( $non_html_amp ? '&' : '&' ) . $args ); ! } ! else ! { ! $mxurl .= ( $args == '' ? '' : '?' . $args ); ! } } - return $mxurl; } ?> \ No newline at end of file --- 502,508 ---- $this->data['item_editor_id'] = $userdata['user_id']; $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! $this->temp_url = PORTAL_URL . $linkdb->this_mxurl("action=" . "link&link_id=" . $this->data['item_id'], false, true); } } ?> \ No newline at end of file Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_comment.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_comment.php 1 Jul 2006 21:32:19 -0000 1.1 --- functions_comment.php 5 Jul 2006 22:49:20 -0000 1.2 *************** *** 163,172 **** // ! // Instatiate text tools ! // ! $mx_pa_text_tools = new mx_pa_text_tools(); ! ! // ! // Instantiate the mx_text class // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); --- 163,167 ---- // ! // Instantiate the mx_text and mx_text_formatting classes // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); *************** *** 175,178 **** --- 170,175 ---- $mx_text->allow_all_html_tags = $linkdb_config['allow_wysiwyg'] ? true : false; + $mx_text_formatting = new mx_text_formatting(); + $template->assign_block_vars( 'use_comments', array( 'L_COMMENTS' => $lang['Comments'], *************** *** 202,206 **** if (!$linkdb_config['allow_comment_images'] || !$linkdb_config['allow_comment_links']) { ! $comments_text = $mx_pa_text_tools->remove_images_links( $comments_text, $linkdb_config['allow_comment_images'], $linkdb_config['no_comment_image_message'], $linkdb_config['allow_comment_links'], $linkdb_config['no_comment_link_message'] ); } --- 199,203 ---- if (!$linkdb_config['allow_comment_images'] || !$linkdb_config['allow_comment_links']) { ! $comments_text = $mx_text_formatting->remove_images_links( $comments_text, $linkdb_config['allow_comment_images'], $linkdb_config['no_comment_image_message'], $linkdb_config['allow_comment_links'], $linkdb_config['no_comment_link_message'] ); } *************** *** 260,274 **** if ( $linkdb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_pa_text_tools->truncate_text( $comments_title, $linkdb_config['max_comment_subject_chars'], true ); } if ( $linkdb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_pa_text_tools->truncate_text( $comments_text, $linkdb_config['max_comment_chars'], true ); } if ( $linkdb_config['formatting_comment_truncate_links'] || $linkdb_config['formatting_comment_image_resize'] > 0 || $linkdb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_pa_text_tools->decode( $comments_text, $linkdb_config['formatting_comment_truncate_links'], intval($linkdb_config['formatting_comment_image_resize']), $linkdb_config['formatting_comment_wordwrap'] ); } --- 257,271 ---- if ( $linkdb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_text_formatting->truncate_text( $comments_title, $linkdb_config['max_comment_subject_chars'], true ); } if ( $linkdb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_text_formatting->truncate_text( $comments_text, $linkdb_config['max_comment_chars'], true ); } if ( $linkdb_config['formatting_comment_truncate_links'] || $linkdb_config['formatting_comment_image_resize'] > 0 || $linkdb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_text_formatting->decode( $comments_text, $linkdb_config['formatting_comment_truncate_links'], intval($linkdb_config['formatting_comment_image_resize']), $linkdb_config['formatting_comment_wordwrap'] ); } *************** *** 278,282 **** 'L_COMMENTS_NAME' => $lang['Name'], 'POSTER' => $poster, ! 'ICON_MINIPOST_IMG' => $images['pa_icon_minipost'], 'ICON_SPACER' => $images['mx_spacer'], 'POSTER_RANK' => $poster_rank, --- 275,279 ---- 'L_COMMENTS_NAME' => $lang['Name'], 'POSTER' => $poster, ! 'ICON_MINIPOST_IMG' => $images['linkdb_icon_minipost'], 'ICON_SPACER' => $images['mx_spacer'], 'POSTER_RANK' => $poster_rank, *************** *** 292,297 **** $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( pa_this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['comments_id'] ) ), ! 'EDIT_IMG' => $images['pa_icon_edit'], )); } --- 289,294 ---- $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( $linkdb->this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['comments_id'] ) ), ! 'EDIT_IMG' => $images['linkdb_icon_edit'], )); } *************** *** 301,306 **** $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( pa_this_mxurl( "action=post_comment&cid=".$this->comments_row['comments_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), ! 'DELETE_IMG' => $images['pa_icon_delpost'], )); } --- 298,303 ---- $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( $linkdb->this_mxurl( "action=post_comment&cid=".$this->comments_row['comments_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), ! 'DELETE_IMG' => $images['linkdb_icon_delpost'], )); } *************** *** 312,322 **** $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( pa_this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id) ), ! 'REPLY_IMG' => $images['pa_comment_post'], )); } $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( pa_this_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) { --- 309,319 ---- $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( $linkdb->this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id) ), ! 'REPLY_IMG' => $images['linkdb_comment_post'], )); } $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( $linkdb->this_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) { *************** *** 371,380 **** // ! // Instatiate text tools ! // ! $mx_pa_text_tools = new mx_pa_text_tools(); ! ! // ! // Instantiate the mx_text class // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); --- 368,372 ---- // ! // Instantiate the mx_text and mx_text_formatting classes // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); *************** *** 383,386 **** --- 375,380 ---- $mx_text->allow_all_html_tags = $linkdb_config['allow_wysiwyg'] ? true : false; + $mx_text_formatting = new mx_text_formatting(); + $template->assign_block_vars( 'use_comments', array( 'L_COMMENTS' => $lang['Comments'], *************** *** 425,429 **** if (!$linkdb_config['allow_comment_images'] || !$linkdb_config['allow_comment_links']) { ! $comments_text = $mx_pa_text_tools->remove_images_links( $comments_text, $linkdb_config['allow_comment_images'], $linkdb_config['no_comment_image_message'], $linkdb_config['allow_comment_links'], $linkdb_config['no_comment_link_message'] ); } --- 419,423 ---- if (!$linkdb_config['allow_comment_images'] || !$linkdb_config['allow_comment_links']) { ! $comments_text = $mx_text_formatting->remove_images_links( $comments_text, $linkdb_config['allow_comment_images'], $linkdb_config['no_comment_image_message'], $linkdb_config['allow_comment_links'], $linkdb_config['no_comment_link_message'] ); } *************** *** 433,447 **** if ( $linkdb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_pa_text_tools->truncate_text( $comments_title, $linkdb_config['max_comment_subject_chars'], true ); } if ( $linkdb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_pa_text_tools->truncate_text( $comments_text, $linkdb_config['max_comment_chars'], true ); } if ( $linkdb_config['formatting_comment_truncate_links'] || $linkdb_config['formatting_comment_image_resize'] > 0 || $linkdb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_pa_text_tools->decode( $comments_text, $linkdb_config['formatting_comment_truncate_links'], intval($linkdb_config['formatting_comment_image_resize']), $linkdb_config['formatting_comment_wordwrap'] ); } --- 427,441 ---- if ( $linkdb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_text_formatting->truncate_text( $comments_title, $linkdb_config['max_comment_subject_chars'], true ); } if ( $linkdb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_text_formatting->truncate_text( $comments_text, $linkdb_config['max_comment_chars'], true ); } if ( $linkdb_config['formatting_comment_truncate_links'] || $linkdb_config['formatting_comment_image_resize'] > 0 || $linkdb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_text_formatting->decode( $comments_text, $linkdb_config['formatting_comment_truncate_links'], intval($linkdb_config['formatting_comment_image_resize']), $linkdb_config['formatting_comment_wordwrap'] ); } *************** *** 514,518 **** 'L_COMMENTS_NAME' => $lang['Name'], 'POSTER' => $poster, ! 'ICON_MINIPOST_IMG' => $images['pa_icon_minipost'], 'ICON_SPACER' => $images['mx_spacer'], 'POSTER_RANK' => $poster_rank, --- 508,512 ---- 'L_COMMENTS_NAME' => $lang['Name'], 'POSTER' => $poster, ! 'ICON_MINIPOST_IMG' => $images['linkdb_icon_minipost'], 'ICON_SPACER' => $images['mx_spacer'], 'POSTER_RANK' => $poster_rank, *************** *** 528,533 **** $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( pa_this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['post_id'] ) ), ! 'EDIT_IMG' => $images['pa_icon_edit'], )); } --- 522,527 ---- $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( $linkdb->this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['post_id'] ) ), ! 'EDIT_IMG' => $images['linkdb_icon_edit'], )); } *************** *** 537,542 **** $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( pa_this_mxurl( "action=post_comment&cid=".$this->comments_row['post_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), ! 'DELETE_IMG' => $images['pa_icon_delpost'], )); } --- 531,536 ---- $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( $linkdb->this_mxurl( "action=post_comment&cid=".$this->comments_row['post_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), ! 'DELETE_IMG' => $images['linkdb_icon_delpost'], )); } *************** *** 548,558 **** $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( pa_this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id ) ), ! 'REPLY_IMG' => $images['pa_comment_post'], )); } $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( pa_this_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) --- 542,552 ---- $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( $linkdb->this_mxurl( 'action=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id ) ), ! 'REPLY_IMG' => $images['linkdb_comment_post'], )); } $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( $linkdb->this_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** functions_linkdb.php 4 Jul 2006 18:00:33 -0000 1.12 --- functions_linkdb.php 5 Jul 2006 22:49:20 -0000 1.13 *************** *** 14,20 **** } ! // ! // public linkdb class ! // class linkdb_public extends linkdb { --- 14,21 ---- } [...981 lines suppressed...] - global $lang; - - $this->auth_can_list = '<br />' . ( ( $this->auth_user[$cat_id]['auth_upload'] ) ? $lang['PA_Rules_upload_can'] : $lang['PA_Rules_upload_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_view_file'] ) ? $lang['PA_Rules_view_file_can'] : $lang['PA_Rules_view_file_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_edit_file'] ) ? $lang['PA_Rules_edit_file_can'] : $lang['PA_Rules_edit_file_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_delete_file'] ) ? $lang['PA_Rules_delete_file_can'] : $lang['PA_Rules_delete_file_cannot'] ) . '<br />'; - $this->auth_can_list .= ( ( $this->comments[$cat_id]['activated'] ? ( ( $this->auth_user[$cat_id]['auth_view_comment'] ? $lang['PA_Rules_view_comment_can'] : $lang['PA_Rules_view_comment_cannot'] ) . '<br />') : '')); - $this->auth_can_list .= ( ( $this->comments[$cat_id]['activated'] ? ( ( $this->auth_user[$cat_id]['auth_post_comment'] ? $lang['PA_Rules_post_comment_can'] : $lang['PA_Rules_post_comment_cannot'] ) . '<br />') : '')); - $this->auth_can_list .= ( ( $this->ratings[$cat_id]['activated'] ? ( ( $this->auth_user[$cat_id]['auth_rate'] ? $lang['PA_Rules_rate_can'] : $lang['PA_Rules_rate_cannot'] ) . '<br />') : '')); - $this->auth_can_list .= ( ( $this->auth_user[$cat_id]['auth_download'] ) ? $lang['PA_Rules_download_can'] : $lang['PA_Rules_download_cannot'] ) . '<br />'; - - if ( $this->auth_user[$cat_id]['auth_mod'] ) - { - $this->auth_can_list .= $lang['PA_Rules_moderate_can']; - } - } } ?> \ No newline at end of file --- 2050,2053 ---- |