View previous topic :: View next topic |
Author |
Message |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Sat May 24, 2003 11:25 am Post subject: Date Appear Once |
|
|
Does anyone know how does b2 makes the date appear once a day?
Maybe an explaination of the code would help me. =D _________________
++ GamerZ.Per.Sg - Complex Simplicity |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 353
|
Posted: Sat May 24, 2003 9:07 pm Post subject: |
|
|
It's the function the_date() in b2-include/b2template.functions.php
In particular the lines Code: | $the_date = '';
if ($day != $previousday) {
$the_date .= $before;
... (code to get the date)
$the_date .= $after;
$previousday = $day;
}
|
means that the variable $the_date is blank unless the current day is not the same as the previous day ie a day has gone by.
$the_date is then either returned or printed. |
|
Back to top |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Sun May 25, 2003 8:47 am Post subject: |
|
|
stevem wrote: | It's the function the_date() in b2-include/b2template.functions.php
In particular the lines Code: | $the_date = '';
if ($day != $previousday) {
$the_date .= $before;
... (code to get the date)
$the_date .= $after;
$previousday = $day;
}
|
means that the variable $the_date is blank unless the current day is not the same as the previous day ie a day has gone by.
$the_date is then either returned or printed. | Thanks, I got it. _________________
++ GamerZ.Per.Sg - Complex Simplicity |
|
Back to top |
|
 |
|