Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Favorites on wordpress profile

here is the hacked code.. this will show the favorites on profile page in the admin section of wordpress. I haven’t tested it but this is the basic idea.

please note that the wordpress must be integrated both ways before you can do this. visit this for more

add_action('show_user_profile',
'my_plugin_show_favorites');

function my_plugin_show_favorites() {
$topics = get_user_favorites( $user->ID, true );
?>
<br clear="all" />

<table width="99%" border="0"
cellspacing="2" cellpadding="3">
<tr>
<th><?php _e('Topic'); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Freshness'); ?></th>
<th><?php _e('Remove'); ?></th>
</tr>

<?php foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>">
<?php topic_title(); ?></a></td>
<td class="num"><?php
topic_posts();
?></td>
<td class="num"><small><?php
topic_time();
?></small></td>
<td class="num">[<?php
user_favorites_link(
'',
array('mid'=>'x'),
$user_id
);
?>]</td>
</tr>
<?php endforeach; ?>
</table>

<div class="nav">
<?php favorites_pages(); ?>
</div>
<?php

}

Skip to toolbar