shepline creative

Using WordPress lightbox gallery

Posted here for my own reference because the instructions for the WordPress Lightbox Gallery plugin are in Japanese:

How to use
How to use the Lightbox Gallery, WordPress 2.5 has essentially been built since the galleries are the same. Register for more photos, simply insert the tag below post. Photo captions, mouse over the image coming tooltip (tooltip) appears as a description of the photograph that appears when Lightbox is displayed.

Advanced Settings option is available to all short codes. For more options, WordPress 2.5 image using the list of new features galleries want to see. Here, in addition to the standard option, Lightbox Gallery added in explaining the options.

  • lightboxsize
    Lightbox lightboxsize specified by size is displayed. By default, the medium has become, full can also be specified.

    [Gallery lightboxsize = "full"]
  • meta
    meta specifies whether to display information about the accompanying photo. Has become false by default, does not appear. If you want to specify is true. Information accompanying the photos, the camera model, aperture, focal length, ISO, shutter speed, the time taken to display in Lightbox.

    [Gallery meta = "true"]
  • class
    To add an attribute class is the class gallery. Gallery1 is a default.

    [Gallery class = "gallery2"]
  • nofollow
    rel = “nofollow” to add. The default is a false.

    [Gallery nofollow = "true"]
  • from, num
    To view images from the position, num is the number of images to be displayed. The following example displays the images from the image’s third five.

    [Gallery from = "2" num = "5"]
  • pagenavi
    num navigation image is displayed depending upon the number of images used. pagenavi set to 0, and not showing navigation. For navigation, wp_link_pages same options are available.

    [Gallery num = "10" pagenavi = "0"]

Alternative to setting links to open in a new window

It’s neat because it works with my other jQuery applications, but this simple code opens up new links in a lightbox style window on top of your existing page. Standards compliant, or not…?

( GreyBox )

Removing the <li> display from the Site Admin/Register links

The problem with the default WordPress Site Admin/Register code:

<?php wp_register(); ?>

is that the resulting html displays these links as list items. To stop it from making these list items and just only display the link as regular text is actually frustratingly, annoyingly simple.

What you can do, is to call wp_register() with an argument like this:

<?php wp_register('',''); ?>

This will get rid of the li tags. However you can also surround the links with any tags/text of your liking:

<?php wp_register('<div>','</div>'); ?>

See the original answer here: http://wordpress.org/support/topic/removing-list-item-from-wp-loginout-and-wp-register

Aged Type Effect in Photoshop

A useful Photoshop technique for adding an aged effect onto type in Photoshop can be found here:

( aged type effect in photoshop )

  • Create your type as you normally would
  • Rasterize the type
  • Add noise, around 25%. Be sure the check the ‘Monochromatic’ checkbox.
  • Adjust the Input Levels, bring the black level up to about 70
  • Run a very slight Gaussian Blur on your type – like 1 or 2 px
  • Run Smart Sharpen to remove the blur but keep some of the organic distressing / softening that occurs. Like 200% for the amount and about 15 for the radius.
  • Adjust Levels again – bring black up to about 50 and white down to 69.

Or just download the Aged Text Effect Photoshop Action and never have to remember how to do it again.

In love with jQuery

In the last few months, the designers and developers at Shepline Creative have discovered, and fallen in love with, jQuery. With reasonably simple and straight-forward, lightweight code, there seems to be endless possibilities for exciting and vibrant designs.

Some of my favourite jQuery effects at the moment are:

  • CrossSlide – some common slide-show animations, traditionally only available via Adobe Flash™ or other proprietary plugins. CrossSlide builds upon jQuery’s animation facility, so it is as portable across browsers as jQuery itself (that is, a lot!)
  • Catch My Flame: Infinite Caroursel – excellent slideshow/gallery software
  • jTabber – for tabbed pages
  • Accordian – nifty accordian/show-and-hide for cascading content

Gamages Accountancy Ltd launches new site and takes on Twitter

The Bicester-based Gamages Accountancy Ltd chose Shepline Creative to redesign and relaunch their website. The new site, soft-launched today gives a clearer, more user-friendly look. The new site also integrates a Twitter feed from the Practice Manager and further developments and enhancements are promised over the coming weeks.

Work on this site involved using existing, unfamiliar web hosting and all the necessary problem-solving that goes with that territory!

