Disabling image BB code for certain usergroups?

Floren

Well-known member
Hi,

There is a new plague of spammers who now post tiny transparent images linked to their spam pages. I would like to disable the IMG code for Registered users but I cannot find the permissions/settings related to it.
 
What you can do, add some border styling to BBCode images, that way even if they are transparent the border around them will still be obvious seen in posts
 
You can overwrite XenForo_BbCode_Formatter_Base::renderTagImage() to check for the user's usergroup.
PHP:
if(XenForo_Visitor::getInstance()->isMemberOfUserGroup('2', true)
 
You can overwrite XenForo_BbCode_Formatter_Base::renderTagImage() to check for the user's usergroup.
PHP:
if(XenForo_Visitor::getInstance()->isMemberOfUserGroup('2', true)
Wouldn't that affect the VIEWER of the page, not the person who posted the IMG?
 
Wouldn't that affect the VIEWER of the page, not the person who posted the IMG?
No, it affects the person who posted it. I just tried it with this code:
PHP:
if(XenForo_Visitor::getInstance()->isMemberOf('2', true))
		{
			return $this->renderTagUnparsed($tag, $rendererStates);
		}
 
No, it affects the person who posted it. I just tried it with this code:
PHP:
if(XenForo_Visitor::getInstance()->isMemberOf('2', true))
{
return $this->renderTagUnparsed($tag, $rendererStates);
}
I dont think so. First of all, you're not supplying a user in that argument... so how does the system know what user you are talking about?

Secondly, the XenForo_Visitor class deals with the current visiting user... which means it reads the VIEWER.
 
There is no such permission or configurable option.
Guys, you are probably not aware but this is the "hottest/newest" way to spam.
Forums are currently bombarded with tiny image links, impossible to detect by the human eye:
http://forums.macrumors.com/showthread.php?t=1271320

You see it in that thread because a code modification that displays text instead of the actual image. If XenForo displays the real image instead of a link, it will be undetected.
We really need options to disable the BB Code, I had no idea XenForo does not have this basic/important functionality.
 
This type of thing is not new really, although I've not seen it used for years by spammers in mass. They use a 1px transparent image with a link attached to it. I mentioned above that one way, but most certainly not ideal! Is to put some border styling added to bbcode img. That way even a 1px image will give itself away because there will still be visible border to spot around it.

Not really a solution, I know. But it works.

As said, there needs to be a way to disable IMG code for user-groups. This is a pretty nasty way to spam forums and hard to spot going on.
 
Agreed, not new, but the ability to control this by user groups should be available.

This was pretty big a few years ago by people cookie stuffing affiliate links on one of my forums. Linking to a 1x1 transparent gif and using .htaccess to redirect.
 
Top Bottom