fully wrap post tables in <div class='post'>

[fixes #40] broken html
also! fixes profile sample posts and private messages
This commit is contained in:
Xkeeper
2018-12-11 15:09:38 -08:00
parent 4a01479bf3
commit 2e047c1c1c
5 changed files with 50 additions and 35 deletions

View File

@@ -76,3 +76,5 @@ input[type=radio] { color: black; background: white; }
} }
.imgtag { max-width: 100%; } .imgtag { max-width: 100%; }
.post { position: relative; }

View File

@@ -42,3 +42,4 @@ pre br { display: none; }
.pstspl2 {background:#000;color:#FFF;display:block;} .pstspl2 {background:#000;color:#FFF;display:block;}
.imgtag { max-width: 100%; } .imgtag { max-width: 100%; }
.post { position: relative; }

View File

@@ -218,8 +218,8 @@ $tblend
$tblend $tblend
<br>$tblstart <br>$tblstart
$tccellh colspan=2><center>Sample post<tr> $tccellh colspan=2><center>Sample post<tr>
". threadpost($user, 1) ."
$tblend $tblend
". threadpost($user, 1) ."
<br>$tblstart <br>$tblstart
$tccellhs colspan=2><center>Options<tr> $tccellhs colspan=2><center>Options<tr>
$tccell2s colspan=2> $tccell2s colspan=2>

View File

@@ -50,6 +50,6 @@
if ($isadmin) if ($isadmin)
$ip = (($quote) ? ' | ' : '') . "IP: <a href=ipsearch.php?ip=$msg[ip]>$msg[ip]</a>"; $ip = (($quote) ? ' | ' : '') . "IP: <a href=ipsearch.php?ip=$msg[ip]>$msg[ip]</a>";
print $header.$top.$tblstart.threadpost($post,1).$tblend.$top.$footer; print $header.$top.threadpost($post,1).$top.$footer;
printtimedif($startingtime); printtimedif($startingtime);
?> ?>

View File

@@ -93,7 +93,7 @@
} }
$numdir = $numdir_; $numdir = $numdir_;
return " return "<div class='post'>
$tblstart $tblstart
$set[tdbg] rowspan=2 style='padding: 5px 1px 5px 1px;'> $set[tdbg] rowspan=2 style='padding: 5px 1px 5px 1px;'>
<center>$set[userlink]$smallfont<br> <center>$set[userlink]$smallfont<br>
@@ -110,7 +110,8 @@
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td> $set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>
$tblend"; $tblend
</div>";
} }
// Inu's sidebar // Inu's sidebar
@@ -208,7 +209,8 @@
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg]{$dstyle} height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td> $set[tdbg]{$dstyle} height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>
$tblend"; $tblend
</div>";
} }
// End Inu's sidebar // End Inu's sidebar
@@ -231,13 +233,14 @@
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style='background: #000;' height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td> $set[tdbg] style='background: #000;' height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>
$tblend"; $tblend
</div>";
} }
// Default layout // Default layout
if (!(in_array($post['uid'], $sidebars) && !$x_hacks['host']) || $loguser['viewsig'] == 0) { if (!(in_array($post['uid'], $sidebars) && !$x_hacks['host']) || $loguser['viewsig'] == 0) {
return " return "
<div style='position:relative'> <div class='post'>
$tblstart $tblstart
$set[tdbg] rowspan=2> $set[tdbg] rowspan=2>
$set[userlink]$smallfont<br> $set[userlink]$smallfont<br>
@@ -275,7 +278,7 @@
} }
//". str_replace('valign=top', 'valign=top', $set[tdbg]) ." //". str_replace('valign=top', 'valign=top', $set[tdbg]) ."
return "<table width=100% cellpadding=0 cellspacing=0 style=\"background: #004c5a; background-position: top right; background-repeat: repeat-x; border: 1px solid #000;\"> return "<div class='post'><table width=100% cellpadding=0 cellspacing=0 style=\"background: #004c5a; background-position: top right; background-repeat: repeat-x; border: 1px solid #000;\">
<tr> <tr>
<td rowspan=2 valign=top align=center style=\"font-size: 12px; color: #fff; font-family: Verdana, sans-serif; border-right: 3px double #000; background: #004c5a;\"> <td rowspan=2 valign=top align=center style=\"font-size: 12px; color: #fff; font-family: Verdana, sans-serif; border-right: 3px double #000; background: #004c5a;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
@@ -292,7 +295,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
<td valign='top' id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend <td valign='top' id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "3" && !$x_hacks['host']) { } elseif ($post['uid'] == "3" && !$x_hacks['host']) {
$lastactivity = 'Active </font>' .timeunits(ctime()-$post[lastactivity]) .'<font color=#bb0000> ago'; $lastactivity = 'Active </font>' .timeunits(ctime()-$post[lastactivity]) .'<font color=#bb0000> ago';
@@ -302,7 +305,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: #000; font-size: 12px; color: #f00; font-family: Verdana, sans-serif;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: #000; font-size: 12px; color: #f00; font-family: Verdana, sans-serif;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
$smallfont $smallfont
@@ -317,7 +320,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
// ************************************************************ // ************************************************************
@@ -337,7 +340,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
$smallfont $smallfont
@@ -353,7 +356,7 @@
<td style='color: $fcol1;'>Posted on $postdate$threadlink$post[edited]</td> <td style='color: $fcol1;'>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
@@ -378,7 +381,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3". ($post['posts'] >= 20000 ? " url('http://www.ffalexandria.com/orlandu/anya/side_bg.jpg'); background-position:bottom left" : "") ."; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3". ($post['posts'] >= 20000 ? " url('http://www.ffalexandria.com/orlandu/anya/side_bg.jpg'); background-position:bottom left" : "") ."; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
<br>$smallfont <br>$smallfont
@@ -393,7 +396,7 @@
<td style='color: $fcol1;'>Posted on $postdate$threadlink$post[edited]</td> <td style='color: $fcol1;'>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
return " return "
@@ -414,7 +417,8 @@
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td> $set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>
$tblend"; $tblend
</div>";
// ************************************************************ // ************************************************************
// SAKURA HIRYUU // SAKURA HIRYUU
@@ -433,7 +437,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
$smallfont $smallfont
@@ -449,7 +453,7 @@
<td style=\"color: $fcol1;\">Posted on $postdate$threadlink$post[edited]</td> <td style=\"color: $fcol1;\">Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
@@ -481,7 +485,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
$smallfont $smallfont
@@ -497,7 +501,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "19" && !$x_hacks['host']) { } elseif ($post['uid'] == "19" && !$x_hacks['host']) {
@@ -512,7 +516,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
$smallfont $smallfont
@@ -530,7 +534,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "4" && !$x_hacks['host']) { } elseif ($post['uid'] == "4" && !$x_hacks['host']) {
@@ -545,7 +549,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\">
&mdash; $set[userlink] &mdash; &mdash; $set[userlink] &mdash;
$smallfont $smallfont
@@ -562,7 +566,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
} elseif ($post['uid'] == "387" && !$x_hacks['host']) { } elseif ($post['uid'] == "387" && !$x_hacks['host']) {
@@ -576,7 +580,7 @@
$postnum = ''; $postnum = '';
$postss = "s:"; $postss = "s:";
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('\' valign=top', ' a1\' valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> ". str_replace('\' valign=top', ' a1\' valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\">
$css $css
<div class=a2> <div class=a2>
@@ -593,7 +597,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
@@ -602,7 +606,7 @@
$fcol2 = "#555555"; $fcol2 = "#555555";
$fcol3 = "#181818"; $fcol3 = "#181818";
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 14px; color: $fcol1; font-family: Verdana, sans-serif; padding-top: .5em;\"> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 14px; color: $fcol1; font-family: Verdana, sans-serif; padding-top: .5em;\">
$set[userlink] $set[userlink]
<br><span style=\"letter-spacing: 0px; color: $fcol2; font-size: 10px;\">Collection of nobodies</span> <br><span style=\"letter-spacing: 0px; color: $fcol2; font-size: 10px;\">Collection of nobodies</span>
@@ -613,7 +617,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"background: $fcol3; padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"background: $fcol3; padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
@@ -675,7 +679,7 @@
} }
return "$tblstart return "<div class='post'>$tblstart
". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 width=200> ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 width=200>
<table style=\"font-family: Tahoma; font-size: 12px; color: #000; background: #e1cfb6;\" width=100% cellspacing=0> <table style=\"font-family: Tahoma; font-size: 12px; color: #000; background: #e1cfb6;\" width=100% cellspacing=0>
<tr> <tr>
@@ -725,7 +729,7 @@
<td>Posted on $postdate$threadlink$post[edited]</td> <td>Posted on $postdate$threadlink$post[edited]</td>
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend $set[tdbg] style=\"padding: 0;\" id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>$tblend</div>
"; ";
/* /*
<!-- <!--
@@ -740,8 +744,15 @@
elseif ($post['uid'] == 1090 && !$x_hacks['host']) { elseif ($post['uid'] == 1090 && !$x_hacks['host']) {
$brltype = "catgirlredux2011"; $brltype = "catgirlredux2011";
$brsidebar = " static $brembedcss = false;
<link rel=\"stylesheet\" type=\"text/css\" href=\"http://lain.rustedlogic.net/layouts/css/_br_sidebar.css\" /> $brsidebar = "";
if (!$brembedcss) {
$brsidebar .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://lain.rustedlogic.net/layouts/css/_br_sidebar.css\" />";
$brembedcss = true;
}
$brsidebar .= "
<div class='post'>
$tblstart $tblstart
$set[tdbg] rowspan=2> $set[tdbg] rowspan=2>
<div class=\"brsidebar lain-sidebar-$brltype\"> <div class=\"brsidebar lain-sidebar-$brltype\">
@@ -757,7 +768,7 @@
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td> $set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>
$tblend"; $tblend</div>";
return $brsidebar; return $brsidebar;
} }
@@ -766,6 +777,7 @@
// (Adelheid uses this) // (Adelheid uses this)
else { else {
return " return "
<div class='post'>
$tblstart $tblstart
$set[tdbg] rowspan=2> $set[tdbg] rowspan=2>
$set[userlink]$smallfont<br> $set[userlink]$smallfont<br>
@@ -778,7 +790,7 @@
<td width=255><nobr>$quote$edit$ip <td width=255><nobr>$quote$edit$ip
</table><tr> </table><tr>
$set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td> $set[tdbg] height=220 id=\"post". $post['id'] ."\">$post[headtext]$post[text]$post[signtext]</td>
$tblend"; $tblend</div>";
} }
} }