vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Birthday month in users post (https://vborg.vbsupport.ru/showthread.php?t=36267)

cditty 03-17-2002 10:00 PM

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

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/p...ty/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....
PHP Code:

date('M' 

with this
PHP Code:

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. :)

Quote:

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.

Quote:

Originally posted by cditty
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


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?


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
  • Page Generation 0.01357 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete