Plogger Press - A plugin for WP

Mar 28th, 2006 by Tim 28

Having decided that Plogger was the way to go for my photos in WordPress, I came across some script by theg3nius. But it relied on its own connection to the database and so too much configuration. Inspired by that script I have built a WP plugin with some new features and which requires very little configuration, provided your plogger is installed in the same database as WP. So here I release onto the world Plogger Press version Alpha 0.1.

Download:

New version now available in Projects.

Features:

Use a tag to insert thumbnails of all images in an album in a post, like this: 2 Or insert large thumbnail of single image like this: 7 Use the sidebar function to show any number of random images in a block. See my site for an example.

28 Comments on the Comment Wall

  1. 1 Mike said:

    This is beautiful =) It looks really good Tim. Can’t wait to try it out myself!

  2. 2 Knightsyde said:

    Thanks so much for the plugin…I have a question that I did not see in the readme…how do you actually add the category view like you have on your photos link.

    Cheers
    Knightsyde

  3. 3 Svein said:

    Hi,

    Would love to see the full code to put this in the sidebar, not just part of it. I have tried a couple of ways to do it, but no luck so far.

  4. 4 tim said:

    My code looks something like this:


    <?php if ((function_exists('plogger_press_sidebar')) && is_home() && !(is_paged())) { ?>
    <h2>Photos</h2>
    <ul>
      <?php plogger_press_sidebar(6);?>
    </ul>
    <?php } ?>

  5. 5 Svein said:

    Well… I am getting the same error message.

    WordPress database error: [Table 'winet_wpdb.plogger_pictures' doesn't exist]
    SELECT * from plogger_pictures order by RAND() LIMIT 6

    Warning: Invalid argument supplied for foreach() in plogger-press.php on line 50

  6. 6 Svein said:

    And you might want to make that comment a little more anonymous by editing the path…. Was a little to quick to add the errormessage. I guess it is not too smart to output the path?

  7. 7 tim said:

    The error message suggests the table doesn’t exist.

    Either you installed plogger to a different database than WP. Well this plugin won’t work in this case.

    Or you used a different table prefix for plogger tables. Just edit the plugin file and replace ‘plogger_’ with the correct prefix.

  8. 8 Svein said:

    Yes… It is in a different database.. Why not give us the option of actually entering the database details if we want? It is not a big problem to most people.

  9. 9 tim said:

    Actually it is a bigger problem than you think. The code relies on the WP db class to avoid having to establish connection to another database. Doing it this way made it much easier to implement. A future release may extend this to other dbs, but it won't be high my list of priorities.

  10. 10 Svein said:

    Too bad :-( I was looking forward to having random thumbnails in the sidebar of my blog.

  11. 11 Mel said:

    Great plugin, and great site!

    I’ve got a brand new blog set up, with a brand new Plogger install in the /photos directory, and I’m successfully using your plugin to add the images in the sidebar.

    Works Beautifully!

    Question: How did you integrate the Plogger with your themes? You’ve got it set up so beautiful here, it’s seamless… Also, I’m assuming you hardcoded the link to the photos directory in the Menu in the header?

    Thanks for the inspiration!!

    Mel

  12. 12 tim said:

    The integration of Plogger was done following some of the article at http://phoenixrealm.com/2005/09/22/integrating-plogger/.

    I have tried embedding the whole of plogger into a wordpress page template and in other ways but just can’t make it work. Plogger relies on calls to its galery functions being from its own dircetory. I’m a little frustrated with it to be honest.

  13. 13 tim said:

    I have now revleased version 0.2. The main improvement is a option menu.

  14. 14 Evan said:

    Hi Time,

    I have followed your threads, and I think you have done an amazing job with this plugin.

    I too am a little confused about how you were able to integrate plogger into your design. Ideally, I would like to get the root plogger view on a “photos” page much like you have. Any advise on how to do that?

  15. 15 tim said:

    The photos page is achieved by taking the index file of the theme and loosly following the tutorial at:
    http://phoenixrealm.com/2005/09/22/integrating-plogger/

    I would like to extend the plugin to build integration automatically but Plogger is too fussy about directories. So this is still in progress…

  16. 16 Todd said:

    After searching forever, I found you plugin - its perfect!

    Two questions:
    1-How can I add a border around the thumbnail on the sidebar?
    2-If I use 2+ photos, how would I force each photo on a seperate line (one under the other, with a space inbetween)?

  17. 17 tim said:

    1. - by adding border to your CSS style. It depends on which theme you use but in my current theme it goes like this:

    #sidebar a img {
    border: 1px solid #ccc;
    margin: 0 5px 5px 0;
    padding: 2px;
    }
    #sidebar a:hover img {
    border: 1px solid #efe;
    }

    2. - The easiest way is to make the size of your plogger thumbnails big enough to force the overflow. In fact that is probably the only way to do it without tweaking the actual code.

  18. 18 Todd said:

    Tim,

    Thanks for the code. If I take out the ‘#sidebar’ from both codes, it works, but it applies the border and hover effect on all images. How can I get these codes to only apply their functions to the ploggerpress code (in the sidebar for random photo)?

    Thanks for your help!

  19. 19 tim said:

    In my theme that is what the #sidebar achieves. It depends on your theme. My sidebar sits in a div tag with the id of sidebar. So the above CSS code picks out images in the sidebar.

  20. 20 ulrika said:

    Please help me with this!
    I have messed around and done som rash things, but now I have finally resolved it and have only ONE problem left to solve:
    Where do I change the URL of plogger to not to have to install everything once again.
    The url of links from wp to plogger looks now like this:http://omstart.se/wp/www.omstart.se/album/index.php?level=picture&id=2
    Please don’t ask me how I made this mess, but please help me solve it;-)
    Best regards Love your plug in!

  21. 21 ulrika said:

    sorry, was a little too fast there, I found it of course (usualy does when using brain;-(
    I have another request:
    I would like the plogger thumb links displayed in my sidebar open in a nother window. How would you make that happen the best way?

  22. 22 Lilliput said:

    I have been looking through dozens of plugins to get a working photo album on my site and have not had much luck. “Another one bites the dust” is what I would exclaim after each try with each new and difficult-to-configure plugin. I came across your first-plugin and thought “Finally! This is what I’m looking for!” I do have one question, however. I do not have permission from my host to access my .htaccess file and can’t use permalinks the way most can. Do you have a suggestion to get around the tag id?…
    2

    …maybe it could be MyAlbum…

    …or someone could suggest an alternative .htaccess file to stick in somewhere? (I’m somewhat new to php).

    Thanks for any help!

  23. 23 Vida said:

    i am completely lost on the tables bit… i see a few people asked but i don’t see a reply specifically answering how to configure the table prefix

    please advise

  24. 24 tim said:

    The tables bit? Do you mean database tables?
    If so then this plugin relies on the Plogger installation being in the same database as wp. Some people opt to install thm in seperate databases and at present the plugin can’t handle that. I will try and implement this at some point, but life gets busy sometimes!

    Hope this answers your question. If not then try and give a bit more detail.

  25. 25 Tim said:

    Yep, it appears that PloggerPress assumes that the plogger tables are within the wordpress database. I guess there are web hosts that only allow one MySQL database.

    Wouldn’t it be just a simple addition to the options area for database prefix and use that instead of the global $wpdb?

  26. 26 Gael said:

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

  27. 27 blog do valdecir carvalho » Blog Archive » links for 2007-04-27 said:

    [...] Living Open Source ยป Plogger Press - A plugin for WP (tags: wordpress) [...]

  28. 28 mOOn said:

    hi
    help me please. I have installed plogger and i put a album photos in a post succesfully, i was getting problem to put random images in my side bar but today i used Tim’s code

    Photos

    so its successfull, but now i have problem that all 6 images are in horizental line instead of verticle. how Can I set them in verticle

    please see this in my blog http://www.bellntell.com

    Thanks.

Leave a Comment

More thinking about:

Living Open Source

Tim’s blog on anything from this week’s lectionary, to open source software like WordPress

Creative Commons License

Links

  • Church Marketing Lab (Flickr Group)
  • HelpTelly
  • Jamendo - (Creative Commons Music)
  • Lectionary Bible Studies
  • Lectionary Graphics (Flickr Group)
  • Liturgy - worship that works
  • LivingOS Blip.TV Channel
  • N T Wright Page
  • Re:Jesus
  • Rowan Williams
  • St Helens Baptist Church
  • TextWeek
  • Ultimate Guitar Tabs
  • Walter Brueggemann
  • WordPress
  • YouVersion