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.

Adding Yellow Fade

2

Comments

  • I think I'm going mad. seriously, I'm losing the plot, its 3:38am - I'm going to bed, I'll look at this again tomorrow!
  • I think what nifkin has made is not a solution ot he problem you wanted. I think you wanted it to highlight the latst comment in a discussion 'when you opened it up'. This extension highlights the latest thread 'when you post it'. Try and post a comment to see what I mean. On submission, it will glow (in your case, pulse) yellow. I am not sure if this is what you were after, bu thtis is what the extension does. I hope that helps?
  • MarkMark Vanilla Staff
    This is awesome. You guys rule.
  • Took me 13 seconds to get this to work. Nice job guys. See Mark, I told you extensions would make this baby really shine!

  • what's the trick for a single flash?

  • edited July 2005
    change

    var StartFadeAt = 28;
    to
    var StartFadeAt = 14;

    Or use this one I prepared earlier :P
    http://server.skoap.com/YellowFade.js
  • edited July 2005
    I think what nifkin has made is not a solution ot he problem you wanted.

    All I did was add the YellowFade.js to everything, anything it does beyond that is just based on what's anchor is being called. Apparently when you hit the anchor for a new post after making one (ie: #Comment_4, a DIV with an ID applied to it) it works peachy. But when you go to a thread it uses #Item_4 to reference a named anchor, an inline element with no text or background space to highlight.

    If you really want to try to rewrite the linking/XHTML structure of every page to make it always work you're welcome to do so.
  • It also works when clicking through to a post from search results.
  • I was mistaken. IT does, in fact work on everything. But I modiefied it slightly, to only work on selected pages. Your one, does in fact do as you describe. Sorry.
  • edited July 2005
    fade anything technique found while looking for something else...

    Key Features
    • Fade an infinite number of elements.
    • No inline JavaScript. Simply give an element a class of "fade", the script does the rest “automagicallyâ€?.
    • Background color aware. FAT will do better than simply fade to white if the element (or it's parents) have a CSS background color, it will fade to that background color instead.
    • Fade from any color. For example, if you wanted a list of error messages to fade out from red you would simply give the list a class of "fade-FF0000".
    • Super smooth fading. By default, elements will fade at 30 frames per second (the same rate as a television) over 3 seconds. You can adjust this to any framerate and any duration. You could easily fade elements at 60 frames per second over 4, 5, 10 seconds!
  • while not fully understanding, that sounds cool; if a little 'omg look what the interweb can do'
  • in other words, the guy tore apart yellow-fade and made it more versatile
  • Good luck modifying all of Mark's code to add the "fade" class to the elements you want this code to work on. Another approach, and one I recommend, is to adapt the Javascript so that it accepts an array of CSS classes to apply the fade to, and then select from the element/class pairs that already exist.

  • This works great.
    Am I right in thing that if I want to change the colour i edit the part that starts:

    var FadeSteps = new Array();
    FadeSteps[1] = "ff";


    which then carries on to 28?
  • Yeah, fade step one is the normal state, so you want that as your BG colour I guess.
  • OK. Thanks for the quick answer :)
  • O.k..i was looking for this effect mins ago and i found this thread. I uploaded the extension file to the extension folder and also the .js to the .js folder but it don't seem to work. I get this error after posting a comment to see if it works or not : Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/yourdomain/forum/extensions/YellowFade.php:1) in /home/user/public_html/yourdomain/forum/controls/Common.Controls.php on line 126
  • Are you on 0.9.2 or 0.9.3? As far as i know this only works on 0.9.3. But i could be wrong. Eitherway it'l be useful information.
  • oppss...sorry now it's working, some thing was wrong with the extension file, there were some spaces in the beginning of the php file. Sorry guys..thanks.
  • Are you on 0.9.2 or 0.9.3? As far as i know this only works on 0.9.3.

    I still haven't installed 0.9.3 to test it on, it was originally written for 0.9.2 but it should (fingers crossed) work fine as long as 0.9.3 didn't change how you add another JS file to the page template.
This discussion has been closed.