2.4 is aiming for backwards compatibility so we’re not really looking to make any groundbreaking changes there.
If time allows, may I suggest a hashing/salting helper, be it in 2.4 or 3.0?
I like how the IP address on a forum (I don't know if I can name it, but a big board), displays the IP address in a hashed manner for registered and posted content.
For forums dealing with member-to-member transactions, a helper in
helper_ip
to conceal the IP in a hashed manner to certain user groups (registered, and
{$ip|ip}
to mod/admins) could make someone feel more comfortable dealing with someone if they know that the account is legitimate (to an extent). Something similar to
{$ip|md5}
(but not using md5 because there could be a database of all IPs hashed that way, but anything that can securely make a unique hashed IP; SHA1 perhaps, I don't know).
It could help people determine duplicate accounts without having admins investigate, giving some peace of mind.
An add on would probably be best to store it as a cache, but I don't think there'd be much performance issues on smaller boards using a template edit.
This would likely have to be in its own suggestion thread, but it alone isn't groundbreaking over having 10+ different helpers that can do various things which would typically require an add on to do with (more) variables accessible. I would assume more people would need to think of use cases like this and compile a list of helpers that might reduce the reliance of add ons to simple template edits.
Further,
@Paul B already supplied us with a pretty exhaustive list that can be used, so I don't suspect many more need to be added.
Have a look in src/XF/Template/Templater.php
PHP:
protected $defaultFilters = [
'default' => 'filterDefault',
'censor' => 'filterCensor',
'count' => 'filterCount',
'currency' => 'filterCurrency',
'emoji' => 'filterEmoji',
'escape' => 'filterEscape',
'for_attr' => 'filterForAttr',
'file_size' => 'filterFileSize',
'first' => 'filterFirst',
'format' => 'filterFormat',
'hex' => 'filterHex'...