boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

date won't show up

 
Post new topic   Reply to topic    boardom Forum Index -> Template help
View previous topic :: View next topic  
Author Message
sharpdust



Joined: 17 Feb 2004
Posts: 11

PostPosted: Fri Feb 20, 2004 4:22 am    Post subject: date won't show up Reply with quote

look at my site
http://www.nothinggoldcanstay.com

how come the date only shows up on some of the posts?
Back to top
View user's profile Send private message
Timi



Joined: 23 Jul 2003
Posts: 89
Location: Hungary

PostPosted: Fri Feb 20, 2004 10:35 pm    Post subject: Reply with quote

It won't post the date 2 or more times on the same day, only on the first post.
Back to top
View user's profile Send private message Visit poster's website
sharpdust



Joined: 17 Feb 2004
Posts: 11

PostPosted: Sat Feb 21, 2004 3:04 am    Post subject: Reply with quote

so how can i change this so it posts the date on every post?
Back to top
View user's profile Send private message
sharpdust



Joined: 17 Feb 2004
Posts: 11

PostPosted: Sun Feb 22, 2004 5:53 am    Post subject: Reply with quote

bump bump
Back to top
View user's profile Send private message
stevem



Joined: 15 Mar 2003
Posts: 369

PostPosted: Sun Feb 22, 2004 1:37 pm    Post subject: Reply with quote

You just need to comment out 2 lines in b2-include/b2template.functions.php. Look for
Code:
function the_date($d='', $before='', $after='', $echo = 1) {
   global $id, $postdata, $day, $previousday,$dateformat,$newday;
   $the_date = '';
   if ($day != $previousday) {
      $the_date .= $before;
      if ($d=='') {
         $the_date .= mysql2date($dateformat, $postdata['Date']);
      } else {
         $the_date .= mysql2date($d, $postdata['Date']);
      }
      $the_date .= $after;
      $previousday = $day;
   }
   $the_date = apply_filters('the_date', $the_date);
   if ($echo) {
      echo $the_date;
   } else {
      return $the_date;
   }
}
then comment out the line
Code:
   if ($day != $previousday) {
and, 6 lines below that,
Code:
   }
so that you get
Code:
function the_date($d='', $before='', $after='', $echo = 1) {
   global $id, $postdata, $day, $previousday,$dateformat,$newday;
   $the_date = '';
//   if ($day != $previousday) {
      $the_date .= $before;
      if ($d=='') {
         $the_date .= mysql2date($dateformat, $postdata['Date']);
      } else {
         $the_date .= mysql2date($d, $postdata['Date']);
      }
      $the_date .= $after;
      $previousday = $day;
//   }
   $the_date = apply_filters('the_date', $the_date);
   if ($echo) {
      echo $the_date;
   } else {
      return $the_date;
   }
}
Back to top
View user's profile Send private message
sharpdust



Joined: 17 Feb 2004
Posts: 11

PostPosted: Sun Feb 22, 2004 11:43 pm    Post subject: Reply with quote

awesome, thanks man
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Template help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group