The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    Stop posting external links

    avatar
    FIB
    Forumember


    Male Posts : 491
    Reputation : 2
    Language : English
    Location : UK

    In progress Stop posting external links

    Post by FIB November 6th 2015, 11:12 am

    How can I stop all members posting external links on my forum regardless to how long they have been a member
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Stop posting external links

    Post by Ange Tuteur November 6th 2015, 3:21 pm

    Hi @FIB,

    I suppose one way to do this would be to hide the links via CSS. For example, add the following CSS to your stylesheet :
    Code:
    .postbody a {
      display:none;
    }

    .postbody a[href^="/"], .postbody a[href^="#"], .postbody a[href^="javascript"], .postbody a[href*="help.forumotion.com"], .postbody a:not([href]) {
      display:inline;
    }
    Take care to replace
    Code:
    help.forumotion.com
    with your domain.

    That way it should only show links from your domain, and hide external links.
    Kirbs
    Kirbs
    Forumember


    Posts : 628
    Reputation : 18
    Language : English

    In progress Re: Stop posting external links

    Post by Kirbs November 6th 2015, 5:00 pm

    Hi ange, what if those links are pictures put in signatures or topics as img bbcodes, would they still show or not?
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Stop posting external links

    Post by Ange Tuteur November 6th 2015, 5:12 pm

    If it's linking to an image, you'll have to whitelist the image host. ( or extension ) For example, add this selector to the set to display links to servimg :
    Code:
    .postbody a[href*="servimg.com"]
    avatar
    FIB
    Forumember


    Male Posts : 491
    Reputation : 2
    Language : English
    Location : UK

    In progress Re: Stop posting external links

    Post by FIB November 6th 2015, 11:55 pm

    Thanks @Ange TuteurI'll give both a try


    Last edited by FIB on November 7th 2015, 8:06 am; edited 1 time in total
    brandon_g
    brandon_g
    Manager
    Manager


    Male Posts : 10113
    Reputation : 923
    Language : English
    Location : USA

    In progress Re: Stop posting external links

    Post by brandon_g November 7th 2015, 12:02 am

    Hello,

    @FIB I just wanted to let you know, your not really tagging Ange when you are trying to tag him, instead you are tagging a different Ange. I know it is difficult to tag bim because he has a space in his username.

    Whenever someone has a space in their username, you must the username in between " marks, so to tag Ange you would have to do it like this:

    Code:
    @"Ange Tuteur"
    which will show up as @Ange Tuteur when posted.


    Its a common mistake, one that I made for awhile as well, until I learned how to tag usernames with spaces in it Wink.

    Just wanted to let you know for future refrence Smile.

    Have a great day, hope you find a solution to your problem Very Happy.

    -Brandon




    Stop posting external links Brando10
    Remember to mark your topic Stop posting external links Solved15 when a solution is found.
    General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

    Stop posting external links Scre1476
    Team Leader
    Review Section Rules | Request A Review | Sticker Points
    avatar
    FIB
    Forumember


    Male Posts : 491
    Reputation : 2
    Language : English
    Location : UK

    In progress Re: Stop posting external links

    Post by FIB November 7th 2015, 8:07 am

    Thanks for the tip @brandon_g
    brandon_g
    brandon_g
    Manager
    Manager


    Male Posts : 10113
    Reputation : 923
    Language : English
    Location : USA

    In progress Re: Stop posting external links

    Post by brandon_g November 7th 2015, 1:13 pm

    Your welcome, anytime Very Happy.



    Stop posting external links Brando10
    Remember to mark your topic Stop posting external links Solved15 when a solution is found.
    General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

    Stop posting external links Scre1476
    Team Leader
    Review Section Rules | Request A Review | Sticker Points

      Current date/time is November 11th 2024, 8:59 pm