TinyPortal
Development => Block Codes => Topic started by: diegolyanky on October 16, 2013, 09:08:57 PM
Hi:
I need to show one block, only to members into groups based in the count of posts. How can I do this ?
Actually, only can select users in aditional membergroups...
Using TP 1.0 and SMF 1.1.11
Thanks !
Sorry, but Tinyportal does not use post count groups for permissions.
Hi,
I am looking for exactly the same thing: to show a block ONLY TO USERS WITH NO POSTS with some guidance/instructions on how to make their first post. I see this post is 8 years old and I was wondering if there has been any change since then to make it possible now. Thank you.
No, nothing has changed in that respect, BUT there is a way to do what you want, by using a php block...
This is mentioned here: https://www.tinyportal.net/index.php?topic=14391.msg120508#msg120508
I have a block that is only showing to users with 0 posts, seems pretty much what you want to do:
1. Create a php block, and set the frame options to : Do not use title/frame styles
(this is important, because you don't want the users with posts to see the empty block...
2. Choose the membergroups that will able to see this block. : make the selection out of the regular groups
3. Insert this code in the php block (change the text as you like of course..):
global $user_info;
if($user_info['posts'] < 1)
echo'
<div class="roundframe">
<div style="padding: 0 8px;">
<b>Take notice:</b>
You have not yet introduced yourself on the forum: before you can post messages it is necessary to introduce yourself. You can introduce yourself in this board: <a href="/index.php?board=1.0"><b><u>Forum > Introductions</u></b></a>.<br><br><b>Only after introducing yourself you can also post messages in the other boards and respond to messages</b>.
</div>
</div>';
Will the Zero post count member see only this 1 Block, or will see the rest of the blocks as well.
Quote from: Skb on July 23, 2021, 09:29:09 AM
Will the Zero post count member see only this 1 Block, or will see the rest of the blocks as well.
This check is only made in the one block, so they will see all other block as normal