Greenwood Veterinary Clinic launches new website

The Buckinghamshire-based Greenwood Veterinary Clinic chose Shepline Creative to redesign and relaunch their website. The new site, launched earlier this month features about the team pages and online registration for new clients.

Work involved in the production of this site involved careful negotiation with the previous webhost to transfer the website, including email, to new servers, ensuring a smooth and continuous transition throughout.

New websites in development

The summer of 2010 is turning out to be a busy time of year for us, with several new websites currently in development for launch in the next few months. For an idea, think local small business; think complete redesign of an established site; think brand new, internationally focused, historically fascinating research project.

Watch this space for more!

Setting permalinks in WordPress

For my sins, I use a webhost which works on Windows servers. For the most part, it makes not a jot of difference to me but does cause a few headaches when setting up sites using a wordpress install at the base of it. In particular setting nice pretty permalinks when I don’t have access to IIS mod rewrite rules…

I did manage it on this very site eventually, but it wasn’t straight forward particularly as I needed a separate 404 redirect for the subdomain (which I didn’t have access to). Setting up the new BVToday.net website is more straight forward, but I thought I would post the solution here, partly for my own future benefit:

Requirements and Install instructions:

  • IIS for Windows
  • WordPress
  • Ability to change your 404 error page with your web host.

To install, copy and paste this text into a file named wp-404-handler.php:

<?php
$qs = $_SERVER['QUERY_STRING'];
$_SERVER['REQUEST_URI'] = substr($qs, strpos($qs, ':80')+3);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
include('index.php');
?>

Next set the 404 error page to /wp-404-handler.php. If it gives you a choice between file and url, choose url.

Lastly, make sure you enable permalinks in the WordPress control panel under Options > Permalinks.

This solution supercedes the ASP solution.

Lightbox vs. Twitter

Whilst rolling out a new, spruced up, clean site design to my own website that conforms to both XHTML Strict DTDs and CSS 2.1, I encountered a conflict with the javascript scripting involved with the Lightbox that I was implementing. Although the pages continued to validate against the DTD and the CSS was similarly fine, and indeed in Firefox and some instances of IE8 there were no display problems. However in some instance of IE8, having the lightbox running on the page caused some elements of the page to not load correctly, and for the footer to not display at all. Further more I had the KB927917 error from Microsoft which was as inconprehensible as these things usually are.

By systematically deactivating the various scripts running on the page, I tracked down the problem to the Twitter provided javascript code.

I’ve now put in place a new Twitter feed service, which has the advantage of both working with Lightbox and having an option to abort loading tweets if the site is down (something which was causing a problem during recent twitter outages).

Details

You can see the scripts in action here.

Installation instructions

These are ammended for my install (you can see the original instructions and download the scripts here):

Container HTML

You need to insert a holder element for the twitters to go in to. In the example above, I’ve included some ‘waiting to load’ content – but you don’t have to.

Here’s what I did:

<div id=“tweet”>
 
<p>Please wait while my tweets load <img src=“/images/indicator.gif” /></p>
</div>
<p><a href=http://twitter.com/yourtwitterusername>If you can’t wait – check out what I’ve been twittering</a></p>

Here are some more progress indicators.

If you include contents inside the holder div, then you’ll need to set the ‘clearContents’ flag.

Add the script

You should download the twitter.js script, and add the following code within the head or (best at the bottom of the) body tag:

 (this example will generate my twitter status in quotes on a single line with the ‘ago’ linkable back to the original twitter post)

<script src=“http://yourdomain.com/includes/js/twitter.js” type=“text/javascript”></script>
<script src=“http://yourdomain.com/includes/js/twitter.tweet.js” type=“text/javascript” charset=“utf-8″></script>

Create a file called twitter.tweet.js and paste the following code into it:

getTwitters(‘tweet’, {
  id
: ‘yourtwitterusername’,
  count
: 5,
  enableLinks
: true,
  ignoreReplies
: true,
  clearContents
: true,
 
template: ‘%user_name% %text% <a href=”http://twitter.com/%user_screen_name%/statuses/%id%/”>%time%</a>’
});

Note that the getTwitters function will execute after the page has been loaded by your browser. It will fire once the DOM is loaded but before images are loaded.

And your’re done! :-)