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

Add-on Block url shortened links

Discussion in 'Resource and Add-on Requests' started by Coop1979, May 8, 2012.

  1. Coop1979

    Coop1979 Well-Known Member

    I'm looking for help figuring out a way to block any links that are posted by users using some of the popular url shortening services - bit.ly, goo.gl, tinyurl, etc.

    I know that I can use the censorship function to censor the links, but I'd prefer for the system to throw back an error to the user when they try to submit a post using a shortened link.

    The error would be something like
    I'm sorry, you cannot post shortened links on this site. Please submit your post again with the original url of the site you would like to link to.
    The reason for this add-on would be 1) To keep users from posting links to sites we do not allow links to, and 2) To ensure that all links are properly monetized.

    I can certainly offer some money for the creation of this add-on.
  2. Chris D

    Chris D XenForo Developer Staff Member

    I have kinda worked out how to do this, but I need some advice on making it an add-on.

    The way I've found of doing this is by editing a protected_function and as far as I'm aware, that's a no go in terms of an add on unless you edit the core files. That will achieve what you want, but not ideal.
    Coop1979 likes this.
  3. Chris D

    Chris D XenForo Developer Staff Member

    irrelevant now

    Attached Files:

    Coop1979 likes this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    The genius which is Jake Bunce may have just helped me with this so watch this space :)
    Coop1979 likes this.
  5. Chris D

    Chris D XenForo Developer Staff Member

Share This Page