I've been playing around with WP-Scrobbler, trying to get it to work properly for a blog with multiple authors. At the moment, I have it working for just one user (after some playing around with various code snippets), but I can't get the javascript used to show the tracks to show a second time.
As you can see on my blog, I have it set up so that only the first post under a specific category has the WP-Scrobbler code in it (check the third post down). Here's the code I used to get that to work (in the index.php template):
*snip*
<div id="content">
<?php
$apostnum = 1;
$bpostnum = 1;
$showscrobbler = 1;
?>
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<?php the_date('','<h2>','</h2>'); ?>
<div class="post">
<h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
<div class="storycontent">
<?php the_content(); ?>
<?php if(in_category('3')) {
if ($apostnum == $showscrobbler) {
get_scrobbler('ithilion','<a href="%url">%song - %artist (played on %date)','F dS',5,'ul');
}
$apostnum++; } ?>
</div>
*snip*
What I'd like to do is basically the same thing, except twice, with the second occuring under a different category with a different Audioscrobbler username. I've tried just calling the get_scrobbler function twice, with different variables depending on which category it's in, but it doesn't show up properly. I have a sneaking suspicion that it has something to do with the javascript file the WP-Scrobbler plugin uses not liking being used twice, though I'm not sure about that.
Does anyone have any ideas on how I might get around this (short of just duplicating the get_scrobbler function and renaming it something, the same with the javascript)?