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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 06:32:06 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 245
  • Total: 245

Datumsformat Startseite auf eingeblendeten Forenbeiträgen falsch

Started by peweb, April 28, 2009, 10:31:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peweb

Wenn ich auf der Portalseite Artikel und Forenbeiträge anzeige ist in deren Titelzeile das Datumsformat nicht richtig.

Falsch:  "Apr 28  2009  Testeintrag"
richtig:  "28 Apr 2009 Testeintrag

Ich finde keine Möglichkeit das zu ändern. Das Format oben rechts im SMF ist ok.

Hat jemand eine Idee?

SMF 1.1.8
TPTinyPortal v1.0 beta 3


ZarPrime

Hallo peweb,

Willkommen in TinyPortal.

Natürlich ist dies eine Funktion von SMF und TinyPortal.

Sie haben die Möglichkeit, die Standard-Format für das Forum zu, was Sie wollen. Es kann unter Admin -> Konfiguration -> Funktionen und Optionen -> Basic-Optionen.

Das Format wird mit der folgenden Zeichen ...
Die folgenden Zeichen werden in der Format-String:
   % a - abgekürzter Name des Wochentags
   % A - ausgeschriebener Name des Wochentags
   % b - abgekürzter Name des Monats
   % B - ausgeschriebener Name des Monats
   % d - Tag des Monats (01 bis 31)
   % D * - so wie %m/%d/%y
   % e * - Tag des Monats (1 bis 31)
   % H - Stunde mit einem 24-Stunden-Format (Bereich 00 bis 23)
   % I - Stunde mit einem 12-Stunden-Format (Bereich 01 bis 12)
   % m - Monat als Zahl (01 bis 12)
   % M - Minute als Zahl
   % p - entweder "am" oder "pm" entsprechend der vorgegebenen Zeit
   % R * - Zeit in der 24-Stunden-Formatierung
   % S - Sekunden als Dezimal-Wert
   % T * - aktuelle Zeit, genau wie %H:%M:%S
   % y - 2-stellige Jahr (00 bis 99)
   % Y - 4-stellige Jahr
   % Z - Zeitzone, Name oder eine Abkürzung
   %% - Ein Zeichen '%'

* Funktioniert nicht auf Windows-basierten Servern.

Zum Beispiel, wenn Ihr Forum Standard-Zeit wird für "%A, %B %d, %Y - %I:%M:%S %p", dann das aktuelle Datum und die Uhrzeit (rechts jetzt, wie ich dieser Art) auf dem Forum wird gezeigt, wie "Mittwoch, April 29, 2009 - 03:27:48 AM". So ändern Sie es einfach sein ", 28. April 2009", würden Sie die Standard-Zeit-Format zu "% d% B,% Y".

Jedes Mitglied des Forums können auch das Datum und die Uhrzeit-Format, was ihre Präferenz ist. Dies kann auf individueller Basis in die Profilseite des Mitglieds unter Profil ändern -> Aussehen und Layout-Einstellungen.

Ist das die Informationen, die Sie gesucht haben?

ZarPrime

Hello peweb,

Welcome to TinyPortal.

Of course this is a function of SMF and TinyPortal.

You have the ability to change the default time format for the Forum to whatever you like.  It can be set under Admin --> Configuration --> Features and Options --> Basic Options.

The format is set using the following characters ...
The following characters are recognized in the format string:
  %a - abbreviated weekday name
  %A - full weekday name
  %b - abbreviated month name
  %B - full month name
  %d - day of the month (01 to 31)
  %D* - same as %m/%d/%y
  %e* - day of the month (1 to 31)
  %H - hour using a 24-hour clock (range 00 to 23)
  %I - hour using a 12-hour clock (range 01 to 12)
  %m - month as a number (01 to 12)
  %M - minute as a number
  %p - either "am" or "pm" according to the given time
  %R* - time in 24 hour notation
  %S - second as a decimal number
  %T* - current time, equal to %H:%M:%S
  %y - 2 digit year (00 to 99)
  %Y - 4 digit year
  %Z - time zone or name or abbreviation
  %% - a literal '%' character

* Does not work on Windows-based servers.

For instance, if your Forum default time is set for "%A, %B %d, %Y - %I:%M:%S %p" then today's date and time (right now as I type this) on the Forum will be shown as "Wednesday, April 29, 2009 - 03:27:48 AM".  To change it to just be "28 April, 2009", you would set the default time format to be "%d %B, %Y".

Each member of your Forum may also change their date and time format to whatever their preference is.  This can be done on an individual basis in the member's profile under Modify Profile --> Look and Layout Preferences.

Is this the information you were looking for?

ZarPrime

peweb

Vielen Dank für ihre Antwort


Nein, das meinte ich nicht.........

Die Datumsanzeige im Forum ist ok
siehe pic1 und pic2


Die dargestellten Forenbeiträge auf der STARTSEITE des Tinyportal sind falsch.
siehe pic3

ZarPrime

Hi peweb,

OK, ich sehe, was du sprichst jetzt. Zu dieser Zeit, ich bin mir nicht sicher, ob dies geändert werden kann. Gebt mir ein paar Tage, um in diesem wie ich haben zu prüfen, mit Block, um festzustellen, ob eine Option, um das Datum in das Format von Themen auf der ersten Seite von einem Nachrichtenforum können hinzugefügt werden.

Ich werden Ihnen hier, sobald ich die Antwort kennen.

ZarPrime

English Translation ...

Hi peweb,

OK, I see what you are talking about now.  At this time, I am not sure whether this can be changed.  Give me a couple of days to look into this as I'm going to have to check with Bloc to see if an option to change the date format of topics posted on the front page from a news board can be added.

I will get back to you here as soon as I know the answer.

ZarPrime

peweb


MkC

Für das Format des Datums

Die Datei herausgeben TPBlocks.template.php und suchen:
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>';

Grün der Monat
Rot am Tag
Orange das Jahr

Von ersetzen
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>';

Die betroffenen Linien sind die Linien:

  • 1256 in 1260
  • 1367 in 1371
  • 1476 in 1480
  • 1584 in 1588
  • 1706 in 1709
Für die Linie 1706 ist der zu suchende Kode
Quote
   $ntime='
         ' . $txt['months_short'][date("n", $story['timestamp'])] . '
         '. date("d",$story['timestamp']) . '
         '. date("Y",$story['timestamp']);

Und von zu ersetzen
Quote
   $ntime='
         '. date("d",$story['timestamp']) . '
         ' . $txt['months_short'][date("n", $story['timestamp'])] . '
         '. date("Y",$story['timestamp']);

Source : http://www.tinyportal.net/index.php/topic,30035.msg239779.html#msg239779


French version
Pour le format de la date

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>';

Vert le mois
Rouge le jour
Orange l'année

Remplacer par
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']);

Source : http://www.tinyportal.net/index.php/topic,30035.msg239779.html#msg239779