mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 11:16:00 +05:30
Transliterate slug option
This commit is contained in:
parent
f5c1a4812a
commit
6452fc4806
4 changed files with 29 additions and 3 deletions
|
|
@ -211,4 +211,7 @@ views.layout = "layout"
|
|||
admin.theme = "light"
|
||||
|
||||
; Fulltext search
|
||||
fulltext.search = "true"
|
||||
fulltext.search = "false"
|
||||
|
||||
; Transliterate Slug
|
||||
transliterate.slug = "true"
|
||||
|
|
@ -116,8 +116,11 @@ function is_csrf_proper($csrf_token)
|
|||
// Clean URLs
|
||||
function remove_accent($str)
|
||||
{
|
||||
if (is_null(config('transliterate.slug')) || config('transliterate.slug') !== 'false') {
|
||||
return URLify::downcode($str);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
// Add content
|
||||
function add_content($title, $tag, $url, $content, $user, $draft, $category, $type, $description = null, $media = null, $dateTime = null, $autoSave = null, $oldfile = null, $field = null)
|
||||
|
|
|
|||
|
|
@ -116,6 +116,25 @@ Please install and enable the GD extension to use the thumbnail feature.
|
|||
<p class="title-format" style="margin-bottom:5px;"><code>post</code> <?php echo i18n('post_your_post_slug');?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">Transliterate Slug</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="-config-transliterate.slug" id="transliterate.slug1" value="true" <?php if (config('transliterate.slug') === 'true'):?>checked<?php endif;?>>
|
||||
<label class="form-check-label" for="transliterate.slug1">
|
||||
<?php echo i18n('Enable');?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="-config-transliterate.slug" id="transliterate.slug2" value="false" <?php if (config('transliterate.slug') === 'false'):?>checked<?php endif;?>>
|
||||
<label class="form-check-label" for="transliterate.slug2">
|
||||
<?php echo i18n('Disable');?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h4><?php echo i18n('Metatags');?></h4>
|
||||
<hr>
|
||||
|
|
|
|||
|
|
@ -97,5 +97,6 @@
|
|||
"thumbnail.width",
|
||||
"rss.description",
|
||||
"admin.theme",
|
||||
"fulltext.search"
|
||||
"fulltext.search",
|
||||
"transliterate.slug"
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue