1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disabling image BB code for certain usergroups?

Discussion in 'XenForo Questions and Support' started by Floren, Nov 24, 2011.

  1. Floren

    Floren Well-Known Member


    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.
    Janmaat likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is no such permission or configurable option.
  3. mrGTB

    mrGTB Well-Known Member

    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
  4. James

    James Well-Known Member

    You can overwrite XenForo_BbCode_Formatter_Base::renderTagImage() to check for the user's usergroup.
  5. Jaxel

    Jaxel Well-Known Member

    Wouldn't that affect the VIEWER of the page, not the person who posted the IMG?
  6. James

    James Well-Known Member

    No, it affects the person who posted it. I just tried it with this code:
  7. Jaxel

    Jaxel Well-Known Member

    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.
    semprot likes this.
  8. Floren

    Floren Well-Known Member

    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:

    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.
  9. Digital Doctor

    Digital Doctor Well-Known Member

    What about preventing image attachments and the [I M G] embed code for registered users ?
  10. mrGTB

    mrGTB Well-Known Member

    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.
  11. steel_curtain

    steel_curtain Well-Known Member

    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.
  12. Janmaat

    Janmaat Active Member

  13. cclaerhout

    cclaerhout Well-Known Member

    You can do it with this addon and using a callback with default XenForo BbCodes. A callback demo is available (see here).
    Janmaat likes this.

Share This Page