View Single Post
Old 12-04-2012, 05:38 AM   #173
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 312
Karma: 9313
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Sorry but I didn't have any problem with your example (or I didn't undestand it).

I changed the handling of covers in index.php to

Code:
<a rel="group" data-title-id="title-<?php echo $entry->book->id ?>" class="fancycover" href="<?php echo $entry->getCover () ?>"><img src="<?php echo $entry->getCoverThumbnail () ?>" alt="cover" /></a>
                <div id="title-<?php echo $entry->book->id ?>" style="display: none">
                    <?php echo htmlspecialchars ($entry->title) . " (" . date ('Y', $entry->book->pubdate) . ") " ?> <a href="http://google.com">Some link</a>
                </div>
I also changed the javascript handling the fancybox (in index.php also) :

Code:
$(".fancycover").fancybox({
                beforeLoad: function() {
                    var el, id = $(this.element).data('title-id');

                    if (id) {
                        el = $('#' + id);
                    
                        if (el.length) {
                            this.title = el.html();
                        }
                    }
                },
                'type' : 'image',
                prevEffect		: 'none',
                nextEffect		: 'none'
                <?php if ($isEink) echo ", openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
            });
And there is a title below every book cover with a google link. I only tested with Firefox.
vlad59 is offline   Reply With Quote