Stop posting external links

Go down

In progress Stop posting external links

Post by FIB on 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

FIB
Forumember

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

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

In progress Re: Stop posting external links

Post by Ange Tuteur on 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.
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2918
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

In progress Re: Stop posting external links

Post by Kirbs on 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?
avatar
Kirbs
Forumember

Posts : 628
Reputation : 18
Language : English

Back to top Go down

In progress Re: Stop posting external links

Post by Ange Tuteur on 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
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2918
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

In progress Re: Stop posting external links

Post by FIB on 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

FIB
Forumember

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

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

In progress Re: Stop posting external links

Post by brandon_g on 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



Remember to mark your topic when a solution is found.
avatar
brandon_g
Support Moderator
Support Moderator

Male Posts : 6884
Reputation : 631
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: Stop posting external links

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

Thanks for the tip @brandon_g

FIB
Forumember

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

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

In progress Re: Stop posting external links

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

Your welcome, anytime Very Happy.


Remember to mark your topic when a solution is found.
avatar
brandon_g
Support Moderator
Support Moderator

Male Posts : 6884
Reputation : 631
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum