MyBB Community Forums

Full Version: User Group without Homepage or Signature options
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I would like to create a user group that does not show signatures or a homepage link. This group will be used for or new registered users. I'm sure many people already do this, but I cant see the options in the Edit User Group>>Users and Permisions

<later I will also prevent this group from adding links manually>

I want to reduce the amount of bot activity / manual spammers, but before I do this, I want to make sure there is no benefit for these spammers.

A lot of people see a quick opportunity when sites allow users to add their own links. If this opportunity is removed, so is much of the spam



<adding no-follow is not an option, no follow wont prevent everyone, not all spammers look at the link attributes>


How can I make sure all user that register are first placed into a group that does not display their homepage or signatures?


Edit: i just found this post http://community.mybb.com/thread-50221-page-2.html
I'll try to write a custom modification and eventually post it here if it ends up being helpful to anyone
I've found a way of doing this (editing core files)
- its not recomended you do this if you want to later upgrade, or are unsure of what you're doing.


The following steps below have allowed me to have user groups (controled in the admin console) Where I can turn on/off the singnature and homepage options:


this requires 4 files to be updated and one sql statement to be run:

Files: user_groups.lang.php, groups.php, member.php, functions_post.php

1stly, run the below sql:
ALTER TABLE mybb_usergroups
 ADD (
 	customallowsignature int(1) NOT NULL DEFAULT 0,
 	customallowhomepage int(1) NOT NULL DEFAULT 0
	);


Then do the following update (this is for mybb1.4)


update groups.php to include the following(just add bit under Custom options)
		$form->generate_check_box("cancustomtitle", 1, $lang->can_use_usertitles, array("checked" => $mybb->input['cancustomtitle'])),
		$form->generate_check_box("canuploadavatars", 1, $lang->can_upload_avatars, array("checked" => $mybb->input['canuploadavatars'])),
	// Custom options, hack to allow some of my custom options for user groups	
		$form->generate_check_box("customallowsignature", 1, $lang->custom_allow_signature, array("checked" => $mybb->input['customallowsignature'])),
		$form->generate_check_box("customallowhomepage", 1, $lang->custom_allow_homepage, array("checked" => $mybb->input['customallowhomepage']))

update groups.php to include the following(just add bit under Custom options)
	"maxwarningsday" => 0,
	"canmodcp" => 0,
// Custom options, hack to allow some of my custom options for user groups	
	"customallowsignature" => 0,
	"customallowhomepage" => 0



update member.php to include the following(just add bit under Custom options)
	if($memprofile['website'])
	{
		$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
		$website = "<a href=\"{$memprofile['website']}\" target=\"_blank\">{$memprofile['website']}</a>";
	
	// Custom options, hack to allow some of my custom options for user groups	
		if ( (strlen($memprofile['website']) > 0) && ($memperms['customallowhomepage'] == 0)) 
			{
			$memprofile['website'] = "homepage not yet allowed, please read the rules";
			$website = $memprofile['website'];
			}	
	}



update member.php to include the following(just add bit under Custom options)
		$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser);
		// Custom options, hack to allow some of my custom options for user groups	
		if ( (strlen($memprofile['signature']) > 0) && ($memperms['customallowsignature'] == 0)) 
			{
			$memprofile['signature'] = "signature not yet allowed, please read the rules";
			}
		
		eval("\$signature = \"".$templates->get("member_profile_signature")."\";");
	}	




update user_groups.lang.php to include the following(just add bit under Custom options)
$l['confirm_group_deletion'] = "Are you sure you want to delete this user group?";
$l['confirm_group_leader_deletion'] = "Are you sure you want to delete this group leader?";

// Custom options, hack to allow some of my custom options for user groups
$l['custom_allow_signature'] = "Can display signatures on posts - custom";
$l['custom_allow_homepage'] = "Can display homepage on profile - custom";	





update functions_post.php to include the following(just add bit under Custom options)
		$post['signature'] = $parser->parse_message($post['signature'], $sig_parser);
		// Custom options, hack to allow some of my custom options for user groups	
	    $memperms = user_permissions($post['uid']);
		if ( (strlen($post['signature']) > 0) && ($memperms['customallowsignature'] == 0)) 
			{
			$post['signature'] = "signature not yet allowed, please read the rules";
			}	
		eval("\$post['signature'] = \"".$templates->get("postbit_signature")."\";");