mirror of https://github.com/BOINC/boinc.git
Fixed reply scrolling- now centers on the input box.
svn path=/trunk/boinc/; revision=1792
This commit is contained in:
parent
101b865917
commit
e381a62c69
|
@ -21,7 +21,7 @@ $logged_in_user = get_logged_in_user(false);
|
||||||
<br><a href="index.php"><?php echo $cfg['sitename'] ?> Forum</a> -> <a href="forum.php?id=<?php echo $forum->id ?>"><?php echo $forum->title ?></a>
|
<br><a href="index.php"><?php echo $cfg['sitename'] ?> Forum</a> -> <a href="forum.php?id=<?php echo $forum->id ?>"><?php echo $forum->title ?></a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="reply.php?id=<?php echo $_GET['id'] ?>">Reply to Thread / Question</a>
|
<a href=reply.php?thread=<?php echo $thread->id ?>>Reply to this topic</a>
|
||||||
</p>
|
</p>
|
||||||
<p style="text-align:center">
|
<p style="text-align:center">
|
||||||
<table class="content" border="0" cellpadding="5" cellspacing="0" width="100%">
|
<table class="content" border="0" cellpadding="5" cellspacing="0" width="100%">
|
||||||
|
@ -29,38 +29,14 @@ $logged_in_user = get_logged_in_user(false);
|
||||||
<th style="width: 150px">Author</th>
|
<th style="width: 150px">Author</th>
|
||||||
<th>Message</th>
|
<th>Message</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!--</table>-->
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$n = 0;
|
$n = 0;
|
||||||
$posts = $thread->getPosts();
|
$posts = $thread->getPosts();
|
||||||
while ($post = getNextPost($posts)):
|
while ($post = getNextPost($posts)) {
|
||||||
$user = getUser($post->user);
|
show_post_hierarchy($post, $thread, 0);
|
||||||
$can_edit = $logged_in_user && $user->id == $logged_in_user->id;
|
}
|
||||||
?>
|
|
||||||
<tr class="row<?php echo (($n++)%2+1) ?>" style="vertical-align:top">
|
|
||||||
<td>
|
|
||||||
<p style="font-weight:bold">
|
|
||||||
<?php if ($user->has_profile) { ?>
|
|
||||||
<a href="../view_profile.php?userid=<?php echo $post->user ?>"><?php echo $user->name ?></a>
|
|
||||||
<?php } else { echo $user->name; } ?>
|
|
||||||
</p>
|
|
||||||
<p style="font-size:8pt">
|
|
||||||
Joined: <?php echo date('M j, Y', $user->create_time) ?>
|
|
||||||
<br>Posts: <?php echo $user->posts ?>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p style="font-size:8pt">
|
|
||||||
Posted: <?php echo date('D M j, Y g:i a', $post->timestamp) ?><?php if ($can_edit) echo " <a href=\"edit.php?id=$post->id\">[Edit this post]</a>" ?>
|
|
||||||
<?php if ($post->modified) echo "<br>Last Modified: ", date('D M j, Y g:i a', $post->modified) ?>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p><?php echo nl2br(stripslashes($post->content)) ?></p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
endwhile;
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
</p>
|
||||||
|
@ -68,3 +44,54 @@ $logged_in_user = get_logged_in_user(false);
|
||||||
<?php
|
<?php
|
||||||
doFooter();
|
doFooter();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function show_post_hierarchy($post, $thread, $indent) {
|
||||||
|
//$children = $post->getImmediateChildren();
|
||||||
|
|
||||||
|
show_post($post, $thread, $indent);
|
||||||
|
|
||||||
|
//while ($childPost = getNextPost($children)) {
|
||||||
|
// show_post_hierarchy($childPost, $thread, $indent+1);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_post($post, $thread, $indent) {
|
||||||
|
global $n;
|
||||||
|
$user = getUser($post->user);
|
||||||
|
$can_edit = $logged_in_user && $user->id == $logged_in_user->id;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!--<table class="content" border="0" cellpadding="5" cellspacing="0" width="100%">-->
|
||||||
|
<tr class="row<?php echo (($n++)%2+1) ?>" style="vertical-align:top">
|
||||||
|
<?php
|
||||||
|
//for ($i = 0; $i < $indent; $i++) {
|
||||||
|
// echo "<td> </td>";
|
||||||
|
//}
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<p style="font-weight:bold">
|
||||||
|
<?php if ($user->has_profile) { ?>
|
||||||
|
<a href="../view_profile.php?userid=<?php echo $post->user ?>"><?php echo $user->name ?></a>
|
||||||
|
<?php } else { echo $user->name; } ?>
|
||||||
|
</p>
|
||||||
|
<p style="font-size:8pt">
|
||||||
|
Joined: <?php echo date('M j, Y', $user->create_time) ?>
|
||||||
|
<br>Posts: <?php echo $user->posts ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p style="font-size:8pt">
|
||||||
|
Posted: <?php echo date('D M j, Y g:i a', $post->timestamp) ?><?php if ($can_edit) echo " <a href=\"edit.php?id=$post->id\">[Edit this post]</a>" ?>
|
||||||
|
<?php if ($post->modified) echo "<br>Last Modified: ", date('D M j, Y g:i a', $post->modified) ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><?php echo nl2br(stripslashes($post->content)) ?></p>
|
||||||
|
<p>[<a href="reply.php?thread=<?php echo $thread->id ?>&post=<?php echo $post->id ?>#input">Reply to this post</a>]</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!--</table>-->
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
Loading…
Reference in New Issue