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

31. March 2008, 21:10

JP Admin - Stylish Blue

294

WordPress 2.5 out with a new admin interface. By default you have the possibility to choose between two color schemes: Classic and Fresh. Am i the only one disliking both?

To be honest: I can’t stand the fresh theme and could live with classic - But i don’t want to live with a theme - i want to like it. So thanks to the know how, explanations and sample code of planetozh i were able to create my little brushup:

Screenshots

Installation

  1. Unzip the content of the zip-file into an empty directory
  2. Upload the jp-admin-css-stylishblue directory to your wp-content/plugins directory
  3. Activate the plugin
  4. Go to your users panel
  5. Choose the new Admin Color Scheme “Stylish Blue”
  6. Enjoy!

Download Now

Like YAPB, JP-Admin-StylishBlue gets hosted on wp-plugins.org - So get the latest version here:

jp-admin-stylishblue
on WordPress.org
This is a YAPB post

10. May 2007, 21:41

WordPress Theme Relaunch, die zweite

228

Man glaubt es kaum - Aber ich wechsle mein Themes anscheinend öfters als meine Unterhosen ;-)

Nein, um wieder zum Ernst der Sache zu kommen: Das letzte Theme war wohl ein dunkler Patzer in meinem CV und die zentrale Layouttabelle hat mich auch massiv gestört - Nicht aus Prinzip, sondern weil Layouttabellen massiv die Anzeigezeit in die Länge ziehen können. Also bin ich frisch ans Werk gegangen und habe mich CSS- und Internet Explorer mäßig wieder auf den neuesten Stand gebracht.

Ich möchte diesmal ganz besonders 2 Plugins erwähnen, die von nun an nicht mehr von meiner Seite weichen sollen:

Zusätzlich basiert mein Theme nun auf einem CSS Framework, dass ich ebenfalls hervorheben möchte: YAML ist nicht nur ein Framework für 2- bzw. 3-Column Straight-CSS-Layouts, sondern auch ein CSS-Tutorial und -Lehrbuch aller erster Güte.

Ich hoffe, es gefällt.

 

This is a YAPB post

5. April 2007, 20:24

Theme Relaunch

222


Neues WordPress Theme

Für alle, die es bisher nicht bemerkt haben - Mein neues WordPress Theme ist im kommen. Es ist zwar nicht 100%ig fertig, aber das kommt nun Schritt für Schritt. Die kleinen Details werden aber noch eine Weile auf sich warten lassen müssen, da ich über und über mit Arbeit eingedeckt bin - Der erste Schritt ist aber getan ;-)

New WordPress theme

For everybody not having noticed yet - My new WordPress theme is coming! It’s not finished 100% but that will come step by step. The small details will have to wait because i’m burried by work - But the initial step is done ;-)

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, 13:51

Jerome’s Keyword Manager

94

Update: Since WordPress 2.3 you don’t need Jeromes Keywords anymore since WordPress offers tagging right out of the box. So my manager is deprecated also - if you use an older version of WordPress i encourage you to update immediately.

Even if Jerome’s Keywords is a very, very nice and useful wp-plugin - I still missed something. How could i update previously entered tags without having to edit every single post?

The solution

The marvelous jeromes-keyword-manager (final version)

Features

These are the features i’ve been missing ever since i installed jerome’s keywords:

  • Rename, Replace or delete tags easely - All posts get updated
  • Find all posts tagged with a specific keyword
  • Find all posts without tags

Screenshots


Language Files

Thanks to all contributors - Here’s a list of all language files i know of:

Language Contributor Link
English Johannes Default language: Included
German Johannes Included
Korean Juice http://lombric.linuxstudy.pe.kr/PDS/jerome…
Japanese Plasticdreams http://plasticdreams.org/uploads/projects/jerome..

Changelog

  • 2006-07-05 Final version finished and ready to be downloaded
    The final version features a SQL workaround which moves around a problem that can be found in the original jeromes-keywords plugin also.
    more info
  • 2006-07-02 Version 3 ready to download
    Enhanced list: It now shows all other tags used in that posts
    Possibility to find all posts WHITOUT attached tags
    Full i18n-gnu-gettext support
    more info
  • 2006-06-22 Version 2 ready to download
    Plugin now shows a list of all posts tagged with a specific keyword
    more info
  • 2006-04-23 Release of original version
    Allows edit-, rename- and replace-operations over all posts
    more info

Installation

How do i install a wp-plugin? Instead of repeating the old rtfm phrase i’ll explain the veeery complicated way to install one:

  1. Unzip the files into an empty directory
  2. Upload the file and directory directly into the wp-content/plugins folder of your wp-installation
  3. Go to admin panel / plugins and activate it
  4. Enjoy!

Special Thanks

Special thanks for providing ideas, problem feedback, language files, etc. go to: Mike, Juice, PlasticDreams, Sterling and all that downloaded the plugin already - You make a little developer very proud ;-)

The Future

Since Jerome’s developing on version 2 of the plugin (currently beta), which will already contain a global tag management, this little plugin will be deprecated soon. Imho it’s already better to have it all in one plugin - And i’ve learned alot about plugin programming for my second WP-plugin-project: Yet another photoblog.

Latest info: Jerome’s keywords manager will be part of jeromes-kewords v2 eventually. I’ve rewritten the code to use the new DB infrastructure and sent it to jerome, since he asked for it. Let’s have a look what will happens next ;-)

Happy Tagging!

 1 2 3 »