Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Suggestions for profile.php

Changes I made:

example: http://overnights.org/profile/2

style.css

#userinfo { margin: 10px 0 5px; width:45%; float:left;}

#userinfo dt { font-weight: bold; }

#userinfo dd { margin: 0 0 5px; }

#useractivity { margin: 10px 0 5px; width:45%; float:right;}

#useractivity dt { font-weight: bold; }

#useractivity dd { margin: 0 0 5px; }

profile.php

<?php bb_profile_data(); ?>

<div id="useractivity">

<h3><?php _e('User Activity') ?></h3>

<dt><?php _e('Recent Replies'); ?></dt>

<?php if ( $posts ) : ?>

<?php foreach ($posts as $bb_post) : $topic = get_topic( $bb_post->topic_id ) ?>

<dd><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a> <?php if ( $user->ID == $bb_current_user->ID ) _e('You last replied'); else _e('User last replied'); ?>: <?php bb_post_time(); ?> ago.

<?php

if ( strtotime(bb_get_post_time()) < strtotime(get_topic_time()) ) {

echo ' <span class="freshness">'. __('Most recent reply: ');

topic_time();

echo ' ago.</span>';

} else {

echo ' <span class="freshness">'. __('No replies since.') .'</span>';

}

?>

</dd>

<?php endforeach; ?>

<?php else : if ( $page ) : ?>

<?php _e('No more replies.') ?>

<?php else : ?>

<?php _e('No replies yet.') ?>

<?php endif; endif; ?>

<dt><?php _e('Threads Started') ?></dt>

<?php if ( $threads ) : ?>

<?php foreach ($threads as $topic) : ?>

<dd><a href="<?php topic_link(); ?>"><?php topic_title();

?></a> <?php printf(__('Started %s ago'), get_topic_start_time()) ?>

<?php

if ( strtotime(get_topic_start_time()) < strtotime(get_topic_time()) ) {

echo '<span class="freshness"> '. __('Most recent reply: ');

topic_time();

echo ' ago.</span>';

} else {

echo '<span class="freshness"> '. __('No replies.') .'</span>';

}

?>

</dd>

<?php endforeach; ?>

</div>

Skip to toolbar