Post by HotRod Richard on Apr 8, 2018 14:33:30 GMT -5
To make the first post stick to the top of the page on all pages in a thread, which is enabled in this group, after you post your thread or create your thread, click the Edit button and in the reason box found at the bottom of the editable post, type the word sticky in all lower case, it will not work if you use an upper case S or Sticky, type sticky in the box and click the Save Changes button.
I have used a Spoiler in this thread because the code is very long as you will see when you click on "Click to Show"
The code in the spoiler goes:
Admin > Themes > Layout Templates click on the "Thread" link, click the "Post List" tab and replace all the code with the code in the spoiler. This code does happen to have the "Edit Post" disabled so if you want to reenable your edit post you will need to remove the <!-- and --> found in 2 places in this code
{foreach $[post]}
{if $[post.thread.first_post.edited.reason] == "sticky"}
{if $[post.index] == 0}
<tr id="$[post.thread.first_post.content_id]" class="$[post.thread.first_post.content_class]{if $[post.thread.first_post.even]} even{/if}{if $[viewing_recent_posts]} recent{/if} first-post">
<td class="$[post.thread.first_post.unblocked_class]">
<table role="grid">
<tr>
<td class="left-panel" rowspan="2">
$[post.thread.first_post.created_by.miniprofile]
</td>
<td class="content">
<article>
<div class="content-head ui-helper-clearfix">
<div class="info">
$[post.thread.first_post.thread]
<span class="date">$[post.thread.first_post.created_on]</span>
{if $[post.thread.first_post.how_posted]}
<span class="post-method">via $[post.thread.first_post.how_posted]</span>
{/if}
$[post.thread.first_post.likes]
$[post.edited.reason]
</div>
<div class="controls">
$[post.thread.first_post.quote_button]
$[post.thread.first_post.edit_button]
$[post.thread.first_post.likes.button]
$[post.thread.first_post.select_options]
</div>
</div>
<h3 class="title aria-hidden">Post by $[post.thread.first_post.created_by.name] on $[post.thread.first_post.created_on]</h3>
<div class="message">$[post.thread.first_post.message]</div>
</article>
</td>
</tr>
<tr>
<td class="foot">
<!-- {if $[post.thread.first_post.edited]}
<div class="edited_by"><span class="italic">Last Edit:</span> $[post.thread.first_post.edited.date] by $[post.thread.first_post.edited.by_user]{if $[post.thread.first_post.edited.reason]}: $[post.thread.first_post.edited.reason]{/if}</div>
{/if} -->
{if $[post.thread.first_post.created_by.signature]}
<div class="signature">$[post.thread.first_post.created_by.signature]</div>
{/if}
</td>
</tr>
</table>
</td>
{if $[post.thread.first_post.is_blocked]}
<td class="$[post.thread.first_post.blocked_class] content center">
<div class="message note pad-bottom">This post is hidden</div>
$[post.thread.first_post.display_blocked_post_button]
</td>
{/if}
</tr>
{/if}
{/if}
{/foreach}
{foreach $[post]}
{if $[post.edited.reason] != "sticky"}
<tr id="$[post.content_id]" class="$[post.content_class]{if $[post.even]} even{/if}{if $[viewing_recent_posts]} recent{/if}">
<td class="$[post.unblocked_class]">
<table role="grid">
<tr>
<td class="left-panel" rowspan="2">
$[post.created_by.miniprofile]
</td>
<td class="content">
<article>
<div class="content-head ui-helper-clearfix">
<div class="info">
$[post.thread]
<span class="date">$[post.created_on]</span>
{if $[post.how_posted]}
<span class="post-method">via $[post.how_posted]</span>
{/if}
$[post.likes]
</div>
<div class="controls">
$[post.quote_button]
$[post.edit_button]
$[post.likes.button]
$[post.select_options]
</div>
</div>
<h3 class="title aria-hidden">Post by $[post.created_by.name] on $[post.created_on]</h3>
<div class="message">$[post.message]</div>
</article>
</td>
</tr>
<tr>
<td class="foot">
<!-- {if $[post.edited]}
<div class="edited_by"><span class="italic">Last Edit:</span> $[post.edited.date] by $[post.edited.by_user]{if $[post.edited.reason]}: $[post.edited.reason]{/if}</div>
{/if} -->
{if $[post.created_by.signature]}
<div class="signature">$[post.created_by.signature]</div>
{/if}
</td>
</tr>
</table>
</td>
{if $[post.is_blocked]}
<td class="$[post.blocked_class] content center">
<div class="message note pad-bottom">This post is hidden</div>
$[post.display_blocked_post_button]
</td>
{/if}
</tr>
{/if}
{/foreach}
{if !$[post]}
<tr class="last"><td class="last center" colspan="1">No posts were found.</td></tr>
{/if}
I hope this is helpful for you, let us know