Willkommen auf der privaten Homepage von Johannes Jarolim, Salzburg, Österreich

Welcome to the private homepage of Johannes Jarolim, Salzburg, Austria, Europe.

yet-another-photoblog

You’re using YAPB, you want to create or use your own theme and now you’re stuck on how to create a mosaic page featuring all your photos? Thanks god - Here’s a post describing exactly that topic ;-)

mehr…

This is a YAPB post

21. September 2007, 11:43

YAPB mentioned on bloggingbits.com

261

Today i spotted a blog post mentioning YAPB at bloggingbits.com - After reading the article i felt the urge to schoolmasterly correct one word: Hacking.

"nothing is stopping you from hacking WordPress to function as a photoblog"

What’s wrong with this sentence?

I just don’t like the word "hacking" in that context (arg!)

Hacking is the way of the spaghetti code ninja to extend a cms via manipulating the base code of the cms to achieve what he wants in a more or less small ammount of time. But if the cms gets updated, he has to apply all those changes a second time. Since cms’s get updated regulary (security updates), that can bunch up to a serious pile of work over time. Since the cms owner is stuck to the hacking codeninja he is also stuck to the last known hacked cms version even if it has serious security flaws.

Extending via a plugin on the other side is the way of the brave software developer (If the cms supports this). He examins the system to be extended in a very carefully way, sees all those provided hooks and programs the plugin. This way the cms user may update his cms installation whenever he wants/has to and has a pretty high chance the plugin will work afterwards. Until the cms internal hooks and dependecies stay compatible the owner may apply several updates until the plugin developer has to react on cms changes.

YAPB is a plugin and not a hack - So it’s extending WordPress ;-)

Harrhh - I’m so relaxed and relieved now. I’m such a monk.

This is a YAPB post

15. March 2007, 11:17

Ready to use templates

211

Since there’s a growing community of YAPB-Users maintaining and posting on beautiful photoblogs, it was only a matter of time until the first YAPB-Ready WordPress themes would appear. Beside of creating some themes on my own (just need some time for that), my intention is to publish links to all available YAPB-ready-themes on this page:

YAPB Ready WordPress Themes

Grain

Author: Mac
Page: http://mac.defx.de/grain-theme
Preview: http://www.defx.de/
Type: Classical photoblog, dark

The first released YAPB theme: Grain. A very nice classical photoblog theme with a homepage presenting the latest image. Does have an image-mosaic feature (like my one ;-) ). Very straight layout accenting the image and not distracting the visitors eye through graphical tinsel. I do highly recommend it.

phT

Author: Fran SimĂł
Page: http://pht.inhubi.com/
Preview: http://justpictures.es/
Type: Base Theme, dark

The second theme i’ve found: The phT Theme from Fran SimĂł. According to the author it’s a base theme that you can take to develop your own style.

Monolit

Author: Kim Nørgaard
Page: http://blog.jasen.dk/monolit
Preview: http://blog.jasen.dk
Type: Classical photoblog, bright

The third theme in the collection: Monolit from Kim Nørgaard. I do like light and straight themes very much - A pitty it doesn’t support exif. Nevertheless a very nice theme for photographers. Thumbs up!

Reflection

Author: Dave
Page: http://xyloid.org/projects/reflection/
Preview: http://photoblog.xyloid.org/
Type: Classical photoblog, dark

This one will get some attention for sure: Reflection by dave. Pro: Very nice and clear dark theme pimped up with stylish JavaScript reflections. Con: Doesn’t look exactly the same in IE as stated out on daves todo list. Maybe someone out there helping him with that small issue?

Coming maybe: Unwakeable

Author: T. Longren
Page: http://www.longren.org/unwakeable/
Announcement: http://www.lon…/unwakeable-status-version-bump/

Coming maybe: According to the author, Unwakeable 2.0 will support YAPB out of the box. Since we now wait for a long time

You have a YAPB-Ready-Theme?

Just drop a note to the forum or a comment to this page and i’ll include it in the list.
Please make sure to include the used version of YAPB with your templates .zip so users may even use it if i’d decide to implement big changes in newer versions.

Happy photoblogging!

This is a YAPB post

15. March 2007, 10:34

Donators

210

Recently, i included the possibility to place donations for YAPB over Paypal. Here is a big thanks to all donators with links to their pages (as long as i know them):

Thanks for donations go to

Support YAPB

Do you like YAPB? Do you use it regulary to show your photos or images? Did YAPB save you time? Or you just want to give something back for the time spent to create, maintain and support YAPB? Just Donate a little ammount so i may buy a good book, DVD, etc. or just pay some server traffic. Bigger ammounts (if any) will be invested in my photo equipment of course ;-)

Thanks alot from Salzburg!

This is a YAPB post

26. August 2006, 15:54

Change log

99

Change log

This is a YAPB post

25. August 2006, 23:23

Yet Another Photoblog goes BETA!

98

It’s official - YAPB is BETA and downloadable. If you’re interested in turning your WordPress blog into a photoblog, just download the plugin and try for yourself. I think this approach to photoblogging is somehow unique - You can post photoblog posts, display thumbnails and EXIF data - And you’re still able to use the full potential of wordpress and it’s bunch of plugins.

Happy blogging and don’t forget: It’s still BETA and i’d appreciate positive and/or negative feedback very much!

This is a YAPB post

25. August 2006, 22:24

FAQ

97

Frequently Asked Questions

Here some frequently asked questions (and hopefully helpful answers):

Why can’t i upload multiple images to one post?
Because this is my philosophy about photoblogs: One post, one image, one description. If you want to post several images to one post, you may wish to use a gallery plugin like myGallery NextGen Library (i use that for myself and can highly recommend that). Don’t use the previously recommended myGallery since it has security flaws that allowed a hack of my server - Additionally, the developement on the plugin has stopped.

Arg - YAPB throws a fatal WordPress error on activation?
Please have a look at your PHP memory limit - Alpha reported that rising the memory limit from 8M to 16M would help in this issue. Update: YAPB 1.7 was refactored so it’s much more unlikely you encounter a memory limit problem.

Why don’t i see EXIF Data?
(1) First of all: Did you included the output code into your theme? Exif output isn’t part of the “automatic inclusion feature” since it’s (a) just a help for beginners and (b) i don’t know where you want to show the exif tags.
(2) If YAPB can’t find EXIF data, there’s probably none. Make sure you use only image manipulation software that preserves EXIF data in the images data. Sample mistake: “Safe for web” in Photoshop strips all EXIF data from images.

On the YAPB options page, the field where i can select the EXIF Tags to be viewed is empty?
This list gets filled after you posted at least one image containg EXIF data - The filter “learns” fom your images. Either you didn’t post an image before, or that image didn’t contain any EXIF data (see question above). It could be a bug of course - But please check your image before posting complaints.

Why don’t i see any thumbnails at all - I did everything as you described and get no php errors?
(a) Did you set the directory permission for the thumbnail generator as mentioned here?
(b) Exactly how big is your original image? Thumbnailing needs memory (have a look at the php memory limit and the according entry in the phpThumb FAQ) or an installed imagemagick library for really big images.

If i assign a photoblog post to multiple categories, the “next image” and “previous image” links doesn’t work anymore.
That’s the documented behaviour of the used wordpress functions. If anyone finds a better way of solving this (without merely duplicating those both functions) - Please tell me. In the meantime: To get that working, you have to assign all photoblog posts to EXACTLY ONE category. And it has to be the same category of course ;-)

Why did you use JavaScript injection to insert the form fields?
Because WordPress doesn’t provide a hook to insert html where i wanted it. Imho the file upload field is the second important thing you should see after the title-field in a photoblog. So i inserted the field per DOM manipulation.

What’s the main difference to Pictorialis?
Pictorialis is a total WordPress conversion. The creators took WordPress 1.x as basis, touched a lot of internal code and morphed the whole thing. The main problem that i see is this: What do you do if a newer version of WordPress gets released? You have to do all those nifty code manipulations again. Same story for security updates. Yapb just adds photoblog functionality as plugin. It doesn’t touch original WordPress code and so i can take all patches, security updates and just use them. YAPB may not have so much functionality as Pictorialis, but it’s as durable as a plugin can be.

Nothing nada niente works
Oh my - Don’t flame me - I’m just the programmer ;-) If you give me feedback, i’ll look what i can do. Of course, you are not forbidden to investigate the cause for yourself and send me detailed feedback ;-) And don’t forget to search the forum - Most probably you’ll find the answer to your question there.

I’ve a big problem with my template design, HTML, CSS, JavaScript, PHP or whatever
Don’t want to sound snappy - But hey: I’m the plugin programmer. Not your HTML coach. If you’re very polite and post your question in the forum i may have a look - But i don’t think that this topic is my topic. There are a lots of peoples in forums out there handling these problems with joy and i only have a limited time budget. Right now my wife is waiting for me to go to sleep too - finally.

