Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Smilies Extension

3stripe3stripe ✭✭
edited November 2005 in Vanilla 1.0 Help
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.
This discussion has been closed.