inherit
206948
0
Dec 29, 2014 14:52:20 GMT -8
tpmtamar
79
March 2014
tpmtamar
|
Post by tpmtamar on Mar 30, 2014 12:36:39 GMT -8
Forum URL: thepaleomomcommunity.com/Hello, I have created an "Introduce Yourself Here" thread that all members must post in before they can access the other categories and boards. The first post of this thread (that I created) is a list of community rules and guidelines. Is there a way to show "post #1" (my post with all the information) on the top of each page of the thread? Thank you!
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Mar 30, 2014 12:50:14 GMT -8
Hey tpmtamar, I just gave it a try to see if it was possible, and I was able to come up with an edit for the Thread template that stickys the first post to the top of each page of the thread if a staff member edits the post and types just "sticky" as the edit reason. I remembered this from when we were discussing the topic of stickying posts at the office a while back. If that's in line with what you wanted I could help you get it implemented on your forum.
|
|
inherit
206948
0
Dec 29, 2014 14:52:20 GMT -8
tpmtamar
79
March 2014
tpmtamar
|
Post by tpmtamar on Mar 30, 2014 12:54:21 GMT -8
Hey tpmtamar, I just gave it a try to see if it was possible, and I was able to come up with an edit for the Thread template that stickys the first post to the top of each page of the thread if a staff member edits the post and types just "sticky" as the edit reason. I remembered this from when we were discussing the topic of stickying posts at the office a while back. If that's in line with what you wanted I could help you get it implemented on your forum. Yes, that would be great. Thank you! Remember, I'm not an IT wiz, but I can usually follow directions pretty well.
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Mar 30, 2014 13:03:27 GMT -8
Alright, sure tpmtamar - just one thing, though, it's gotta be the first post, since the $[thread.first_post] variable I'll be using refers to it specifically. Editing other posts in the thread than the first one and adding "sticky" as a reason won't work. To do it, go to Admin > Themes > Layout Templates and click into the Thread template. In the Thread tab, look down towards the bottom of the template for the $[post_list] variable, which will be on its own line (around line 21 on an unmodified Thread template). Create a new line and paste this BEFORE the variable. {if $[thread.first_post.edited.reason] == "sticky"} <tr id="$[thread.first_post.content_id]" class="$[thread.first_post.content_class]{if $[thread.first_post.even]} even{/if}{if $[viewing_recent_posts]} recent{/if}"> <td class="$[thread.first_post.unblocked_class]"> <table role="grid"> <tr> <td class="left-panel" rowspan="2"> $[thread.first_post.created_by.miniprofile] </td> <td class="content"> <article> <div class="content-head ui-helper-clearfix"> <div class="info"> $[thread.first_post.thread] <span class="date">$[thread.first_post.created_on]</span> {if $[thread.first_post.how_posted]} <span class="post-method">via $[thread.first_post.how_posted]</span> {/if} $[thread.first_post.likes] </div> <div class="controls"> $[thread.first_post.quote_button] $[thread.first_post.edit_button] $[thread.first_post.likes.button] $[thread.first_post.select_options] </div> </div> <h3 class="title aria-hidden">Post by $[thread.first_post.created_by.name] on $[thread.first_post.created_on]</h3> <div class="message">$[thread.first_post.message]</div> </article> </td> </tr> <tr> <td class="foot"> {if $[thread.first_post.edited]} <div class="edited_by"><span class="italic">Last Edit:</span> $[thread.first_post.edited.date] by $[thread.first_post.edited.by_user]{if $[thread.first_post.edited.reason]}: $[thread.first_post.edited.reason]{/if}</div> {/if} {if $[thread.first_post.created_by.signature]} <div class="signature">$[thread.first_post.created_by.signature]</div> {/if} </td> </tr> </table> </td> {if $[thread.first_post.is_blocked]} <td class="$[thread.first_post.blocked_class] content center"> <div class="message note pad-bottom">This post is hidden</div> $[thread.first_post.display_blocked_post_button] </td> {/if} </tr> {/if}
Then, in any thread where the first post has been edited and you type in "sticky" for the edit reason, that first post will be visible on every page.
|
|