Small modification to Add new FAQ record

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
tylerclair
Posts: 3
Joined: Fri Sep 20, 2013 11:01 pm

Small modification to Add new FAQ record

Post by tylerclair » Tue Sep 24, 2013 5:00 pm

My OCD got the best of me and I wanted to change the layout of the Add new FAQ record so it was aligned with the section header. I also wanted to make some slight modifications to make it look very sharp for my co-workers and I, who will be using it. Here is a before and after picture.

Image

The first thing I modified was the /admin/record.edit.php file. I moved the opening form tag and all the hidden input fields inside of the editor span. I also changed the span class from span8 to span9. The form tag is a block level element and in Bootstrap they are set to be 100% wide. Moving it inside the main editor window div forced be as wide as editor div.

Code: Select all

<!-- main editor window -->
<div class="span9">
  <form id="faqEditor" action="?action=<?php echo $queryString; ?>" method="post">
  <input type="hidden" name="revision_id" id="revision_id" value="<?php echo $faqData['revision_id']; ?>" />
  <input type="hidden" name="record_id" id="record_id" value="<?php echo $faqData['id']; ?>" />
  <input type="hidden" name="csrf" value="<?php echo $user->getCsrfTokenFromSession(); ?>" />
  <input type="hidden" name="openQuestionId" id="openQuestionId" value="<?php echo $questionId; ?>" />
  <input type="hidden" name="notifyUser" id="notifyUser" value="<?php echo $notifyUser ?>" />
  <input type="hidden" name="notifyEmail" id="notifyEmail" value="<?php echo $notifyEmail ?>" />
This made everything flush with the header.
I made some changes to the language file by changing some of the FAQ placehoders with Article. This helps phpMyFAQ to conform to the terminology at my organization.
I changed the Question text area to a input box and added the class span12.

Code: Select all

<input type="text" name="question" id="question" class="admin-question span12" 
  placeholder="<?php echo $PMF_LANG['ad_entry_theme']; ?>"
  value="<?php echo $faqData['title'] ?>" />
I then heavily modified the TinyMCE editor to make it look more like our CMS's editor but added in some extra features.
In /admin/footer.php I changed the tinyMCE width to 100%

Code: Select all

width : "100%",
height   : "480",
I also changed the background color of the editor to white by modifying /admin/assets/css/style.css and replacing

Code: Select all

body{background:#f6f6f6}
With

Code: Select all

body{background:#ffffff}
That got me a clean look just the way I wanted it.

Many thanks to the phpMyFAQ team and their wonderful, open system.
Tyler

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests