ADD подсказка по разметке на экране создания статьи; замена спецсимволов, которые ещё не вырезались как тег
This commit is contained in:
parent
cb0d6c614f
commit
e034a2819b
|
|
@ -55,7 +55,7 @@ class ArticlesController extends Controller
|
||||||
App::error404();
|
App::error404();
|
||||||
}
|
}
|
||||||
|
|
||||||
App::setConfig('title', $article->title . ' - wikipoints.ru');
|
App::setConfig('title', $article->title . ' :: Статьи на wikipoints.ru');
|
||||||
|
|
||||||
self::render('articles/edit.php', array(
|
self::render('articles/edit.php', array(
|
||||||
'article' => $article,
|
'article' => $article,
|
||||||
|
|
@ -77,6 +77,7 @@ class ArticlesController extends Controller
|
||||||
$title = $_POST['title'];
|
$title = $_POST['title'];
|
||||||
$text = $_POST['text'];
|
$text = $_POST['text'];
|
||||||
$text = strip_tags($text);
|
$text = strip_tags($text);
|
||||||
|
$text = str_replace(array('<','>','"',"'",'--'), array('<','>','″','′','–'), $text);
|
||||||
$allowComments = (int) isset($_POST['allowComments']);
|
$allowComments = (int) isset($_POST['allowComments']);
|
||||||
|
|
||||||
$article = $id ? Article::model()->getByPK($id) : new Article();
|
$article = $id ? Article::model()->getByPK($id) : new Article();
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ function insertAtCursor(myField, myValue) {
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="articleText">Текст статьи</label>
|
<label for="articleText">Текст статьи</label>
|
||||||
<textarea name="text" id="articleText" class="form-control" rows="10"><?= $article->text ?></textarea>
|
<textarea name="text" id="articleText" class="form-control" rows="10"><?= $article->text ?></textarea>
|
||||||
|
<i>*текст*</i> <b>**текст**</b> <b><i>***текст***</i></b> <a href="#">http://ссылка.ру</a> # заголвок1 ## заголовк2 ### заголовк3 [#512|ссылка на точку 512]
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue