![]() |
Birthday month in users post
This will place the user's birthday month in the user's post. Based on thread found here.
Install time: 1 minute Attachment in following post. This is my first hack and there is really nothing to it. Enjoy CDitty |
Here is the attachment.
CDitty |
Interesting. Nice small hack cditty :)
|
Thanks.
|
Great :)
fnx :P |
thanks for the hack...been needing this ;)
|
Nice one indeed. If our postbit wasn't so crowded I'd install it here. :D
|
wish instead of month it displays the zodiac sign
|
Should be really simple. I'll work on this tonight after I get in.
Chris |
Well, I thought that I would be able to do this fairly easy. But I can't. This is the code I was going to implement within it, but this will not give you a "true" zodiac.
http://www.phpwizard.net/resources/p...ty/zodiac.php3 Perhaps someone here can do this with greater efficency that I would be able to. Chris |
I like this hack. Is there anyway to get the Day along with the month to show up there too?
|
Sure. Just change this....
PHP Code:
PHP Code:
Chris |
Thank you CDitty
It worked like a charm |
cditty, what's the problem with that zodiac code? You need to use the numeric form of the month (1), not Jan. :)
|
I was thinking/hoping that code would be a quick down & dirty cut & paste job. But thinking about it, anything I might be able to come up with won't have the actual zodiac signs on it. ie...Capricorn is in Dec and Jan.
Chris |
Why? That function you showed us takes care of that, all you need to do is give it the month and day, it'll return you the sign.
|
With many thanks to FireFly, here is a version for zodiac signs.
Chris |
For the zodiac signs version, when I put "$post['sign']" in the postbit, I'm getting this error.
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in functions.php(304) : eval()'d code on line 14 |
$post[sign], without quoting the index name.
|
Thanks. It works now, but in the instructions, it says
"Place $post['sign'] in someplace in the postbit template where you want it to appear." |
How did you get it to work? I got all sorts of errors when I did it without the quotes. :)
Quote:
|
Is there a way to check and see if the user has entered a birthday in their profile and if not, not show anything (like Birthday= and then a blank space)? I want it to show up if they have entered a birthday and have nothing show up if they haven't.
Quote:
|
I ran into a strange problem. If the user doesn't have a birthday listed in their profile, it will always say November 30 as their birthday in the postbit template. Any way around this?
|
All times are GMT. The time now is 08:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|