ScrnshotsRSS: Scrnshots.com Plugin For Wordpress

— This plugin for WordPress allows you to show Scrnshots.com captures on your sites. It’s based on the great flicrkRSS plugin by Dave Kellam and is very easy to setup and configure via an admin panel. The plugin also has cache support, allowing you to save thumbnails on your own server.

→ Download ScrnshotsRSS plugin for wordpress here

Installation

  1. Put scrnshotsrss.php in your plugins directory.
  2. Activate the plugin.
  3. Configure your scrnshotsRSS options under the Settings tab.
  4. To use an image cache, create a writable directory and specify its location in the settings.
  5. Add to your theme where you want the images to appear ( or use the widget system ):
    <?php get_scrnshotsRSS(); ?>
    

› Continue reading

Tags: ,

Wednesday, October 8th, 2008 WordPress 20 Comments

Manipulate images from WordPress post’s content with Regular Expressions

— A couple of months ago I got requested to deliver a website that would let the client publish online brochures. These brochures featured image slideshows with a description text, tags, categories etc. Many of us use WordPress not only as a blog platform but also as a multifaceted CMS. There are many features WordPress give that go beyond the blog format and that with the right adjustments and/or plugins, can be used to provide a complete solid solution. Thats why we choose to build this up on WordPress.

At first I look around to see the wp plugins available but found that none of them suited the needs of this project. I wanted to keep this very simple and easy for the client, so the best solution I came up was to let client dump any image he wanted in the post’s content-box and deal with it later with regular expressions. This way I could manage the content and present it in a good looking slideshow I could style myself.

It didn’t took much time to do it once I figured out what I wanted it to do as it’s simple PHP code:


// Start the Loop
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>

<?php
// Set the post content to a variable
$szPostContent = $post->post_content;

// Define the pattern to search
$szSearchPattern = '~<img [^\>]*\ />~';

// Run preg_match_all to grab all the images and save the results in $aPics
preg_match_all( $szSearchPattern, $szPostContent, $aPics );

// Count the results
 $iNumberOfPics = count($aPics[0]);

// Check to see if we have at least 1 image
if ( $iNumberOfPics > 0 )
{

     // Now here you would do whatever you need to do with the images
     // For this example I'm just going to echo them
     for ( $i=0; $i < $iNumberOfPics ; $i++ )
     {
          echo $aPics[0][$i];
     };

};

// ...finish the loop, etc

› Continue reading

Tags: , , ,

Tuesday, October 7th, 2008 WordPress 2 Comments

Correct way of adding CSS and Javascript references to WordPress themes

— Around two years ago or so I started developing themes for WordPress for the company that I work, and one thing that never ceased to amaze me is how incredible is the simplicity WordPress give to developers to build themes. There are a lot of great functions and constants to help you, not only to develop but also to keep your theme code flexible and clean.

Today I will share with you a little tip to keep in mind you might not be aware of if you are starting with this. If your theme requires to have more than one stylesheet file, or include external javascript files the best way to point to those files is by using template functions given by wordpress.
› Continue reading

Tags: , ,

Sunday, October 5th, 2008 WordPress 7 Comments
« Previous Entries Next Entries »

About Me

Matt Varone - Matias Varone - sksmatt
HI there,

I'm a freelance creative Web developer, UI designer and WordPress lover.

Advertise here

  • WooThemes - Premium WordPress Themes Club
  • Elegan Themes
  • Theme Forest
  • Flash Eden

Twitter Status

Flickr Gallery

  • Clutter drawer
  • CS4 Replacement icons
  • CS4 Replacement icons
  • Magic

Scrnshots Gallery

  • ScrnShot
  • ScrnShot
  • ScrnShot
  • ScrnShot

Last.fm albums

  1. cd cover
  2. cd cover
  3. cd cover
  4. cd cover