Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

September 22, 2021, 11:42:56 PM

Login with username, password and session length
Members
  • Total Members: 3823
  • Latest: Ritsu
Stats
  • Total Posts: 192502
  • Total Topics: 21002
  • Online Today: 100
  • Online Ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 38
Total: 38

Author Topic: Show block only to certain groups count based  (Read 4898 times)

0 Members and 1 Guest are viewing this topic.

Offline diegolyanky

  • Jr. Member
  • **
  • Posts: 20
Show block only to certain groups count based
« on: October 16, 2013, 02: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 !

Offline IchBin

  • Developer
  • *
  • Posts: 16231
Re: Show block only to certain groups count based
« Reply #1 on: October 16, 2013, 03:05:40 PM »
Sorry, but Tinyportal does not use post count groups for permissions.

Offline ramon.cutanda

  • Jr. Member
  • **
  • Posts: 5
Re: Show block only to certain groups count based
« Reply #2 on: July 15, 2021, 05:30:50 AM »
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.

Offline @rjen

  • Support Team
  • *
  • Posts: 2950
    • FJR-club Nederland
Re: Show block only to certain groups count based
« Reply #3 on: July 15, 2021, 08:16:07 AM »
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..):

Code: [Select]
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 TP2.1.0 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Offline Skb

  • Full Member
  • ***
  • Posts: 116
    • Metabolically Challenged
Re: Show block only to certain groups count based
« Reply #4 on: July 23, 2021, 02:29:09 AM »
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

Offline @rjen

  • Support Team
  • *
  • Posts: 2950
    • FJR-club Nederland
Re: Show block only to certain groups count based
« Reply #5 on: July 23, 2021, 02:56:06 PM »
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 TP2.1.0 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info