************************************
Nom de la mod :
Dates en Francais V2.1
Version IPB :
2.1.x
Uniquement
Auteur IPBR-FR :
Prolag
************************************
Fichiers altérés :
- sources/ipsclass.php
-
sources/admin/admin_function.php
- sources/profile.php
- sources/calendar.php
************************************
Modifications :
************************************
- Fichier sources/ipsclass.php
après
CODE
function
get_date($date, $method, $norelative=0, $full_relative=0)
{
Ajouter
CODE
setlocale(LC_TIME,
'french');
remplacer
CODE
return
gmdate($this->time_options[$method], ($date +
$this->offset) );
par
CODE
return
gmstrftime($this->time_options[$method], ($date +
$this->offset) );
remplacer
CODE
return
str_replace( '{--}', $this->lang['time_today'],
gmdate($this->vars['time_use_relative_format'], ($date +
$this->offset) ) );
par
CODE
return
str_replace( '{--}', $this->lang['time_today'],
gmstrftime($this->vars['time_use_relative_format'], ($date +
$this->offset) ) );
remplacer
CODE
return str_replace( '{--}',
$this->lang['time_yesterday'],
gmdate($this->vars['time_use_relative_format'], ($date +
$this->offset) ) );
par
CODE
return str_replace( '{--}',
$this->lang['time_yesterday'],
gmstrftime($this->vars['time_use_relative_format'], ($date +
$this->offset) ) );
remplacer
CODE
return
gmdate($this->time_options[$method], ($date +
$this->offset) );
par
CODE
return
gmstrftime($this->time_options[$method], ($date +
$this->offset)
);
remplacer (exactement pareil que ci dessus)
CODE
return
gmdate($this->time_options[$method], ($date +
$this->offset) );
par
CODE
return
gmstrftime($this->time_options[$method], ($date +
$this->offset)
);
Fermer le fichier
- fichier
sources/lib/admin_function.php
rechercher la fonction get_date
remplacer
CODE
return
gmdate($this->time_options[$method], ($date +
$this->time_offset)
);
par
CODE
setlocale(LC_TIME,
'french');
return gmstrftime($this->time_options[$method], ($date +
$this->time_offset) );
Fermer le fichier
- fichier
sources/action_public/profile.php
remplacer
CODE
$info['local_time'] =
$member['time_offset'] != "" ? gmdate(
$this->ipsclass->vars['clock_long'], time() +
($member['time_offset']*3600) +
($this->ipsclass->vars['time_adjust'] * 60) ) :
$this->ipsclass->lang['no_info'];
par
CODE
setlocale(LC_TIME,
'french');
$info['local_time']
= $member['time_offset'] != "" ? gmstrftime(
$this->ipsclass->vars['clock_long'], time() +
($member['time_offset']*3600) + ($this->ipsclass->vars['time_adjust']
*
60) ) : $this->ipsclass->lang['no_info'];
Fermer le fichier
- Fichier
sources/action_public/calendar.php
remplacer
CODE
if (
$event['event_recurring'] == 0 AND $event['event_unix_to'] )
{
$type =
$this->ipsclass->lang['se_range'];
$de = $this->ipsclass->lang['se_ends'].' '.gmdate(
$this->ipsclass->vars['clock_joined'], $event['event_unix_to'] );
}
else if (
$event['event_recurring'] == 1 )
{
$type =
$this->ipsclass->lang['se_recur'];
$de = $this->ipsclass->lang['se_ends'].' '.gmdate(
$this->ipsclass->vars['clock_joined'], $event['event_unix_to'] - $set_offset );
}
par
CODE
setlocale(LC_TIME, 'french');
if (
$event['event_recurring'] == 0 AND $event['event_unix_to'] )
{
$type =
$this->ipsclass->lang['se_range'];
$de = $this->ipsclass->lang['se_ends'].'
'.gmstrftime( $this->ipsclass->vars['clock_joined'],
$event['event_unix_to'] );
}
else if (
$event['event_recurring'] == 1 )
{
$type =
$this->ipsclass->lang['se_recur'];
$de = $this->ipsclass->lang['se_ends'].'
'.gmstrftime( $this->ipsclass->vars['clock_joined'],
$event['event_unix_to'] - $set_offset );
}
Fermer le fichier
************************************
Configuration :
************************************
Dans le PCADMIN => System Settings => Date & Time
Formats :
QUOTE
Short
time format
=> %A %d %B %Y à %H:%M
Join date time format => %d/%m/%Y
Long time format =>
%A %d %B %Y à
%H:%M
Relative time format => {--}, %H:%M
Vous aurez
QUOTE
Short
time format => samedi
25 septembre 2004 à 17:28
Join date time format => 17/04/2004
Long time format => dimanche 26 septembre 2004
à 12:32
Pour modifier ces parametres
http://fr.php.net/manual/fr/function.strftime.php
************************************
Optionnel :
************************************
- Pour avoir des Majuscules
pour les jours et mois !
Fichier sources/functions.php
remplacer
CODE
return
gmstrftime($this->time_options[$method], ($date +
$this->offset)
);
par
CODE
return
ucwords(gmstrftime($this->time_options[$method], ($date +
$this->offset) ));
remplacer (exactement pareil que ci dessus)
CODE
return
gmstrftime($this->time_options[$method], ($date +
$this->offset)
);
par
CODE
return
ucwords(gmstrftime($this->time_options[$method], ($date +
$this->offset) ));
- Pour avoir à la
place des : un h (Hier, à 12:32
=> Hier, 12h32)
Il suffit dans le Pcadmin de remplacer les : par des h ;)
************************************
Html by Chatdo
http://www.ipbr-fr.com
************************************