Info
- 9 posts
- 4 voices
- Started 4 years ago by electroniques
- Latest reply from chrishajer
- This topic is not resolved
1970 issue
-
- Posted 4 years ago #
Hey.
Usually it only displays the freshness of my forum's post, but when using the search function it also shows the date the post was created.
Unfortunately it show the year 1970.
Here's the link:
http://www.cmscentral.de/content/forum/search.php?q=FamilyDoes anyone know how to fix this?
Thanks in advance!
-
- Posted 4 years ago #
db table bb_topics -> row topic_time is datetime and picks time from server ? check if server time is correct .. maybe
did you add the topic manually?
-
- Posted 4 years ago #
I reported a similar problem for the bbPress plugin forum about 6 weeks ago, but there is no action on the ticket.
http://trac.bbpress.org/ticket/753
My guess is the template is calling the wrong time/timestamp function since it doesn't happen with the stock kakumei theme.
-
- Posted 4 years ago #
Could you post the
search.phpin your template? and check database to ensure the time is correct in database. -
- Posted 4 years ago #
Hey.
I checked the Database time and it is correct.
So it must be some theme/bbpress related error.
Here's my search.php:
<?php bb_get_header(); ?><h3 class="bbcrumb">"><?php option('name'); ?> » <?php _e('Search')?></h3>
<?php search_form( $q ); ?><?php if ( !empty ( $q ) ) : ?>
<h2><?php _e('Search for')?> “<?php echo wp_specialchars($q); ?>”</h2>
<?php endif; ?><?php if ( $users ) : ?>
<h2><?php _e('Users')?></h2>-
<?php foreach ( $users as $user ) : ?>
- ID); ?>"><?php echo get_user_name( $user->ID ); ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if ( $titles ) : ?>
<h2><?php _e('Thread title matches')?></h2>-
<?php
- <h4>"><?php topic_title(); ?></h4>
<small><?php printf(__(' %1$d replies — Last reply: %2$s'), $count, get_topic_date(__('F j, Y'), $topic->topic_id) ) ?> </small>
foreach ( $titles as $topic ) :
$count = $topic->topic_posts;
?><?php endforeach; ?>
<?php endif; ?>
<?php if ( $recent ) : ?>
<h2><?php _e('Recent Posts')?></h2>
<ol class="results">
<?php foreach ( $recent as $bb_post ) : ?>- <h4>"><?php topic_title($bb_post->topic_id); ?></h4>
<p><?php echo show_context($q, $bb_post->post_text); ?></p>
<p><small><?php _e('Posted') ?> <?php echo date(__('F j, Y, h:i A'), bb_get_post_time()); ?></small></p><?php endforeach; ?>
<?php endif; ?>
<?php if ( $relevant ) : ?>
<h2><?php _e('Relevant posts')?></h2>
<ol class="results">
<?php foreach ( $relevant as $bb_post ) : ?>- <h4>"><?php topic_title($bb_post->topic_id); ?></h4>
<p><?php echo show_context($q, $bb_post->post_text); ?></p>
<p><small><?php _e('Posted') ?> <?php echo date(__('F j, Y, h:i A'), bb_get_post_time()); ?></small></p><?php endforeach; ?>
<?php endif; ?>
<?php if ( !$topics && !$recent && !$relevant && !users) : ?>
<p><?php _e('No results found.') ?></p>
<?php endif; ?>
<p><?php printf(__('You may also try your search at Google'), bb_get_option('uri'), urlencode($q)) ?></p>
<?php bb_get_footer(); ?>
</code -
- Posted 4 years ago #
Hey.
Yes, that's it.
Works like a charm now!
And yes again, I'm using 0.8.3, but switching to a different theme is close to impossible since I have modified it so heavily to match my WordPress-Blog.Thanks a lot!
-
- Posted 4 years ago #
I see.
There are some useless code insearch.php, like $users and $titles. They are not used in 0.8.3. If you can't switch to an updated template, then you should diff to find out what has been changed. -
- Posted 4 years ago #
Now the plugin browser theme just needs to be fixed :)
-
You must log in to post.