In theory, a well written smilie extension would take care of processing comments after the Html, Markdown, or plain text formatter has got its hands on them. That way you don't need to do anything special to accomodate different formatting styles.
which brings up an interesting point, but i'm afraid this might be another topic that is merely awaiting documentation: is there a way to specify the order in which extensions are processed?
In theory, a well written smilie extension would take care of processing comments after the Html, Markdown, or plain text formatter has got its hands on them. That way you don't need to do anything special to accomodate different formatting styles.
I suppose you could write an extension that extends the StringManipulator class and then replaces the StringManipulator object reference in the Context with itself. That's assuming I understand things correctly about how vanilla works
Now if only I could figure out how to call a parent class's functions in php, I'd have this extension 50% done already (thanks to mark's new documentation on extensions!! )
This is awesome.
Is there a way to make it so that smilies are created in the normal text mode? Switching to BBCode mode isn't too vital for my forums, so I'l rather not confuse the kids with the options.
$Context->StringManipulator->AddManipulator("Text with Smilies", $BBCodeFormatter);
Then go ahead and re-enable the extension. This will simply give your users 2 options; text, and text with smilies. But it won't take the bbcode capability away.
Comments
That said I just remembered the old

which is possibly the slickest smilie ever, don't think it could be beateni tried writing this extension already, but im just not a proficient coder enough to do such a task.
I suppose you could write an extension that extends the StringManipulator class and then replaces the StringManipulator object reference in the Context with itself. That's assuming I understand things correctly about how vanilla works
Now if only I could figure out how to call a parent class's functions in php, I'd have this extension 50% done already
(thanks to mark's new documentation on extensions!! )
I've just altered the bbcode extension to allow for the use of smilies too.
Download and let me know if you have any questions.
:P =
$Context->StringManipulator->AddManipulator("BBCode", $BBCodeFormatter);
to:
$Context->StringManipulator->AddManipulator("Text with Smilies", $BBCodeFormatter);
Then go ahead and re-enable the extension. This will simply give your users 2 options; text, and text with smilies. But it won't take the bbcode capability away.