to use this filter inside the dialogs you have to remove
PHP Code:
$smarty->register_outputfilter("hyperlink_all_coffee");
from smarty.php
and insert somewhere in your dialog.tpl
HTML Code:
{if $usertype eq 'C'}
{php}
$smarty->register_outputfilter("hyperlink_all_coffee");
{/php}
{/if}
and
HTML Code:
{if $usertype eq 'C'}
{php}
$smarty->unregister_outputfilter("hyperlink_all_coffee");
{/php}
{/if}
somewhere in the end of your dialog.tpl
Excluding all specific matches is also possible.
You have to use regular expressions instead of str_replace function in such case. But it's more complex task. I've just figured out the common way to get over it.