1 (edited by arshen 2011-03-28 21:11)

Topic: how to change all date to jalali date (persian date)

hi,
how can i show all date in forum to jalali date (Persian date- or say shamsi)
what function i should be change it?
can i write extension for it?

thanks

2 (edited by dimkalinux 2011-03-28 18:36)

Re: how to change all date to jalali date (persian date)

Find

function format_time

in include/functions.php
This function format all date in forum.

Or maybe you change format date in forum admin settings.

3 (edited by arshen 2011-03-28 21:14)

Re: how to change all date to jalali date (persian date)

very thank, dimkalinux
i changed all date to "jalali" by adding this code:

require_once('jalali.php'); (on top of "function.php" file)

(jalali.php for download - http://vant.ir/jalali.php.zip )
and change all "gmdate" in format_time function to "jdate"

is that right?
if yes, how can i make an extension for this change?!

thank you again. smile

Re: how to change all date to jalali date (persian date)

Yes, u can create extensions.

Just use hooks in function format_time.

5 (edited by arshen 2011-03-29 20:15)

Re: how to change all date to jalali date (persian date)

dimkalinux wrote:

Just use hooks in function format_time

i write my first extension for PunBB. big_smile
this extension convert all forum date to jalali date.

http://vant.ir/jalali_date.zip

can any one check my extension and let me know do i have a right programing or no?