ElkArte Community

Elk Development => Feature Discussion => Topic started by: Jorin on February 21, 2014, 07:24:23 am

Title: forbidden BBCode allowed in signatures - possible?
Post by: Jorin on February 21, 2014, 07:24:23 am
I found something that I hated in SMF. ElkArte does this the same way. It would be great if you'd think about it and maybe change this:

If you forbid the IMG code for postings, it can't be used in signatures too. But what if I want to prevent users from integrate pictures (made by others) in their posts BUT at the same time it should be possible to use pictures in their signatures (for example banners, buttons or such)?

There's no solution at this moment.  :(
Title: Re: forbidden BBCode allowed in signatures - possible?
Post by: emanuele on February 21, 2014, 08:59:52 am
hmm... interesting approach.
I think the general idea is/was that if you forbid something in the messages, it means you don't want to see it in signatures as well, but apparently is not always like that.

The "tricky" thing about that one is (as usual) parse_bbc: in order to speed up things, parse_bbc "caches" with a static variable the codes to be used during a page, do this would require a double round of checking all the bbcodes. It may require a slight re-think of parse_bbc to avoid some useless cycle.
Title: Re: forbidden BBCode allowed in signatures - possible?
Post by: Nao on February 21, 2014, 11:59:53 am
Iirc parse_BBC recognizes when it's being called from a signature, so you can add a permission check to post img tags in either situation.
Title: Re: forbidden BBCode allowed in signatures - possible?
Post by: Jorin on February 22, 2014, 08:18:55 am
Me?  :o