mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-20 17:37:23 +08:00
show/hide original mediaInfo
This commit is contained in:
+11
-3
@@ -281,7 +281,7 @@ function formatSpoiler($content, $title = '', $defaultCollapsed = true): string
|
||||
$contentClass .= " collapse";
|
||||
}
|
||||
$HTML = sprintf(
|
||||
'<div><div><div class="spoiler-title" title="%s">%s</div></div><div class="%s"><pre>%s</pre></div></div>',
|
||||
'<div><div class="spoiler-title-box"><div class="spoiler-title" title="%s">%s</div></div><div class="%s">%s</div></div>',
|
||||
$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'), '<img class="listicon listitem" src="pic/trans.gif" alt="list" />', '<b>', '</b>', '<i>', '</i>', '<u>', '</u>', '<pre>', '</pre>', '</span>', '</font>', '</font>', ' ');
|
||||
$s = str_replace($originalBbTagArray, $replaceXhtmlTagArray, $s);
|
||||
@@ -2484,6 +2491,7 @@ $cssupdatedate=($cssupdatedate ? "?".htmlspecialchars($cssupdatedate) : "");
|
||||
<link rel="stylesheet" href="<?php echo $css_uri."theme.css".$cssupdatedate?>" type="text/css" />
|
||||
<link rel="stylesheet" href="<?php echo $css_uri."DomTT.css".$cssupdatedate?>" type="text/css" />
|
||||
<link rel="stylesheet" href="styles/curtain_imageresizer.css<?php echo $cssupdatedate?>" type="text/css" />
|
||||
<link rel="stylesheet" href="styles/nexus.css<?php echo $cssupdatedate?>" type="text/css" />
|
||||
<?php
|
||||
if ($CURUSER){
|
||||
// $caticonrow = get_category_icon_row($CURUSER['caticon']);
|
||||
|
||||
@@ -163,21 +163,27 @@ class TechnicalInformation
|
||||
$subtitles = $this->getSubtitles();
|
||||
// dd($videos, $audios, $subtitles);
|
||||
if (empty($videos) && empty($audios) && empty($subtitles)) {
|
||||
// return '';
|
||||
return sprintf('<div style="padding: 0 0.5rem"><pre>%s</pre></div>', $this->mediaInfo);
|
||||
return sprintf('<div class="nexus-media-info-raw"><pre>%s</pre></div>', $this->mediaInfo);
|
||||
}
|
||||
|
||||
$result = '<table style="border: none;width: 100%"><tbody><tr>';
|
||||
$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 .= '</tr></tbody></table>';
|
||||
$result .= '</tr>';
|
||||
$rawMediaInfo = sprintf('[spoiler=%s][raw]<pre>%s</pre>[/raw][/spoiler]', nexus_trans('torrent.show_hide_media_info'), $this->mediaInfo);
|
||||
$result .= sprintf('<tr><td colspan="%s" class="nexus-media-info-raw">%s</td></tr>', $cols, format_comment($rawMediaInfo, false));
|
||||
$result .= '</tbody></table>';
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -189,7 +195,8 @@ class TechnicalInformation
|
||||
$table .= sprintf('<td style="border: none; padding-right: 5px;padding-bottom: 5px;"><b>%s: </b>%s</td>', $key, $value);
|
||||
$table .= '</tr>';
|
||||
}
|
||||
$table .= '</tbody></table>';
|
||||
$table .= '</tbody>';
|
||||
$table .= '</table>';
|
||||
return sprintf('<td style="border: none; padding-right: 5px;padding-bottom: 5px">%s</td>', $table);
|
||||
}
|
||||
|
||||
|
||||
Vendored
+62
@@ -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;
|
||||
}
|
||||
Vendored
-56
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,4 +75,5 @@ return [
|
||||
'deny_comment_show' => 'Denied, reason: :reason',
|
||||
'logs_label' => 'Approval logs'
|
||||
],
|
||||
'show_hide_media_info' => 'Show/Hide raw MediaInfo',
|
||||
];
|
||||
|
||||
@@ -75,4 +75,5 @@ return [
|
||||
'deny_comment_show' => '审核不通过,原因::reason',
|
||||
'logs_label' => '审核记录',
|
||||
],
|
||||
'show_hide_media_info' => '显示/隐藏原始 MediaInfo',
|
||||
];
|
||||
|
||||
@@ -75,4 +75,5 @@ return [
|
||||
'deny_comment_show' => '審核不通過,原因::reason',
|
||||
'logs_label' => '審核記錄'
|
||||
],
|
||||
'show_hide_media_info' => '顯示/隱藏原始 MediaInfo',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user