News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Remove url from clickable images?

Started by swordsman1, June 10, 2013, 11:03:46 AM

Previous topic - Next topic

swordsman1

Sometimes my users post images that when clicked take you to an external website. How can I remove the url so that the image is not clickable?

I tried removing the url tag by adding '{URL=*}{img' to the censored word list and replacing it with '{img' but that results in the '{/URL}' closing tag being displayed straight after image. So I then tried to remove that tag as well by adding {/img}{/URL} to the censored word list and replacing it with {/img}, but that didn't work because it can't be detected as a whole word.

Any suggestions?

kat

Threaten members who post such things with a ban? :)

You could always disable the bbc "[url]" tag, I guess.

Admin>Posts and topics>Bulletin Board Code.

MrPhil

Isn't there a mod or setting to disallow links in a post until they have N posts? If your principal problem is with newbies who sign up to spam, that might cure it. Otherwise, if these are long-established members, that won't work (if you want to preserve the ability to post links). If the only problem is images being used as links, I would think that a modification to the BBCode parser to disallow images as children of links might be a solution. I think there's a list of allowable children for a tag, but I don't know if that will exclude grandchildren too. At worst, you might have to set a global flag that you're within a link (url/iurl), so when you encounter an image, ignore it.

Advertisement: