johannes.jarolim.com/yapb-forum

Full Version: Eight Thumbnails in Sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Shae

How does one generate recent thumbnails like the eight shown in the sidebar at http://johannes.jarolim.com/blog/ ?

Thanks!
Shae

Guest

I've been experimenting with this, and I have discovered that if I put:
Code:
<?php
$posts = get_posts('numberposts=5');
foreach($posts as $post) :
setup_postdata($post);
?>
...
<!-- install for yapb thumbails -->
<?php if (!is_null($image = YapbImage::getInstanceFromDb($post->ID))): ?>
<img src="<?php echo $image->getThumbnailHref(array('w=90','fltr[]=usm|30|0.5|3')) ?>" width="90" >
<?php endif ?>
<!-- install for yapb thumbails -->
...
<?php endforeach; ?>

in my sidebar, it shows me thumbs but the images disappear from the post itself. If I put:

Code:
<!-- install for yapb thumbails -->
<?php if (!is_null($image = YapbImage::getInstanceFromDb($post->ID))): ?>
<img src="<?php echo $image->getThumbnailHref(array('w=90','fltr[]=usm|30|0.5|3')) ?>" width="90" >
<?php endif ?>
<!-- install for yapb thumbails -->

alone, I only get one thumbnail.

What should I do to get eight (or so) recent thumbnails in the sidebar without robbing the main posts of their images?

thanks!

Shae

Forgot to mention that I also have no idea how to get those thumbnails clickable and linked to the proper post. I have no archive.php file in the theme I'm using so I couldn't use a solution I found in the comments on the FAQ.

It seems like it should be a simple thing but I just can't find this info anywhere. If anyone could help it would be greatly appreciated.
Please have a look at the 2.7 (aka "happy new year") release.

Greets from Salzburg,

Johannes

Shae

Could I get a link, please?

I don't see it at http://johannes.jarolim.com/blog/wordpre...tallation.

Thanks,
Shae

Guest

OK, so I'm starting to get the idea that pulling the most recent 6 photos and displaying them dynamically as thumbnails in a sidebar is not possible. I've seen dozens of threads asking about how to do this, and no solution, and no offer of a compatible theme that does it. Are the thumbs in http://johannes.jarolim.com hard-coded or something?

If so, please let me know so I can stop pursuing this.

If not, it seems to be a very popular question -- can we get a comprehensive answer somewhere? What theme to start with, what snippet to add and where to put it, that sort of thing?

It's a cool plugin but it's starting to look like I can't use it. I hope I'm wrong.

Thanks,
Shae

Shae

Oops, that above post was me, Shae.
for the record, the latest version of the plugin in here:

http://wordpress.org/extend/plugins/yet-...photoblog/

Shae

That page is release 1.7.

Did Johannes make a typo, then, when he said that there is a 2.7?

Shae

Six months later and I would still really love to do this. Wish I could get some help.

Can someone point me to a simple way to get 6 or 8 thumbnails on the same page (sidebar or elsewhere) as a photoblog post? With this, or any other themes/plugins?

And is there a 2.7 for YAPB?

Guest

Just a quick answer, after spending some time looking through this forum for something else, it seems like this question is getting asked a fair amount.

Quick reminder
YAPB is a plugin to Wordpress. That means if you want to learn how to loop through and display the latest posts in your Wordpress blog, then you need to learn a little more about wordpress.

A useful approach
The YAPB content is purely added on to each post, and to show a bunch of images in the sidebar is very similar to listing posts in the sidebar (hint: take a look at the Loop in the Wordpress docs, and learn about resetting and restarting the Loop).

Personally, if I'm trying to get something to display, then I get it working with normal wordpress tags and loops, then I try to add on the YAPB content afterwards. It seems to make the development process that much smoother.

And Johannes - dude, thank you for making putting together a photoblog so easy. And in your spare time too! Thanks again.
Reference URL's