How To Hide Post With Minimum Post Count Of The Member


Subject: How To Hide Post With Minimum Post Count Of The Member
Hi my friends,

I want to ask, How to HIDE Post with Minimum Post COunt of member....
If the member had post more than XX posts, he/she can see the hiding post.

example :

Code: [Download] [Hide]
  1.  
  2. [HIDE="20"] hi how are you? [/HIDE]  
  3.  
  4.  


it mean, member (registered) who want to see the hide post must had minimum 20 post in the forum....

i will appreciete to helping me, n maybe this might be useful for the other thx u

Subject: Re: How To Hide Post With Minimum Post Count Of The Member
I don't have the time to code this... maybe someone else is interested and will help you.

Sorry. :mricy:

Subject: Re: How To Hide Post With Minimum Post Count Of The Member
On bbcode.php, try this

replace

Code: [Download] [Hide] [Select]
if($userdata['session_logged_in'])
{
$sql = "SELECT *
FROM " . THANKS_TABLE . "
WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
$show = $db->sql_numrows($resultat) ? true : false;
if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD))
{
$show = true;
}
}


with

Code: [Download] [Hide] [Select]
if ($userdata['user_posts']) > 20
{
if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD))
{
$show = true;
}
}


Set 20 to the amount of post you want.

Subject: Re: How To Hide Post With Minimum Post Count Of The Member
Wow, Thx zulker.... it's works

Subject: Re: How To Hide Post With Minimum Post Count Of The Member
:mricy:

Subject: Re: How To Hide Post With Minimum Post Count Of The Member
Good shoot Zuker. :P


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.11s (PHP: 16% SQL: 84%)
SQL queries: 10 - Debug Off - GZIP Enabled