TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 01:18:35 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 101
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 71
  • Total: 71

Articles - Format de date

Started by Uthn, June 23, 2009, 10:08:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Uthn

Bonjour à tous,

Je suis en cours de test sur la version 1.04 de TP (j'ai un site live en 0.9.8 / 1.1.9) et j'ai un petit soucis concernant la mise en forme des dates de publication des articles lors de l'affichage sur la page d'accueil. Il semble que le format par défaut des dates dans TP soit le format Américain (M/dd/YY) alors que l'ancienne version appliquait bien le format de la langue en cours du site (dd/M/YY pour le format Français il me semble).

Quelqu'un aurait-il une idée pour modifier le format ?

merci d'avance

P.S Je joins des captures en cas de besoin

ZarPrime

Bonjour Uthn,

Donnez-moi quelques minutes pour vérifier le gestionnaire de bugs sur cette question. Je pense qu'il y mai ont été un rapport sur ce bug.

Dans l'intervalle, puis-je avoir un lien vers votre site d'essai, afin que je puisse voir dans cette action?

ZarPrime

In English ...

Hello Uthn,

Give me a few minutes to check the bugtracker on this.  I think there may have been a bug reported on this.

In the meantime, can I have a link to your test site, so that I can see this in action?

ZarPrime

Uthn

#2
Hello,

Thanks for the answer ZarPrime. Sure, there you go :

thanks again.

ZarPrime

Uthn,

Si vous avez besoin pour moi de traduire cela, faites le moi savoir et je vais essayer de le faire.

I can't see anything on your live site, but I know what issue you are talking about now.  You might be surprised to find out that this is an issue that we discussed on the Team Board about 2 months ago.  Another member had the same question except it was on the German Board ;D.

We briefly discussed it but because that member was only the first person to actually mention this, nothing has yet been decided as to how to give the option to an Admin to set the Date Format as you would like to set it.  Since you are the second person in about 2 months to ask the same thing, I have re-opened this discussion on the Team Board but we will have to wait to see what Bloc says and how he wants to handle it.  There was a discussion that perhaps a selector in TinyPortal settings to allow the short date format to be selected could be added.

At this time, we will have to wait for a little while, perhaps a week or so, to see how Bloc responds.  If you don't hear back from me in this topic in a week or so, bump the topic with another post, and I'll check on it.

ZarPrime

Uthn

Thanks for the answer ZarPrime,

I promise i'll be less 'picky' in the future  ;D Not a big issue anyway, i'll bump the thread as suggested if needed ;)

regards,

ZarPrime

Uthn,

I have placed this into the bugtracker as a feature request ...
http://www.tinyportal.net/index.php?action=bugtracker;sa=bug527

ZarPrime

MkC

#6
Bonjour,

D'abord merci de parler Français dans cette section, sans quoi il ne faudra pas reprendre les personnes qui postent en français sur la partie anglaise de ce forum!

Ouvrir un ticket support pour ça c'est franchement inutile.
Editer le fichier TPBlocks.template.php et rechercher:
Quote
   $ntime='
         <span class="tp_month">' . $txt['months_short'][date("n", $story['timestamp'])] . '</span>
         <span class="tp_thindivider"> 
         </span><span class="tp_day">'. date("d",$story['timestamp']) . '</span>
         <span class="tp_year"> '. date("Y",$story['timestamp']) . '</span>';
Nous avons en vert le mois, en rouge le jour et en orange l'année
Donc il suffit de remplacer par ça
Quote
   $ntime='
         </span><span class="tp_day">'. date("d",$story['timestamp']) . '</span>
         <span class="tp_thindivider"> 
         <span class="tp_month">' . $txt['months_short'][date("n", $story['timestamp'])] . '</span>
         <span class="tp_year"> '. date("Y",$story['timestamp']) . '</span>';

Les lignes concernées sont les lignes:

  • 1256 à 1260
  • 1367 à 1371
  • 1476 à 1480
  • 1584 à 1588
  • 1706 à 1709
Pour la ligne 1706, le code à rechercher est
Quote
   $ntime='
         ' . $txt['months_short'][date("n", $story['timestamp'])] . '
         '. date("d",$story['timestamp']) . '
         '. date("Y",$story['timestamp']);

et à remplacer par
Quote
   $ntime='
         '. date("d",$story['timestamp']) . '
         ' . $txt['months_short'][date("n", $story['timestamp'])] . '
         '. date("Y",$story['timestamp']);

2 mois pour ça faut quand même pas pousser ça m'a pris 10 minutes, mais c'est parce que c'est mal codé......