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.
Yeah, rewrite your own TextFormatter (see the source code somewhere in the library/ directory), and replace its reference with your new TextFormatter. did it once, lost the code, it was pretty trivial. Didn't try it with the ObjectFactory->SetReference though, I just did something like
StringFormatter->formatters['text']=$mySmiliesFormatter;
or whatever it is... too lazy to look at the source and try it out right now, but it worked!
ahh lech my dear boy, you're forgetting that smilies arent actually smilies. Theyre animated gifs which just happen to have a face in them somewhere... They've branched out to smilies holding signboards requesting that you read the search feature and all sorts now! Typing is *so* old fashioned.
its a whole new language. How do you know what the english for 'by the way i suck cock and i'm too lazy to type so i'm gonna use a shitty smiley' is? You learn it!
it's very true - since it's planet-tolkien smilies this set even include orc's and elves, and just to be really annoying quite a few christmas ones too; aside from the basic faces most are in the format :word: theres a crib sheet included in the archive on the current site there's a drop down list that inserts it automaticly and at some point i'm going to have to figure out how to put that into Vanilla.
its a whole new language. How do you know what the english for 'by the way i suck cock and i'm too lazy to type so i'm gonna use a shitty smiley' is? You learn it!
Comments
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •That said I just remembered the old
=)
which is possibly the slickest smilie ever, don't think it could be beaten- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •i tried writing this extension already, but im just not a proficient coder enough to do such a task.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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!! )
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •:) =
;) =
:D =
:( =
:| =
:P =
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$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.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •mini, that's wrong on so many levels.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •