PDA

View Full Version : enable choice of time & date format


Gaffer
11-17-2004, 04:03 AM
i have a pritty international Forum going...

now i live in Auz... and we use DD/MM/YYYY date format... but the webmaster of the forums likes the US format MM/DD/YYYY and it's quite annoying to me.... but i've lived with it up till now

this morning i had a request to remove 24hour time from the forums.... which i said NO to. then thought about it. and decided to post this thread.

i'd love to make this hack but i don't have the time to play with the code so i'm asking if anyone has seen a hack which will do this... or have there own.... or would someone make it.

Thank you

Gaffer

Xenon
11-17-2004, 03:27 PM
you don't really need a hack for that :)

just create two custom profile fields called Timeformat and date format, both edigtable by users

and then in your phpinclude_start put something like that:
// ############ Timeformat as uservalue #################
if (trim($bbuserinfo['field10']) != '')
{
$vboptions['timeformat'] = $bbuserinfo['field10'];
}
if (trim($bbuserinfo['field11']) != '')
{
$vboptions['dateformat'] = $bbuserinfo['field11'];
}

just change the field numbers :)

Gaffer
11-17-2004, 11:31 PM
thanks...

thats just what i was looking for

Andreas
11-17-2004, 11:37 PM
Or one could create different languages for all required formats :)

Gaffer
11-18-2004, 01:40 AM
that would take forever to do......

Xenon
11-18-2004, 06:04 PM
you're welcome Gaffer :)

@Kirby: hmm, so what if anyone wants to have a very exotic format? ^^

Andreas
11-18-2004, 06:20 PM
Then you would need a very exotic language ;)
I just wanted to point out that there are always different possibilities to achieve smth.

Xenon
11-18-2004, 09:47 PM
admit it, you just wanted to mention the way they did it on vb.com :p

Andreas
11-18-2004, 10:05 PM
Hehe, right - you got me