mtrs wrote:For X posts limit, it is simple,
After installing this mod
Open
includes/ucp/ucp_profile.php
FindReplace withCode: Select all
if ($auth->acl_get('u_change_colour'))
For X posts limit in some forumsCode: Select all
if ($auth->acl_get('u_change_colour') && $user->data['user_posts'] > 999)
Open
includes/ucp/ucp_profile.php
FindReplace withCode: Select all
if ($auth->acl_get('u_change_colour'))
Also you can use the user permissions to only allow certain usersCode: Select all
// Count users post in $X forum ID $X = 555; //forum_id where posts will be counted //change to an appropriate number you need $sql = 'SELECT COUNT(post_id) as posts_num FROM ' . POSTS_TABLE . ' WHERE poster_id = ' . $user->data['user_id'] . '; AND forum_id = ' . $X; $result = $db->sql_query($sql); $user_posts_num = (int) $db->sql_fetchfield('posts_num'); $db->sql_freeresult($result); if ($auth->acl_get('u_change_colour') && $user_posts_num > 99 && $user->data['user_posts'] > 999)
Note: code is not tested, you need to test. Replace 99 and 999 number with your limit.
Code: Select all
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
Code: Select all
// Begin : Username Colour Change MOD
//If other mods are installed you may have to change legend3 to the next available legend number
'legend3' => 'USERNAME_COLOUR_CHANGE',
'uccm_euclidean_distance' => array('lang' => 'SIMILAR_COLOUR_CHECK', 'validate' => 'int:0:650', 'type' => 'text:4:4', 'explain' => true),
'uccm_disallowed_colours' => array('lang' => 'DISALLOWED_COLOURS', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
// End : Username Colour Change MOD
Code: Select all
'legend3' => 'ACP_SUBMIT_CHANGES',