comicpress-core/classes/widgets/BookmarkWidget.inc

35 lines
1.1 KiB
PHP
Raw Normal View History

2009-07-13 02:41:36 +00:00
<?php
class ComicPressAddonBookmarkWidget {
2009-07-15 02:24:31 +00:00
function init($comicpress) {
2009-07-13 02:41:36 +00:00
wp_register_sidebar_widget('comic-bookmark', __('Comic Bookmark', 'comicpress'), array(&$this, 'render_widget'), array('description' => __('Let your readers save their place via a cookie.', 'comicpress')));
2009-07-15 02:24:31 +00:00
$this->comicpress = $comicpress;
add_action('wp_head', array(&$this, 'wp_head'));
wp_enqueue_script('prototype');
wp_enqueue_script('cookiejar', get_template_directory_uri() . '/js/cookiejar.js', array('prototype'));
2009-08-23 21:18:36 +00:00
wp_enqueue_script('bookmark', get_template_directory_uri() . '/js/bookmark.js', array('prototype', 'cookiejar'));
2009-07-15 02:24:31 +00:00
}
2009-08-23 21:18:36 +00:00
function wp_head() { ?>
<script type="text/javascript">
var image_root = '<?php bloginfo('template_directory'); ?>/images/';
var permalink = '<?php the_permalink() ?>';
</script>
<?php }
2009-07-13 02:41:36 +00:00
function render_widget() {
2009-07-15 02:24:31 +00:00
?>
<div id="comic-bookmark-holder">
<a href="#" class="tag-page"><img src="<?php bloginfo('template_directory'); ?>/images/1.gif" /></a>
<a href="#" class="goto-tag"><img /></a>
<a href="#" class="clear-tag"><img /></a>
2009-07-15 02:24:31 +00:00
</div>
<?php
2009-07-13 02:41:36 +00:00
}
}
2009-08-29 15:13:18 +00:00
?>