PDA

View Full Version : Birthday month in users post


cditty
03-17-2002, 10:00 PM
This will place the user's birthday month in the user's post. Based on thread found here. (http://www.vbulletin.com/forum/showthread.php?s=&threadid=41943)

Install time: 1 minute

Attachment in following post.

This is my first hack and there is really nothing to it.

Enjoy

CDitty

cditty
03-18-2002, 02:27 AM
Here is the attachment.

CDitty

Neo
03-18-2002, 02:43 AM
Interesting. Nice small hack cditty :)

cditty
03-18-2002, 02:49 AM
Thanks.

Floris
03-18-2002, 09:10 AM
Great :)
fnx :P

Bald Bouncer
03-18-2002, 09:15 AM
thanks for the hack...been needing this ;)

Admin
03-18-2002, 10:33 AM
Nice one indeed. If our postbit wasn't so crowded I'd install it here. :D

Lionel
03-18-2002, 02:34 PM
wish instead of month it displays the zodiac sign

cditty
03-18-2002, 02:38 PM
Should be really simple. I'll work on this tonight after I get in.

Chris

cditty
03-18-2002, 07:54 PM
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/phpMisc/scripts/pretty/zodiac.php3

Perhaps someone here can do this with greater efficency that I would be able to.

Chris

Itworx4me
03-18-2002, 09:01 PM
I like this hack. Is there anyway to get the Day along with the month to show up there too?

cditty
03-18-2002, 09:24 PM
Sure. Just change this....
date('M'
with this
date('M-d'

If you would rather show the full month name instead of the abbr version, then just change the M to a F. Be sure to have the M & F in caps.

Chris

Itworx4me
03-18-2002, 10:00 PM
Thank you CDitty
It worked like a charm

Admin
03-19-2002, 05:13 AM
cditty, what's the problem with that zodiac code? You need to use the numeric form of the month (1), not Jan. :)

cditty
03-19-2002, 11:46 PM
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

Admin
03-20-2002, 04:48 AM
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.

cditty
03-21-2002, 10:50 AM
With many thanks to FireFly, here is a version for zodiac signs.

Chris

Eniyi
04-18-2002, 02:20 PM
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

Admin
04-18-2002, 02:31 PM
$post[sign], without quoting the index name.

Eniyi
04-18-2002, 03:37 PM
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."

Boofo
06-29-2002, 12:58 AM
How did you get it to work? I got all sorts of errors when I did it without the quotes. :)

Originally posted by Eniyi
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."

Boofo
06-29-2002, 01:05 AM
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.

Originally posted by cditty
This will place the user's birthday month in the user's post. Based on thread found here. (http://www.vbulletin.com/forum/showthread.php?s=&threadid=41943)

Install time: 1 minute

Attachment in following post.

This is my first hack and there is really nothing to it.

Enjoy

CDitty

Boofo
06-29-2002, 01:31 AM
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?