Version: 1.00, by eoc_Jason
Developer Last Online: Jan 2020
Version: 2.3.x
Rating:
Released: 05-12-2003
Last Update: Never
Installs: 51
No support by the author.
I searched high and low for something that would display a little birthday cake (or even text) in the postbits when it was someones birthday and came up empty, so I wrote my own with a twist. I decided to have it display a cake for anyones birthday for the entire week (week being Sun-Sat). That way they get a little more recognition that just on their actual b-day.
This should work with all versions of vB...
All you have to do is add a couple lines of code to your admin/functions.php and add the variable to your postbits. Simple!
I just used the bday cake from MSN Messenger Page I'm not posting it here for legal reasons. If you want it to display just text you can change the line accordingly...
Like I said, I don't know if this has been done before, but my searches came up with nothing when searching for "birthday".
Enjoy.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Today at 06:59 PM DPoole said this in Post #10 is that only way to do it ?
as means installing another hack for something which is minor
Logician's hack is probably smaller than what it would take to do it another way. And with his hack, you can use conditionals for a lot of things.Ttrust me when I say that once you try it, you won't ever want to be without it.
Yesterday at 05:12 PM DPoole said this in Post #8 i like the hack but would it be possible to swap the users avator for a pre determined one if it was their birthday ?
then when the time runs out its auto switches back to their normal one as i got an idea but need avator switching for it to work?
I suppose you could have it change the $post[avatar] variable, but remember that this actually pulls from a template if you have some custom formatting... Look above like a page or two where you implemented this hack, and you will see all the avatar code. You can just overwrite the avatar var while it is their birthday, but it might confuse some people...
I'm certain I can get one of my graphics artist to do something up and making it available for you to distribute with this hack
Basically what I'm thinking is making it countdown.
Like 7 days before their birthday, it shows a cake with 7 candles.
6 days before a cake with 6 candles
5 days before a cake with 5 candles etc
til the day of it would display a lil gif that said happy birthday
Something along those lines.
Possible? If so I'll sit down with a few of my artists and work on something, if you think you could do the coding.
Sure you can do something like that... originally I had the dates pushed into an array and just a "in_array" function, but I chose the loop method just so there was one less variable floating around... But instead of just checking if it is in the array, you can find where in the array and set the count-down date accordingly...
However, I think something like that might just cause confusion among people...
Something a little simpler was if it was the actual birthday then the cake would look different than if it was just a day during the week...