<?php
global $bp, $post, $gp_settings;
require(ghostpool_inc . 'options.php');
$dedications = bp_dedication_get_dedications_to_user( $bp->displayed_user->id );
?>

<?php foreach ($dedications as $post) : ?>
    <?php setup_postdata($post); ?>

    <?php 
	$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width;
	$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height;
    ?>

    <?php include(dirname(__FILE__).'/../../loop-dedication-data.php'); ?>

    <div <?php post_class('post-loop'); ?>>
        <!--Begin Image-->
        <?php if (has_post_thumbnail()) { ?>					
            <div class="post-thumbnail<?php if ($gp_settings['image_wrap'] == "Disable") { ?> thumbnail-no-wrap<?php } ?>">					
                <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
                    <?php $image = vt_resize(get_post_thumbnail_id(), '', $gp_settings['image_width'], $gp_settings['image_height'], true); ?>
                    <img src="<?php echo $image[url]; ?>" alt="<?php if (get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) {
                echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
            } else {
                echo get_the_title();
            } ?>" />		
                </a>				
            </div>					
    <?php } ?>
        <!--End Image-->

        <!--Begin Post Text-->
        <div class="post-text">
            <h2><a href="<?php the_permalink(); ?>" title="<?php echo $gp_settings['artist_song']; ?>"><span><?php echo $gp_settings['artist']; ?></span>.&nbsp;<?php echo $gp_settings['song']; ?></a></h2>
    <?php echo $gp_settings['to_flag']; ?>
            <span>TO: <?php echo $gp_settings['to_user_link']; ?></span>
        </div>
        <!--End Post Text-->

    </div> 

<?php endforeach; ?>                            
<?php wp_reset_postdata(); ?>                            
