Example #1
0
			
			<p>
				<a href="<?php 
        book_url();
        ?>
"><img src="<?php 
        book_image();
        ?>
" alt="<?php 
        book_title();
        ?>
" /></a>
			</p>
			
			<?php 
        if (!is_custom_book()) {
            ?>
				<p>You can view this book's Amazon detail page <a href="<?php 
            book_url();
            ?>
">here</a>.</p>
			<?php 
        }
        ?>
			
			<?php 
        if (book_has_post()) {
            ?>
				<p>This book is linked with the post <a href="<?php 
            book_post_url();
            ?>
/**
 * Prints a URL to the book's Amazon detail page. If the book is a custom one, it will print a URL to the book's permalink page.
 * @param bool $echo Whether or not to echo the results.
 * @param string $domain The Amazon domain to link to. If ommitted, the default domain will be used.
 * @see book_permalink()
 * @see is_custom_book()
 */
function book_url($echo = true, $domain = null)
{
    global $book;
    $options = get_option('nowReadingOptions');
    if (empty($domain)) {
        $domain = $options['domain'];
    }
    if (is_custom_book()) {
        return book_permalink($echo);
    } else {
        $url = apply_filters('book_url', "http://www.amazon{$domain}/exec/obidos/ASIN/{$book->asin}/ref=nosim/{$options['associate']}");
        if ($echo) {
            echo $url;
        }
        return $url;
    }
}
Example #3
0
				<span class="icon">&nbsp;</span>
				<a href="<?php book_edit_url(); ?>">Edit this book</a>
			</div>

			<div class="manage">
				<span class="icon">&nbsp;</span>
				<a href="<?php manage_library_url(); ?>"><?php _e('Manage Books', 'suffusion');?></a>
			</div>
<?php
		}
?>
		</div>

		<div class="bookentry fix">
			<div class="stats">
				<a href="<?php book_url(); ?>" title="<?php if (!is_custom_book()) { ?>Buy <?php echo esc_attr(book_title(false));?> from Amazon<?php }?>"><img src="<?php book_image(); ?>" alt="<?php echo esc_attr(book_title(false)); ?>" /></a>
				<br />
				<p>
<?php
		if ($suf_nr_single_added_show == 'show') {
				echo $suf_nr_single_added_text;
				echo book_added(false);
?>
				</p>
				<p>
<?php
		}
		if ($suf_nr_single_started_show == 'show') {
			echo $suf_nr_single_started_text;
			echo book_started(false);
?>
Example #4
0
			<?php if( can_now_reading_admin() ) : ?>
			<p>Admin: &raquo; <a href="<?php manage_library_url() ?>">Manage Books</a> &raquo; <a href="<?php book_edit_url() ?>">Edit this book</a></p>
			<?php endif; ?>
			
			<?php library_search_form() ?>
			
			<p><a href="<?php library_url() ?>">&larr; Back to library</a></p>
			
			<h2><?php book_title() ?></h2>
			<p>By <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></p>
			
			<p>
				<a href="<?php book_url() ?>"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a>
			</p>
			
			<?php if( !is_custom_book() ): ?>
				<p>You can view this book's Amazon detail page <a href="<?php book_url() ?>">here</a>.</p>
			<?php endif; ?>
			
			<?php if( book_has_post() ): ?>
				<p>This book is linked with the post <a href="<?php book_post_url() ?>">&ldquo;<?php book_post_title() ?>&rdquo;</a>.</p>
			<?php endif; ?>
			
			<p>Tags: <?php print_book_tags(1) ?></p>
			
			<dl>
				<dt>Started reading:</dt>
				<dd><?php book_started() ?></dd>
				
				<dt>Finished reading:</dt>
				<dd><?php book_finished() ?></dd>