Welcome, Guest. Please Login or Register.
April 25, 2024, 03:54:30 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Language Specific User Help  |  Svenska/Norsk/Dansk  |  Tids-format « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Tids-format  (Read 7299 times)
ParagonDK
Noobie
*
Posts: 8


I'm a llama!

Tids-format
« on: August 20, 2002, 02:51:46 PM »
Reply with quote

Jeg ville meget gerne lave tidsformatet om, så der ikke står "August 19th" og sådan i posts på mit board.

Hvordan gør jeg det?


Mere: Hvordan laver jeg tidsstandarden om fra mm-dd-yy til dd-mm-yy ??

Jeg håber I kan hjælpe!
Logged
mats
Full Member
***
Posts: 219


You have more company with a penguin than a window

Re:Tids-format
« Reply #1 on: August 20, 2002, 09:56:33 PM »
Reply with quote

För visning för gäster i foruminställningar
För dig själv i din egen profil

Time Format
You have the power to adjust how the time and date look for yourself. There are a lot of little letters, but it's quite simple. The conventions follow PHP's strftime function and are described as below (more details can be found at php.net).

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
Logged

Support Specialist Level 2  YaBBSP1.3.1
ParagonDK
Noobie
*
Posts: 8


I'm a llama!

Re:Tids-format
« Reply #2 on: August 20, 2002, 10:27:59 PM »
Reply with quote

Oh my God, I don't understand any of this...

Jeg er ikke nogen programmør, men jeg regnede med at man kunne ændre i én af filerne i "sources"?

Hvor er det jeg skal redigere de koder ind henne?
Logged
mats
Full Member
***
Posts: 219


You have more company with a penguin than a window

Re:Tids-format
« Reply #3 on: August 21, 2002, 05:18:35 AM »
Reply with quote

QuoteFör visning för gäster i foruminställningar
För dig själv i din egen profil
Logged

Support Specialist Level 2  YaBBSP1.3.1
Daniel Hofverberg
YaBB God
*****
Posts: 582


WWW
Re:Tids-format
« Reply #4 on: August 21, 2002, 07:20:32 AM »
Reply with quote

Ett exempel på ett vettigt tidsformat för Skandinavien är:

%A %e %B %Y %H:%M:%S

Vilket ser ut i stil med:
Onsdag 21 augusti 2002 13:44:08

Och som sagt, ändra standardformatet för besökarna under Foruminställningar i adminavdelningen. Det gäller då för gäster och alla medlemmar som inte ändrar formatet i sin profil.
Logged
ParagonDK
Noobie
*
Posts: 8


I'm a llama!

Re:Tids-format
« Reply #5 on: August 21, 2002, 08:26:10 AM »
Reply with quote

Det er for visning til gæster i forummet.

Jeg har nu søgt alle mine .pl filer igennem, og ingen af dem indeholder noget kode i stil med %a, %A eller lignende.

Jeg beklager meget at være så sløv, men det er altså svært at forstå når man ikke kan programmere.

Hvor præcis er det jeg skal redigere henne for at ændre udseendet? Inde fra forum-indstillingerne virker det slet ikke, lige meget hvilken type jeg vælger så bruger den dette (eksempel) august 20th, 2002, 11:31pm

Jeg skal have flyttet 20th foran August på én eller anden måde...
Logged
ParagonDK
Noobie
*
Posts: 8


I'm a llama!

Re:Tids-format
« Reply #6 on: August 21, 2002, 08:31:21 AM »
Reply with quote

Jeg tror måske det er denne kode i subs.pl, men jeg er ikke sikker:

} elsif ($mytimeselected == 4) {
      $newmonth--;
      $ampm = $newhour >11 ? 'pm' : 'am';
      $newhour2 = $newhour % 12 || 12;
      $newmonth2 = $months[$newmonth];
      if( $newday > 10 && $newday < 20 ) { $newday2 = '<sup></sup>'; }
      elsif( $newday % 10 == 1 ) { $newday2 = '<sup></sup>'; }
      elsif( $newday % 10 == 2 ) { $newday2 = '<sup></sup>'; }
      elsif( $newday % 10 == 3 ) { $newday2 = '<sup></sup>'; }
      else{ $newday2 = '<sup>th</sup>'; }
      $newformat = qq~$newmonth2 $newday$newday2, $newyear, $newhour2:$newminute$ampm~;
      if ($mm == $newmonth + 1 && $dd == $newday && $yy == $newshortyear && $dontusetoday == 0) { $newformat = qq~<b>$txt{'769'}</b> $txt{'107'} $newhour2:$newminute$ampm~; }
      return $newformat;

   } elsif ($mytimeselected == 5) {
      $ampm = $newhour > 11 ? 'pm' : 'am';
      $newhour2 = $newhour % 12 || 12;
      $newformat = qq~$newmonth/$newday/$newshortyear $txt{'107'} $newhour2:$newminute$ampm~;
      if ($mm == $newmonth && $dd == $newday && $yy == $newshortyear && $dontusetoday == 0) { $newformat = qq~<b>$txt{'769'}</b> $txt{'107'} $newhour2:$newminute$ampm~; }
      return $newformat;

   } elsif ($mytimeselected == 6) {
      $newmonth2 = $months[$newmonth-1];
      $newformat = qq~$newday. $newmonth2 $newyear $txt{'107'} $newhour:$newminute~;
      if ($mm == $newmonth && $dd == $newday && $yy == $newshortyear && $dontusetoday == 0) { $newformat = qq~<b>$txt{'769'}</b> $txt{'107'} $newhour:$newminute~; }
      return $newformat;

Spørgsmålet er hvad jeg skal ændre til hvad?
Logged
Daniel Hofverberg
YaBB God
*****
Posts: 582


WWW
Re:Tids-format
« Reply #7 on: August 21, 2002, 03:19:59 PM »
Reply with quote

Du behöver inte ändra i någon av filerna i Sources.

Gå in i admin-sektionen. Gå in på Foruminställningar (i engelska versionen "Forum Preferences and Settings"). Bläddra ner till Standardtidsformat ("Default Time Format"). Skriv in detta:

%A %e %B %Y %H:%M:%S

Gå ut ur admin-sektionen och tillbaka till vanliga forumet. Om du fortfarande inte ser det rätt, gå in i din profil (Profile) och se till så att "Tidsformat" är tomt.

För övrigt finns det ingen Subs.pl-fil, bara Subs.php. Om du verkligen har en sådan fil så är det YaBB Gold du använder, och inte YaBB SE (vilket det här i så fall är fel forum att fråga på)...
Logged
mats
Full Member
***
Posts: 219


You have more company with a penguin than a window

Re:Tids-format
« Reply #8 on: August 21, 2002, 09:19:14 PM »
Reply with quote

Kan hända att du behöver uppdatera sidan i din läsare innan du ser ändringen plua att du måste logga ut för att se det som gäst.
Kolla så att ändringen i forum inställningar har sparats
Logged

Support Specialist Level 2  YaBBSP1.3.1
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Language Specific User Help  |  Svenska/Norsk/Dansk  |  Tids-format « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.035 seconds with 20 queries.