TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 28, 2024, 08:23:40 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,104
  • Total Topics: 21,212
  • Online today: 152
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 172
  • Total: 173
  • tino

Show block only to certain groups count based

Started by diegolyanky, October 16, 2013, 09:08:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

diegolyanky

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 !

IchBin

Sorry, but Tinyportal does not use post count groups for permissions.

ramon.cutanda

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.

@rjen

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>';
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Skb

Will the Zero post count member see only this 1 Block, or will see the rest of the blocks as well.

SMF 2.1 RC4 (default theme) / TP 2.1.0

@rjen

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
Running Latest TP on SMF2.1 at: www.fjr-club.nl