Commit 363f4b8d authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

Small changes to topic look

parent c53d198a
...@@ -51,8 +51,9 @@ $string['deletepostsure'] = 'Are you sure you want to do this? It cannot be undo ...@@ -51,8 +51,9 @@ $string['deletepostsure'] = 'Are you sure you want to do this? It cannot be undo
$string['deletetopic'] = 'Delete topic'; $string['deletetopic'] = 'Delete topic';
$string['deletetopicvariable'] = 'Delete topic \'%s\''; $string['deletetopicvariable'] = 'Delete topic \'%s\'';
$string['deletetopicsure'] = 'Are you sure you want to do this? It cannot be undone.'; $string['deletetopicsure'] = 'Are you sure you want to do this? It cannot be undone.';
$string['edited'] = 'Edited'; $string['editedon'] = '%s on %s';
$string['editpost'] = 'Edit post'; $string['editpost'] = 'Edit post';
$string['editstothispost'] = 'Edits to this post:';
$string['edittitle'] = 'Edit forum'; $string['edittitle'] = 'Edit forum';
$string['edittopic'] = 'Edit topic'; $string['edittopic'] = 'Edit topic';
$string['forumsuccessfulsubscribe'] = 'Forum subscribed successfully'; $string['forumsuccessfulsubscribe'] = 'Forum subscribed successfully';
......
...@@ -3,19 +3,21 @@ ...@@ -3,19 +3,21 @@
{else} {else}
<h4>{$post->subject|escape}</h4> <h4>{$post->subject|escape}</h4>
<h5>{$post->poster|display_name|escape}</h5> <h5>{$post->poster|display_name|escape}</h5>
<h5>{str tag="posts" section=interaction.forum} {$post->count|escape}</h5> <h5>{str tag="postsvariable" section=interaction.forum args=$post->count}</h5>
<div><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=100&amp;id={$post->poster}" alt=""></div> <div><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=100&amp;id={$post->poster}" alt=""></div>
<p>{$post->body}</p> {$post->body}
<div>
{if $moderator || !$closed}<a href="{$WWWROOT}interaction/forum/editpost.php?parent={$post->id|escape}">{str tag="reply" section=interaction.forum}</a>{/if} {if $moderator || !$closed}<a href="{$WWWROOT}interaction/forum/editpost.php?parent={$post->id|escape}">{str tag="reply" section=interaction.forum}</a>{/if}
{if $moderator || (!$closed && $post->editor)} | {/if}
{if $moderator || $post->editor}<a href="{$WWWROOT}interaction/forum/editpost.php?id={$post->id|escape}"> {str tag="edit"}</a>{/if} {if $moderator || $post->editor}<a href="{$WWWROOT}interaction/forum/editpost.php?id={$post->id|escape}"> {str tag="edit"}</a>{/if}
{if $moderator}<a href="{$WWWROOT}interaction/forum/deletepost.php?id={$post->id|escape}"> {str tag="delete"}</a>{/if} {if $moderator} | <a href="{$WWWROOT}interaction/forum/deletepost.php?id={$post->id|escape}"> {str tag="delete"}</a>{/if}
</div>
{if $post->edit} {if $post->edit}
<p>{str tag="edited" section="interaction.forum}</p> {str tag="editstothispost" section="interaction.forum}
<ul> <ul>
{foreach from=$post->edit item=edit} {foreach from=$post->edit item=edit}
<li> <li>
{$edit.editor|display_name|escape} {$edit}
{$edit.edittime|escape}
</li> </li>
{/foreach} {/foreach}
</ul> </ul>
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
<h2>{$topic->forumtitle|escape} - {$topic->subject|escape}</h2> <h2>{$topic->forumtitle|escape} - {$topic->subject|escape}</h2>
{include file="interaction:forum:breadcrumbs.tpl" breadcrumbs=$breadcrumbs} {include file="interaction:forum:breadcrumbs.tpl" breadcrumbs=$breadcrumbs}
{if $moderator} {if $moderator}
<div>
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit"}</a> <a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit"}</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete"}</a> | <a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete"}</a>
</div>
{/if} {/if}
{if !$topic->forumsubscribed}{$topic->subscribe}{/if} {if !$topic->forumsubscribed}{$topic->subscribe}{/if}
<ul> <ul>
......
...@@ -84,6 +84,7 @@ require_once('pieforms/pieform.php'); ...@@ -84,6 +84,7 @@ require_once('pieforms/pieform.php');
if (!$topic->forumsubscribed) { if (!$topic->forumsubscribed) {
$topic->subscribe = pieform(array( $topic->subscribe = pieform(array(
'name' => 'subscribe', 'name' => 'subscribe',
'autofocus' => false,
'elements' => array( 'elements' => array(
'submit' => array( 'submit' => array(
'type' => 'submit', 'type' => 'submit',
...@@ -118,18 +119,12 @@ $count = count($posts); ...@@ -118,18 +119,12 @@ $count = count($posts);
for ($i = 0; $i < $count; $i++) { for ($i = 0; $i < $count; $i++) {
$postedits = array(); $postedits = array();
if (!empty($posts[$i]->edit)) { if (!empty($posts[$i]->edit)) {
$postedits[] = array( $postedits[] = get_string('editedon', 'interaction.forum', display_name($posts[$i]->editor), $posts[$i]->edit);
'edittime' => $posts[$i]->edit,
'editor' => $posts[$i]->editor
);
} }
$temp = $i; $temp = $i;
while (isset($posts[$i+1]) && $posts[$i+1]->id == $posts[$temp]->id) { while (isset($posts[$i+1]) && $posts[$i+1]->id == $posts[$temp]->id) {
$i++; $i++;
$postedits[] = array( $postedits[] = get_string('editedon', 'interaction.forum', display_name($posts[$i]->editor), $posts[$i]->edit);
'edittime' => $posts[$i]->edit,
'editor' => $posts[$i]->editor
);
unset($posts[$i]); unset($posts[$i]);
} }
$posts[$temp]->edit = $postedits; $posts[$temp]->edit = $postedits;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment