Stop posting external links

Go down

In progress Stop posting external links

Post by FIB on Fri Nov 06, 2015 6:12 pm

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 Fri Nov 06, 2015 10: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 : 13195
Reputation : 2910
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 Sat Nov 07, 2015 12:00 am

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 Sat Nov 07, 2015 12:12 am

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 : 13195
Reputation : 2910
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 Sat Nov 07, 2015 6:55 am

Thanks @Ange TuteurI'll give both a try


Last edited by FIB on Sat Nov 07, 2015 3:06 pm; 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 Sat Nov 07, 2015 7: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 : 6770
Reputation : 619
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: Stop posting external links

Post by FIB on Sat Nov 07, 2015 3:07 pm

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 Sat Nov 07, 2015 8: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 : 6770
Reputation : 619
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