diff --git a/include/functions.php b/include/functions.php index ec4fbf02..28186955 100644 --- a/include/functions.php +++ b/include/functions.php @@ -281,7 +281,7 @@ function formatSpoiler($content, $title = '', $defaultCollapsed = true): string $contentClass .= " collapse"; } $HTML = sprintf( - '
%s
%s
', + '
%s
%s
', $lang_functions['spoiler_expand_collapse'], $title, $contentClass, $content ); return addTempCode($HTML); @@ -312,8 +312,6 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab = if ($strip_html) { $s = htmlspecialchars($s); } - // Linebreaks - $s = nl2br($s); if (strpos($s,"[code]") !== false && strpos($s,"[/code]") !== false) { // $s = preg_replace("/\[code\](.+?)\[\/code\]/eis","formatCode('\\1')", $s); @@ -322,6 +320,15 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab = }, $s); } + if (strpos($s,"[raw]") !== false && strpos($s,"[/raw]") !== false) { + $s = preg_replace_callback("/\[raw\](.+?)\[\/raw\]/is",function ($matches) { + return addTempCode($matches[1]); + }, $s); + } + + // Linebreaks + $s = nl2br($s); + $originalBbTagArray = array('[siteurl]', '[site]','[*]', '[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', '[pre]', '[/pre]', '[/color]', '[/font]', '[/size]', " "); $replaceXhtmlTagArray = array(get_protocol_prefix().get_setting('basic.BASEURL'), get_setting('basic.SITENAME'), 'list', '', '', '', '', '', '', '
', '
', '', '', '', '  '); $s = str_replace($originalBbTagArray, $replaceXhtmlTagArray, $s); @@ -2484,6 +2491,7 @@ $cssupdatedate=($cssupdatedate ? "?".htmlspecialchars($cssupdatedate) : ""); " type="text/css" /> " type="text/css" /> + getSubtitles(); // dd($videos, $audios, $subtitles); if (empty($videos) && empty($audios) && empty($subtitles)) { -// return ''; - return sprintf('
%s
', $this->mediaInfo); + return sprintf('
%s
', $this->mediaInfo); } $result = ''; + $cols = 0; if (!empty($videos)) { + $cols++; $result .= $this->buildTdTable($videos); } if (!empty($audios)) { + $cols++; $result .= $this->buildTdTable($audios); } if (!empty($subtitles)) { + $cols++; $result .= $this->buildTdTable($subtitles); } - $result .= '
'; + $result .= ''; + $rawMediaInfo = sprintf('[spoiler=%s][raw]
%s
[/raw][/spoiler]', nexus_trans('torrent.show_hide_media_info'), $this->mediaInfo); + $result .= sprintf('%s', $cols, format_comment($rawMediaInfo, false)); + $result .= ''; return $result; } @@ -189,7 +195,8 @@ class TechnicalInformation $table .= sprintf('%s: %s', $key, $value); $table .= ''; } - $table .= ''; + $table .= ''; + $table .= ''; return sprintf('%s', $table); } diff --git a/public/styles/nexus.css b/public/styles/nexus.css new file mode 100644 index 00000000..fb9ec30c --- /dev/null +++ b/public/styles/nexus.css @@ -0,0 +1,62 @@ +img.hitandrun { + width: 35px; + height: 12px; + background: url(icons.gif) no-repeat -100px -171px; + margin-left: 0.5em; +} +.spoiler-title { + line-height: 28px; + color: #4d6c99; + cursor: pointer; + font-weight: 700; + background-color: rgba(77, 108, 153, 0.1); + display: inline-block; + padding: 0 10px; +} +.spoiler-content { + display: inline-block; + height: 0; + overflow: hidden; + transition: height 0.3s ease; +} +.layui-layer { + color: black; +} +.layer-form { + padding: 10px 15px; +} +.layer-form .form-control-row input{ + padding: 4px; +} +.layer-form .form-control-row .label{ + margin-bottom: 4px; +} +.rainbow { + text-align: center; + text-decoration: underline; + /*font-size: 32px;*/ + /*font-family: monospace;*/ + /*letter-spacing: 5px;*/ + background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff); + -webkit-background-clip: text; + background-clip: text; + color: transparent; + animation: rainbow_animation 6s ease-in-out infinite; + background-size: 400% 100%; +} + +@keyframes rainbow_animation { + 0%,100% { + background-position: 0 0; + } + + 50% { + background-position: 100% 0; + } +} +.nexus-media-info-raw { + padding: 0 0.5rem; +} +.nexus-media-info-raw .spoiler-title-box{ + text-align: center; +} diff --git a/public/styles/sprites.css b/public/styles/sprites.css index e975e89a..7e2f3ae1 100644 --- a/public/styles/sprites.css +++ b/public/styles/sprites.css @@ -474,59 +474,3 @@ img.sltbar height:10px; background:url(bar.gif) repeat-x 0 -116px; } -img.hitandrun { - width: 35px; - height: 12px; - background: url(icons.gif) no-repeat -100px -171px; - margin-left: 0.5em; -} -.spoiler-title { - line-height: 40px; - color: #4d6c99; - cursor: pointer; - font-weight: 700; - background-color: rgba(77, 108, 153, 0.1); - display: inline-block; - padding: 0 10px; -} -.spoiler-content { - display: inline-block; - height: 0; - overflow: hidden; - transition: height 0.3s ease; -} -.layui-layer { - color: black; -} -.layer-form { - padding: 10px 15px; -} -.layer-form .form-control-row input{ - padding: 4px; -} -.layer-form .form-control-row .label{ - margin-bottom: 4px; -} -.rainbow { - text-align: center; - text-decoration: underline; - /*font-size: 32px;*/ - /*font-family: monospace;*/ - /*letter-spacing: 5px;*/ - background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff); - -webkit-background-clip: text; - background-clip: text; - color: transparent; - animation: rainbow_animation 6s ease-in-out infinite; - background-size: 400% 100%; -} - -@keyframes rainbow_animation { - 0%,100% { - background-position: 0 0; - } - - 50% { - background-position: 100% 0; - } -} diff --git a/resources/lang/en/torrent.php b/resources/lang/en/torrent.php index 3c52d255..907d2e0d 100644 --- a/resources/lang/en/torrent.php +++ b/resources/lang/en/torrent.php @@ -75,4 +75,5 @@ return [ 'deny_comment_show' => 'Denied, reason: :reason', 'logs_label' => 'Approval logs' ], + 'show_hide_media_info' => 'Show/Hide raw MediaInfo', ]; diff --git a/resources/lang/zh_CN/torrent.php b/resources/lang/zh_CN/torrent.php index 96ff4895..4870f6de 100644 --- a/resources/lang/zh_CN/torrent.php +++ b/resources/lang/zh_CN/torrent.php @@ -75,4 +75,5 @@ return [ 'deny_comment_show' => '审核不通过,原因::reason', 'logs_label' => '审核记录', ], + 'show_hide_media_info' => '显示/隐藏原始 MediaInfo', ]; diff --git a/resources/lang/zh_TW/torrent.php b/resources/lang/zh_TW/torrent.php index 23246c22..e2d99a49 100644 --- a/resources/lang/zh_TW/torrent.php +++ b/resources/lang/zh_TW/torrent.php @@ -75,4 +75,5 @@ return [ 'deny_comment_show' => '審核不通過,原因::reason', 'logs_label' => '審核記錄' ], + 'show_hide_media_info' => '顯示/隱藏原始 MediaInfo', ];