osTicket: Integrare CKeditor

In primul rand descarcati ultima versiune de aici: http://ckeditor.com

1. Cautati in include/staff/header.inc.php

<link rel=\"stylesheet\" href=\"css/autosuggest_inquisitor.css\" type=\"text/css\" media=\"screen\" charset=\"utf-8\" />

si mai jos adaugati

<script type=\"text/javascript\" src=\"../ckeditor/ckeditor.js\"></script>

2. In include/staff/viewticket.inc.php, gasiti urmatorul cod:

<textarea name=\"response\" id=\"response\" cols=\"90\" rows=\"9\" wrap=\"soft\" style=\"width:90%\" class=\"response\"><?=$info['response']?></textarea>

si mai jos adaugati

<script type=\"text/javascript\">
CKEDITOR.replace( 'response' );
</script>

3. In include/staff/viewticket.inc.php, gasiti urmatorul cod:

<?=Format::display($resp_row['response'])?>

si inlocuiti cu

<?php
$doc = new DOMDocument();
$doc->loadHTML(($resp_row['response']));
echo $doc->saveHTML();
?>

4. In class.ticket.php, gasiti urmatorul cod:

$sql= 'INSERT INTO '.TICKET_RESPONSE_TABLE.' SET created=NOW() '.
',ticket_id='.db_input($this->getId()).
',msg_id='.db_input($msgid).
',response='.db_input(Format::striptags($response)).
',staff_id='.db_input($thisuser->getId()).
',staff_name='.db_input($thisuser->getName()).
',ip_address='.db_input($thisuser->getIP());
$resp_id=0;

si inlocuiti linia care incepe cu “response” cu:

',response='.db_input($response).

Adaugă un răspuns

Your email address will not be published. Required fields are marked *