fix formatCode()

This commit is contained in:
xiaomlove
2025-04-21 20:20:16 +07:00
parent 8a9a478d51
commit 92530e2c79
4 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -229,8 +229,8 @@ function formatUrl($url, $newWindow = false, $text = '', $linkClass = '') {
return addTempCode("<a".($linkClass ? " class=\"$linkClass\"" : '')." href=\"$url\"" . ($newWindow==true? " target=\"_blank\"" : "").">$text</a>"); return addTempCode("<a".($linkClass ? " class=\"$linkClass\"" : '')." href=\"$url\"" . ($newWindow==true? " target=\"_blank\"" : "").">$text</a>");
} }
function formatCode($text) { function formatCode($text) {
global $lang_functions; $textCode = nexus_trans("label.text_code");
return addTempCode("<br /><div class=\"codetop\">".$lang_functions['text_code']."</div><div class=\"codemain\"><pre><code>$text</code></pre></div><br />"); return addTempCode("<br /><div class=\"codetop\">".$textCode."</div><div class=\"codemain\"><pre><code>$text</code></pre></div><br />");
} }
function formatImg($src, $enableImageResizer, $image_max_width, $image_max_height, $imgId = "") { function formatImg($src, $enableImageResizer, $image_max_width, $image_max_height, $imgId = "") {
+1
View File
@@ -45,6 +45,7 @@ return [
'created_at_begin' => 'Created at begin', 'created_at_begin' => 'Created at begin',
'created_at_end' => 'Created at end', 'created_at_end' => 'Created at end',
'text_quote' => 'Quote', 'text_quote' => 'Quote',
'text_code' => "CODE",
'setting' => [ 'setting' => [
'nav_text' => 'Setting', 'nav_text' => 'Setting',
'backup' => [ 'backup' => [
+1
View File
@@ -45,6 +45,7 @@ return [
'created_at_begin' => '创建时间开始', 'created_at_begin' => '创建时间开始',
'created_at_end' => '创建时间结束', 'created_at_end' => '创建时间结束',
'text_quote' => '引用', 'text_quote' => '引用',
'text_code' => "代码",
'setting' => [ 'setting' => [
'nav_text' => '设置', 'nav_text' => '设置',
'backup' => [ 'backup' => [
+1
View File
@@ -45,6 +45,7 @@ return [
'created_at_begin' => '創建時間開始', 'created_at_begin' => '創建時間開始',
'created_at_end' => '創建時間結束', 'created_at_end' => '創建時間結束',
'text_quote' => '引用', 'text_quote' => '引用',
'text_code' => "代碼",
'setting' => [ 'setting' => [
'nav_text' => '設置', 'nav_text' => '設置',
'backup' => [ 'backup' => [