inherit
250630
0
Sept 2, 2022 11:44:19 GMT -8
Emperor Martin
6
November 2017
martinwharrison
|
Post by Emperor Martin on Nov 16, 2017 6:04:56 GMT -8
My forum is partially dedicated to writing, and I'd like to give my members the option to hide their posts from guests. Is there a plugin that would allow that? I don't want to set the boards to members-only, just in case some others want their works to be more easily available.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Nov 16, 2017 8:18:06 GMT -8
My forum is partially dedicated to writing, and I'd like to give my members the option to hide their posts from guests. Is there a plugin that would allow that? I don't want to set the boards to members-only, just in case some others want their works to be more easily available. A plugin wouldn't be able to hide posts from guests. I would look to the more advanced features of proboards to see if anyone has an alternative solution.
|
|
inherit
226544
0
Oct 5, 2018 10:29:39 GMT -8
Ulises
4,881
November 2015
umacklin
Ulises Weirdo
|
Post by Ulises on Nov 17, 2017 13:59:21 GMT -8
You could also use the Post List layout template for this. Go to your admin panel and navigate to Themes > Layout Templates > Thread > Post List (tab) and replace everything in it with this:
{foreach $[post]}
{if $[post.edited.reason] != "noguests"}
<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">
<button type = "button" class = "speed-tag-button">SpeedTag!</button>
$[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} You'll notice this line: {if $[post.edited.reason] != "noguests"} meaning, yes your users will need to edit their posts and add the text "noguests" as the edit reason (without the quotes) but it is a really hacky way to do this and it won't apply to the mobile version either.
|
|
inherit
192136
0
Aug 17, 2014 8:10:36 GMT -8
?adwoman?
1,884
April 2013
adwoman
|
Post by ?adwoman? on Nov 17, 2017 14:28:51 GMT -8
|
|
#e61919
Support Staff
224482
0
1
Apr 19, 2024 14:58:17 GMT -8
Scott
23,257
August 2015
socalso
|
Post by Scott on Nov 17, 2017 14:45:41 GMT -8
This seems a little clunky and a bit of work. Ulises's solution would seem to be the better route.
|
|
inherit
262746
0
Mar 23, 2021 20:49:38 GMT -8
vui123ve
22
November 2020
vui123ve
|
Post by vui123ve on Feb 5, 2021 23:41:06 GMT -8
I replaced the codes in the Post List tab with the codes from Ulises' post, it's not working. What am I missing?
As soon as I edited the post with the reason noguests, the post disappeared even though I'm still logging in.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,775
January 2015
msg
|
Post by Lynx on Feb 7, 2021 6:36:26 GMT -8
I replaced the codes in the Post List tab with the codes from Ulises' post, it's not working. What am I missing? As soon as I edited the post with the reason noguests, the post disappeared even though I'm still logging in. Try this: {foreach $[post]}
{if $[post.edited.reason] == "noguests" && $[current_user.is_guest]}
{else}
<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">
<button type = "button" class = "speed-tag-button">SpeedTag!</button>
$[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} This checks to see if the post edited reason does equal "noguest" AND the current user is a guest. If both are true, then the post isn't displayed. Otherwise, the {else} clause will display the post. Ulises's code didn't take into account (that I can tell) if the person viewing the post was a member or guest. I'm not the best at template mods, so I could be way off the mark on that.
|
|
inherit
262746
0
Mar 23, 2021 20:49:38 GMT -8
vui123ve
22
November 2020
vui123ve
|
Post by vui123ve on Feb 11, 2021 21:24:42 GMT -8
MSG, The new codes you provided work. Thanks so much. However, what is the purpose of SpeedTag! button? I click on the button but do not see any new change as I don't know what it's for. I commented out this line for SpeedTag! button until someone helps me understand what it's for.
<button type = "button" class = "speed-tag-button">SpeedTag!</button>
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,775
January 2015
msg
|
Post by Lynx on Feb 11, 2021 21:44:49 GMT -8
|
|
inherit
262746
0
Mar 23, 2021 20:49:38 GMT -8
vui123ve
22
November 2020
vui123ve
|
Post by vui123ve on Apr 7, 2021 20:21:39 GMT -8
How to prevent members from quoting the content of the posts with the edit reason "noguests"?
Or How to prevent the content of the posts with the edit reason noguests from showing in the quote when someone quote it?
|
|