|
From: Jon O. <jon...@us...> - 2008-01-28 21:57:14
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18253/pafiledb/modules Modified Files: pa_post_comment.php pa_quickdl.php Log Message: general updates... tinymce support updated Index: pa_quickdl.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_quickdl.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pa_quickdl.php 9 Sep 2007 20:16:19 -0000 1.14 --- pa_quickdl.php 28 Jan 2008 21:57:10 -0000 1.15 *************** *** 158,162 **** if ( $pa_cat_id != $pafiledb_quickdl['pa_quick_cat'] ) { ! $quickdl_back = '« '; } --- 158,162 ---- if ( $pa_cat_id != $pafiledb_quickdl['pa_quick_cat'] ) { ! $quickdl_back = $lang['Quickdl_back']; } Index: pa_post_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_post_comment.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** pa_post_comment.php 9 Sep 2007 20:16:19 -0000 1.22 --- pa_post_comment.php 28 Jan 2008 21:57:10 -0000 1.23 *************** *** 30,33 **** --- 30,34 ---- global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; + global $mx_block, $theme; // *************** *** 124,134 **** // ! // Toggles // ! $html_on = ( $pafiledb_config['allow_comment_html'] ) ? true : 0; ! $bbcode_on = ( $pafiledb_config['allow_comment_bbcode'] ) ? true : 0; ! $smilies_on = ( $pafiledb_config['allow_comment_smilies'] ) ? true : 0; ! $links_on = ( $pafiledb_config['allow_comment_links'] ) ? true : 0; ! $images_on = ( $pafiledb_config['allow_comment_images'] ) ? true : 0; // --- 125,180 ---- // ! // wysiwyg // ! if ( $pafiledb_config['allow_comment_wysiwyg'] && file_exists( $mx_root_path . $pafiledb_config['wysiwyg_path'] . 'tinymce/jscripts/tiny_mce/blank.htm' )) ! { ! // ! // Toggles ! // ! $allow_wysiwyg = true; ! $bbcode_on = false; ! $html_on = true; ! $smilies_on = false; ! $links_on = false; ! $images_on = false; ! ! $langcode = mx_get_langcode(); ! ! if ($mx_block->auth_mod) ! { ! $template->assign_block_vars( "tinyMCE_admin", array( ! 'PATH' => $mx_root_path, ! 'LANG' => !empty($langcode) ? $langcode : $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'], ! 'TEMPLATE' => $mx_root_path . 'templates/'. $theme['template_name'] . '/' . $theme['head_stylesheet'] ! )); ! } ! else ! { ! $template->assign_block_vars( "tinyMCE", array( ! 'PATH' => $mx_root_path, ! 'LANG' => !empty($langcode) ? $langcode : $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'], ! 'TEMPLATE' => $mx_root_path . 'templates/'. $theme['template_name'] . '/' . $theme['head_stylesheet'] ! )); ! } ! } ! else ! { ! // ! // Toggles ! // ! $allow_wysiwyg = false; ! $html_on = ( $pafiledb_config['allow_comment_html'] ) ? true : 0; ! $bbcode_on = ( $pafiledb_config['allow_comment_bbcode'] ) ? true : 0; ! $smilies_on = ( $pafiledb_config['allow_comment_smilies'] ) ? true : 0; ! $links_on = ( $pafiledb_config['allow_comment_links'] ) ? true : 0; ! $images_on = ( $pafiledb_config['allow_comment_images'] ) ? true : 0; ! ! $board_config['allow_html_tags'] = $pafiledb_config['allowed_comment_html_tags']; ! ! if ($smilies_on) ! { ! $pafiledb_functions->generate_smilies( 'inline', PAGE_POSTING ); ! } ! } // *************** *** 144,148 **** // Fix: Setting 'emtpy' enables all // ! //$mx_text->allow_all_html_tags = $allow_wysiwyg; // Not yet implemented for comments --- 190,194 ---- // Fix: Setting 'emtpy' enables all // ! $mx_text->allow_all_html_tags = $allow_wysiwyg; *************** *** 198,202 **** if ( $submit ) { ! $this->update_add_comment($file_data, $item_id, $cid, '', '', $html_on, $bbcode_on, $smilies_on); $message = $lang['Comment_posted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $item_id ) ) . '">', '</a>' ); --- 244,248 ---- if ( $submit ) { ! $this->update_add_comment($file_data, $item_id, $cid, '', '', $html_on, $bbcode_on, $smilies_on, $allow_wysiwyg); $message = $lang['Comment_posted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $item_id ) ) . '">', '</a>' ); *************** *** 204,212 **** } - // - // Generate smilies listing for page output - // - $pafiledb_functions->generate_smilies( 'inline', PAGE_POSTING ); - $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; $bbcode_status = ( $bbcode_on ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF']; --- 250,253 ---- *************** *** 355,358 **** --- 396,404 ---- ); + if ( $bbcode_on ) + { + $template->assign_block_vars( 'switch_bbcodes', array()); + } + // =================================================== // assign var for navigation |