From b5ca2baa37553b3e8163a1d04e7286a6771e601b Mon Sep 17 00:00:00 2001 From: aragonc Date: Wed, 22 Oct 2014 18:16:27 -0500 Subject: [PATCH] Restructuring HTML paragraph edit , reply, and new forum --- main/css/base.css | 8 +++++--- main/forum/editpost.php | 21 +++++++++++++-------- main/forum/forumfunction.inc.php | 5 +++-- main/forum/newthread.php | 5 +++++ main/forum/reply.php | 15 +++++++++++---- 5 files changed, 37 insertions(+), 17 deletions(-) diff --git a/main/css/base.css b/main/css/base.css index fd5cfcbeb0..b103b9c137 100755 --- a/main/css/base.css +++ b/main/css/base.css @@ -3898,14 +3898,16 @@ a.forum_group_link { .forum_description { color: #000; font-weight: normal; - font-size: 11px; + font-size: 15px; + padding-top: 1em; + padding-bottom: .5em; } .forum_description p{ font-size: 11px; } -.forum_title { +.forum_title h1{ color: #000; - font-size: 14px; + padding-top: 1em; } .forum_low_description { color: #737780; diff --git a/main/forum/editpost.php b/main/forum/editpost.php index ccc3f79e37..cf455e77da 100755 --- a/main/forum/editpost.php +++ b/main/forum/editpost.php @@ -184,19 +184,22 @@ if ($origin != 'learnpath') { /* Display Forum Category and the Forum information */ -echo ""; -// The forum category -echo ""; -echo ""; -echo '
"; -echo ''.prepare4display($current_forum['forum_title']).'
'; -echo ''.prepare4display($current_forum['forum_comment']).''; -echo "
'; +/*New display forum div*/ + echo '
'; + echo '
'; + echo '
'; + echo '

'.prepare4display($current_forum['forum_title']).'

'; + echo '

'.prepare4display($current_forum['forum_comment']).'

'; + echo '
'; +/* End new display forum */ // Set forum attachment data into $_SESSION getAttachedFiles($current_forum['forum_id'], $current_thread['thread_id'], $current_post['post_id']); // The form for the reply +echo '
'; +echo '
'; $values = show_edit_post_form($forum_setting, $current_post, $current_thread, $current_forum, isset($_SESSION['formelements']) ? $_SESSION['formelements'] : ''); +echo '
'; if (!empty($values) and isset($_POST['SubmitPost'])) { store_edit_post($values); @@ -219,8 +222,10 @@ if (!empty($values) and isset($_POST['SubmitPost'])) { } } else { // Only show Forum attachment ajax form when do not pass form submit + echo '
'; $attachmentAjaxForm = getAttachmentAjaxForm($current_forum['forum_id'], $current_thread['thread_id'], $current_post['post_id']); echo $attachmentAjaxForm; + echo '
'; } // Footer diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php index d5bb3b3f69..f68c31a39a 100755 --- a/main/forum/forumfunction.inc.php +++ b/main/forum/forumfunction.inc.php @@ -65,6 +65,7 @@ $(function () { uploadTable: $('.files'), downloadTable: $('.files'), buildUploadRow: function (files, index) { + advanced_parameters(); return $('' + files[index].name + '<\/td>' + '
<\/div><\/td>' + '' + @@ -2439,11 +2440,11 @@ function show_add_post_form($current_forum, $forum_setting, $action = '', $id = $form->addElement('hidden', 'sec_token'); $form->setConstants(array('sec_token' => $token)); - $iframe = null; + /*$iframe = null; $myThread = Security::remove_XSS($myThread); if ($forum_setting['show_thread_iframe_on_reply'] && $action != 'newthread' && !empty($myThread)) { $iframe = ""; - } + }*/ if (!empty($iframe)) { $form->addElement('label', get_lang('Thread'), $iframe); diff --git a/main/forum/newthread.php b/main/forum/newthread.php index 3cd3c4f5a6..9c03e2510b 100755 --- a/main/forum/newthread.php +++ b/main/forum/newthread.php @@ -159,15 +159,20 @@ echo ''; +echo '
'; getAttachedFiles($current_forum['forum_id'], 0, 0); $values = show_add_post_form($current_forum, $forum_setting, 'newthread', '', isset($_SESSION['formelements']) ? $_SESSION['formelements'] : null); +echo '
'; if (!empty($values) && isset($values['SubmitPost'])) { // Add new thread in table forum_thread. store_thread($current_forum, $values); } else { // Only show Forum attachment ajax form when do not pass form submit + echo '
'; $attachmentAjaxForm = getAttachmentAjaxForm($current_forum['forum_id'], $current_thread['thread_id'], 0); echo $attachmentAjaxForm; + echo '
'; } /* FOOTER */ diff --git a/main/forum/reply.php b/main/forum/reply.php index fad417c63a..3dc7979b9a 100755 --- a/main/forum/reply.php +++ b/main/forum/reply.php @@ -149,14 +149,21 @@ if ($origin != 'learnpath') { } else { echo '
 
'; } - +/*New display forum div*/ +echo '
'; +echo '
'; +echo '
'; +echo '

'.prepare4display($current_forum['forum_title']).'

'; +echo '

'.prepare4display($current_forum['forum_comment']).'

'; +echo '
'; +/* End new display forum */ // The form for the reply $my_action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : ''; $my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : ''; $my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : ''; - -$values = show_add_post_form($current_forum, $forum_setting, $my_action, $my_post, $my_elements); - +echo '
'; + $values = show_add_post_form($current_forum, $forum_setting, $my_action, $my_post, $my_elements); +echo '
'; if (!empty($values) AND isset($_POST['SubmitPost'])) { $result = store_reply($current_forum, $values); //@todo split the show_add_post_form function