MrJL
04-30-2008, 08:27 PM
Ok, we currently have a forum set up where by on a users birthday, two special things happen...
1. The small cake icon appears in the postbit area with their name/join date/etc
2. Their skin changes for that day only to a "happy birthday" skin.
Now what we would like to do is also have users input their wedding date in their profile and then have, say, a wedding ring icon appear on their wedding day in place of the cake mentioned above (or some sort other icon for their anniversary).
Now, this is where we run into problems. We currently have users input their wedding date, but as near as we can find...vB only supports textual custom fields, not date? Because of that, we have any number of different combinations for dates...
08/11/07, 8-11-2007, 11 Aug 2007, 8/11/07 to name just a few.
What would be the easiest method to achieve what we want to do?
Now, Jack Bunce over at the .com site told me this...
For your purposes you will need a small plugin to access PHP's date functions. Otherwise it will be difficult to do proper date checking. If you have some coding ability then www.vbulletin.org is the place to ask about that.
As for the profile field... you can specify a regex for the profile field to require a specific date format. PHP's date functions can accept string dates of various formats. Unfortunately I don't have a regex for this.
I've had plenty of experience as a Mod/SuperMod with vB, but zero experience actually admining a vB forum in this capacity. So any guidance would be greatly appreciated. I have some competency with PHP, but don't understand regular expressions at all. Never have been able to grasp how to "decode" them.
--------------- Added 1209658540 at 1209658540 ---------------
Nothing?
1. The small cake icon appears in the postbit area with their name/join date/etc
2. Their skin changes for that day only to a "happy birthday" skin.
Now what we would like to do is also have users input their wedding date in their profile and then have, say, a wedding ring icon appear on their wedding day in place of the cake mentioned above (or some sort other icon for their anniversary).
Now, this is where we run into problems. We currently have users input their wedding date, but as near as we can find...vB only supports textual custom fields, not date? Because of that, we have any number of different combinations for dates...
08/11/07, 8-11-2007, 11 Aug 2007, 8/11/07 to name just a few.
What would be the easiest method to achieve what we want to do?
Now, Jack Bunce over at the .com site told me this...
For your purposes you will need a small plugin to access PHP's date functions. Otherwise it will be difficult to do proper date checking. If you have some coding ability then www.vbulletin.org is the place to ask about that.
As for the profile field... you can specify a regex for the profile field to require a specific date format. PHP's date functions can accept string dates of various formats. Unfortunately I don't have a regex for this.
I've had plenty of experience as a Mod/SuperMod with vB, but zero experience actually admining a vB forum in this capacity. So any guidance would be greatly appreciated. I have some competency with PHP, but don't understand regular expressions at all. Never have been able to grasp how to "decode" them.
--------------- Added 1209658540 at 1209658540 ---------------
Nothing?