I’ve sent a bug / feature request / feedback and nothing happens?
I’m father of two childs, i’m husband of a beautiful woman, i’ve a fulltime job, sometimes i want to go out taking some photos or go to gym. So don’t be dissapointed if i don’t work 24/7 on YAPB (Beside of this: YAPB really works fine for me - And that’s the main reason i developed it). Additionally: Programming is a hobby of mine and it wouldn’t be that funny if i always had to program what others want - like at work. And don’t forget that you got this plugin for free. Nevertheless if i see a good point i normally react as soon as i can.

I want to donate - What ammount do you await?
Hah - I’ll take any ammount you’re willing to give ;-) But as stated on the pages: An ammount high enough to buy an interesting book or DVD does it. If anyone has a tip: I’m still searching for a reliable european or german online shop accepting Paypal.

Your question wasn’t asked frequently?

Since there is definitly some feedback and the pages grow and grow - I suggest you use the yapb-forum to ask questions, maybe help each other, etc.

This is a YAPB post

25. August 2006, 21:15

Adapting templates

96

First of all: Adapting your theme to be “YAPB-Ready” is definitely no magic (Or as Douglas Adams used to write: Don’t Panic ;-). There are just a few points to know and your way to an attractive and individual photoblog is free.

Does adapting a theme sounds like rocket science to you? Maybe one of the Ready-to-use-templates meets your taste.

The Basics

YAPB gives the possibility to attach photos/images to your posts and to display them in various formats and styles. This section describes the first essential things you can do in your blogs template. If you decide to adapt your theme manually, don’t forget to turn off the automatic-image-insertion feature on the YAPB Options page.

Do it in the loop

First of all: All those code samples described underneath have to be used in the loop.

Checking for image existance

Since you’re free to post normal Wordpress articles or photoblog entries, there must be a possibility to check wheter the current displayed post is a photoblog post or not - Nothing easier than that:

<?php if (yapb_is_photoblog_post()): ?>
  <!-- This definitly is a YAPB Photoblog post -->
<?php else: ?>
  <!-- No image attached: This is a normal WordPress post -->
<?php endif ?>

Displaying the image

Now we know that we have an image, we want to display it:

<?php if (yapb_is_photoblog_post()): ?>
  <?php yapb_image('', array('alt' => 'My marvelous image'), '') ?>
<?php else: ?>
  ...
<?php endif ?>

For more information on yapb_image() and yapb_get_image() refer to the template functions documentation

Displaying a thumbnail

To one of the interesting parts: thumbnailing. YAPB uses phpThumb, a very stable and mature PHP library, for it’s thumbnailing. YAPB tries to hide all those nasty details and offers you a simple and refreshing template function which does all that resizing, caching and displaying-stuff for you:

<?php if (yapb_is_photoblog_post()): ?>

  <?php

    echo yapb_get_thumbnail(
      '<div>', // HTML before image tag
      array(
        'alt' => 'My marvelous first thumbnail', // image tag alt attribute
        'rel' => 'lightbox'                      // image tag rel attribute
      ),
      '</div>',               // HTML after image tag
      array('w=200', 'q=90'), // phpThumb configuration parameters
      'thumbnail'             // image tag custom css class
    );

  ?>

<?php else: ?>
  ...
<?php endif ?>

Nearly the same as yapb_image() - But with additional phpThumb configuration parameters that define the desired size and css class of your thumbnail image.

Displaying EXIF data

The next cool thing to do is displaying the EXIF data of your image. YAPB does use the easy-to-use library phpExifRW and tries to hide it’s complexity from you as always:

<?php if (yapb_is_photoblog_post()): ?>

  <h3>EXIF</h3>
  <ul>

  <?php

    yapb_exif(
      'li-exif',   // CSS Class for the LIs
      ': ',        // Separator between EXIF token name and value
      '<strong>',  // HTML before EXIF token name
      '</strong>', // HTML after EXIF token name
      '<i>',       // HTML before EXIF token value
      '</i>'       // HTML after EXIF token value
    )

  ?>

  </ul>

<?php else: ?>
  ...
<?php endif ?>

Have a look into the according documentation to see what can be done with this template function.

More advanced stuff

This section won’t only highlight the more complex templating possibilites, but also some general WordPress functionality that may spice up your theme:

Attaining the YAPB-Imageobject directly

Templating functions are cool - Until you need to, let’s say… display the thumbnail of a post not included in the current loop. So there should be a way to get grip on the YAPB Image Object directly to attain full control.

Example: You’re fetching one post out of the DB by using get_next_post() and want to know if it’s a photoblog article:

<?php

  // Use the WP Infrastructure to get the next post

  $theNextPost = get_next_post(); 

  // Check if we've gotten something

  if (!empty($nextPost)) {

    // Yes, we have a next post
    // Let's check if it has an image attached:

    if (!is_null($image = YapbImage::getInstanceFromDb($theNextPost->ID))) {

      // Yes, we have an image
      echo 'Heureka! The next post is a photoblog article.';

    } else {

      // no image ahead
      echo 'Alas! Just a normal WordPress article ahead.';

    }

  }

?>

Thumbnail navigation (previous and next image)

Since we know how to get the image object by hand, we could now use this know-how to create a little “next image, previous image” navigation with thumbnails as links.

I only show the code for the “next post” part - The “previous post” part is basically the same thing with usage of the get_previous_post() function:

<?php

  // Use the WP Infrastructure to get the next post

  $theNextPost = get_next_post(); 

  // Check if we've gotten something

  if (!empty($nextPost)) {

    // Yes, we have a next post
    // Let's check if it has an image attached:

    if (!is_null($image = YapbImage::getInstanceFromDb($theNextPost->ID))) {

      // Yes, we have an image
      // Let's define the thumbnail configuration

      $thumbnailConfiguration = array(
        'w=75', // 75 pixels width
        'h=75', // 75 pixels height
        'zc=1'  // crop the image
      );

      // And output the image tag

      echo '<a href="' . get_permalink($theNextPost->ID) . '">';
      echo '<img ' .
        'border="0" ' .
        'src="' . $image->getThumbnailHref($thumbnailConfiguration) . '" ' .
        'alt="To the next post" ' .
        'width="' . $image->getThumbnailWidth($thumbnailConfiguration) . '" ' .
        'height="' . $image->getThumbnailHeight($thumbnailConfiguration) . '" ' .
        '/>';
      echo '</a>';

    } else {

      // no image - we display a text link
      echo '<a href="' . get_permalink($theNextPost->ID) . '">To the next post</a>';

    }
  }

?>

For more information on the YAPB Image Object, just have a look into the lib/YapbImage.class.php - It should be documented sufficiently.

More to follow

So much for now - If you have ideas and code samples for this page - Leave a comment or post something in the forum - I’ll take a look.

This is a YAPB post

25. August 2006, 20:28

Download / Installation

95

Download YAPB

Current version

Yet-Another-Photoblog on WP-Plugins.org
for WordPress 2.5 and greater
ZIP-File, hosted on WP-Plugins.org

Older versions

If you’re using an older version of WordPress (please be adviced to update soon) you may download one of the following versions. Please mention that those version are deprecated.

Yet-Another-Photoblog-beta-1.7.4.zip
for WordPress 2.3.2 discontinued
ZIP-File, 714 KB
Yet-Another-Photoblog-beta-1.5.2.zip
for WordPress 2.1.x and 2.2.x discontinued
ZIP-File, 480 KB
Yet-Another-Photoblog-beta-1.3.1.zip
for WordPress 2.0.x discontinued
ZIP-File, 314 KB

Installation

The installation consists of three parts: Upload, setting a directory permission (on unix/linux systems) and activation of the plugin.

Upload the files

  1. Unzip the content of the zip-file into an empty directory
  2. Upload the yapb-directory directly into the wp-content/plugins folder of your wp-installation

Set a directory permission

Notice: You don’t need this on windows systems (or you have to wrestle with the windows directory permissions).

  1. The used open source thumbnailing engine phpThumb needs one directory access for storing its cache files. Set the permission of the directory wp-content/plugins/yet-another-photoblog/cache/ to 777.

Activate the plugin

  1. Go to admin panel / plugins and activate it
  2. Enjoy!

Contribute

Support YAPB

Do you like YAPB? Do you use it regulary to show your photos or images? Did YAPB save you time? Or you just want to give something back for the time spent to create, maintain and support YAPB? Just Donate a little ammount so i may buy a good book, DVD, etc. or just pay some server traffic. Bigger ammounts (if any) will be invested in my photo equipment of course ;-)


Thanks alot from Salzburg!

Set a backlink

Yes - This plugin was released under the GPL and you’re nearly free to do all you want to do.

But i’d be pleased very much to see some backlinks to this site.

This plugin needs a lot of my spare time - So it would be a great sign of respect if you use one of these buttons (or just place a normal href) on your site:

</p> <p>#buttons { margin-bottom:10px; } #buttons tr td { margin:0;padding:0 10px 10px 0; } #buttons tr td.border { padding-top:10px;border-top:1px solid silver; }

To set a backlink, just download the button of your desire (Or have a look into the included linkback/yapb-buttons.zip) and include a link something like that in your footer.php (Or wherever you want):

<a href=”http://johannes.jarolim.com/yapb” target=”_blank”><img src=”01a.gif” border=”0″ /></a>

Feedback

Please be so kind to provide positive and/or negative feedback so i can improve this piece of code if necessary.

Since there is definitly some feedback and the pages grow and grow - I suggest you use the yapb-forum to ask questions, maybe help each other, etc.

This is a YAPB post

25. August 2006, 12:12

Yet another photoblog

93
It’s out in the wild. Convert your WordPress 2.x installation into a full featured photoblog in virtually no time. Use the full range of WordPress functions and plugins: Benefit from the big community WordPress has to offer.

What is YAPB / What can you expect?

  • A non invasive WordPress-plugin that converts wp into a easy useable photoblog system
  • Easy image upload - All wordpress post-features can be used
  • On the fly thumbnail generation - Use multiple thumbnail sizes where and when you need them: Thumbnail generation gets controlled from the template.
  • EXIF data processing and output
  • Self-learning EXIF filter - Your own cameras tags can be selected to be viewed.
  • Full i18n-Support through gnutext mo/po files
  • YAPB Plugin Infrastructure for extended functionality
  • Ping additional update-service-sites when posting a photoblog entry.
  • Nearly every WP-theme can become a photoblog in virtually no time.

You’ll get a photoblog system based on wordpress - Decide if you want to post a normal Wordpress article or a photoblog entry. Be free to use all available extensions / plugins of the WordPress platform ;-)

3 Steps to your WordPress Photoblog

Screenshots

The idea

Why another photoblog system?

There aren’t many open source photoblog systems out there in the wild. I searched a long time and found only few. Evaluated all of them and decided to program one on myself, since none of them met my demands. I did that about three times - Every version was build up from the scratch. Every version was better and much more flexible. More cool and finally more proprietary.

Every time i saw a feature in another blog system that i wanted to have - i had to spend much of my rare spare time to design, program and integrate it into my own photoblog system. After implementing some features like captcha, ping and trackback, etc. etc. i decided that this was just a waste of time.

There already was a system out there having lot’s of features and a huge community: WordPress. Yapb is my try to build on a wide spread platform - And to get what i want - As a photographer and programmer.

Why not use services like Flickr, Deviantart, etc. etc. ?

Why hazzle with renting a suitable webhost, installing a photoblog software, configuring the whole stuff, eventually solve problems, searching and installing a cool theme, etc. etc. - If i can have it all (and more) with one click at Flickr, Deviantart, etc. etc. ?

I’m only able to give you a hint on my opinion why i don’t want to host my images on such a service. Fortunately, for the impatient among us, it can be told with only three (and a half) words:

It’s my image.

Post your image on a foreign server and you’ll never be exactly sure what rights you have on your own images until you’re a better laywer than the one hired by your prefered photo community. One nice example: Flickr was sold to Yahoo AFTER they had tens of thousands users and hosted millions of images. If you’re posting images to flickr right now - Do you EXACTLY know, what rights Yahoo currently owns on YOUR images?

If this is perfectly ok for you - Go on and use those communities! After givin away your personal data, you will have an account for free and no hazzle with setting up your own photoblog. There are thousands of users just waiting for you!

Technical spoken

Yapb integrates tightly into wordpress. Via Javascript DOM manipulation it injects several form additions into the standard wordpress post form. It provides additional data and functions to themes so that nearly every theme can be converted to a photoblog in virtually no time. Yapb doesn’t touch original wordpress code - It’s using it.

Support YAPB

Do you like YAPB? Do you use it regulary to show your photos or images? Did YAPB save you time? Or you just want to give something back for the time spent to create, maintain and support YAPB? Just Donate a little ammount so i may buy a good book, DVD, etc. or just pay some server traffic. Bigger ammounts (if any) will be invested in my photo equipment of course ;-)

Thanks alot from Salzburg!

There is a forum

Since there is definitly some feedback and the pages grow and grow - I suggest you use the yapb-forum to ask questions, maybe help each other, etc.

 1 2 »