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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,019
  • Total Topics: 21,332
  • Online today: 1,011
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 926
  • Total: 926

block permission according to message count.

Started by deniz, April 19, 2006, 06:15:36 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

deniz

in block permission there is no group whic according to message count.

i need a block which comes in view to specific user group.

for example if user has 0 message block seems just this gorup.  etc.

anunlike

Good idea. I can think of some specific uses for this.

Sineksekiz

I may be shouldn't resurrect an old topic like this but deniz has put it exactly the way I wanted to.

Is there anyway to set block permisions by member groups according to message count? I did not try the TP 1.6 Beta, does it has this option or could you tell me in which file I need to modify to do this?

Thank you...

Ken.

In your block edit screen you should see "Choose your membergroups that will able to see this block."
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Sineksekiz

Hi Ken.

I know where would you want me to look at. But  there is only normal member groups. I can't see membergorups according to message count there...

If this helps I am using SMF 1.1.6, Midnight Theme and TP 0.9.8 ....

Thank you.

IchBin

Post based groups are not part of the TP permissions. There's no option to do this type of thing without coding the block to have the custom option.

Sineksekiz

Hi IchBinâ,,¢

Please let me know where can I tweak these settings? Or is there a mod for this? If you give me a headstart about where should I start I would want to give it a go.

Thank you.

IchBin

Its not a setting you can tweak. I was referring to writing some code in the block to check for post count or something.

if ($user_info['post_count'] < 100)

echo ' Display something for users with less than 100 posts';


That is just an example of what I mean. I'm not sure ATM if anything exists in the $user_info array that has the users post count in it. Eating lunch, so I'll check later.

Ianedres

Unless I missed it, I don't see a post count within the $context array; probably only loaded while checking stats, as it does show in the member summary page in the profile.

Wrote a brief SQL query to count the number of posts for ID_MEMBER, but this did not correlate to the summary page...

Can investigate further, but if all you want to do is to check against NO messages (versus an exact count) then a query might be the best bet and quickest adaption...

Sineksekiz

How does SMF manages this. Can't we use same query? I'm always scared of this query business since if I wouldn't do proply it would slow down the site...

Can we copy or re-arange SMFs hadling method? So I would be able to use same user groups and if I would change any of them I wouldn't have to change the code as well....

This website is proudly hosted on Crocweb Cloud Website Hosting.