Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Smilies Extension

3stripe3stripe ✭✭
edited November 2005 in Questions
Hmmm or is this just overkill. Just thought I'd put the thought out there.
«1

Comments

  • I like smilies :D
  • i like ascii smilies.
  • Would love to add smilies!
  • pinkies! /me gets coat and runs out
  • Ascii smiles, how 1987.
  • /me remembers it's like 5 bajillion degrees lately and leaves coat
  • 3stripe3stripe ✭✭
    edited July 2005
    I think ascii smilies are perfect for this flavour of Vanilla personally, but might be nice to have gif smilies on other installs.

    That said I just remembered the old

    =)

    which is possibly the slickest smilie ever, don't think it could be beaten
  • yeah, i always thought gif smilies cheapened a forum's look, but i know the kiddies love 'em.
  • it would be cool if you could write the extension to display either a gif or a text version of each one depending on if they were in text only mode.
  • yeah that sounds good
  • smilies would definitely be an awesome extension. a lot of people hate them, a lot of people love them.

    i tried writing this extension already, but im just not a proficient coder enough to do such a task.
  • i was wondering if you could get a smilie add-on for markdown :-?
  • domdom
    edited July 2005
    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!! )

  • edited August 2005
    Hello everyone!
    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.
  • How do you use the smilies? Does the extension automagically change :-) into a smiley?
  • Here's what I've included:

    :) = image
    ;) = image
    :D = image
    :( = image
    :| = image
    :P = image
  • 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.
  • edited August 2005
    Ok, first disable the extension. Then change the following line (2nd to last line) in BBCode.php:

    $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.
  • hey ghazi, nice work!
  • Thanks, that's definitely a solution. However, does anyone know how to make it apply to the normal Text setting without the need for another option?
  • 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!
  • I built on Ghazi's excellent work and added the full icon set from planet-tolkien. So here's a version with 110 more smilies BBCode+110
  • 110 smilies?! are there even that many facial expressions possible in the human face?!
  • 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.
  • how do you know what the bbcode is for 110 smilies? surely you don't learn them all!
  • 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!

    mini, that's wrong on so many levels.
«1
This discussion has been closed.