Blogvaria

This page is brought to you by Blogvaria (http://blog.evaria.com).

To obtain more information, ask questions and interact please visit our website.

Back to Blogvaria landing page
Feedback
Subscribe
   
Blogvaria

 

The personal pages

How to add Lightbox

TrackBack | Filed by Thomas under Plugins, WordPress | Post popularity 16%

The lightbox image add-on is already packed and ready to use with my new theme Blogvaria. However including this to your existing theme shouldn’t take to long. Start by downloading the original source code from Lokesh Dhakar’s website. Unzip the archived files and upload them to your theme folder:

  • ../yourtheme/css/ (1 file)
  • ../yourtheme/images/ (10 files)
  • ../yourtheme/js/ (4 files)


Then open up your header.php file in your theme folder and add the following lines somewhere between <head> and </head>:

<!-- Include the Lightbox Magic -->
<link rel="stylesheet" href="<?php echo bloginfo('template_directory') ?>/css/lightbox.css" type="text/css" media="screen" />
<script src="<?php echo bloginfo('template_directory') ?>/js/prototype.js" type="text/javascript"></script>
<script src="<?php echo bloginfo('template_directory') ?>/js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="<?php echo bloginfo('template_directory') ?>/js/lightbox.js" type="text/javascript"></script>

Then to apply the magic see my post about the Blogvaria plugins (and add-ons).

You should also open ../yourtheme/js/lightbox.js and look for the following lines (62 and 63):

var fileLoadingImage = "images/loading.gif";
var fileBottomNavCloseImage = "images/closelabel.gif";

To make sure it works with all browsers and various rewrite rules you should edit the URI’s from relative to absolute. In plain English this means that you add http://mysite.com/wp-content/themes/yourtheme/ just before images/… on both occurrences.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • BlinkList
  • blogmarks
  • del.icio.us
  • De.lirio.us
  • digg
  • Furl
  • NewsVine
  • Netscape
  • Reddit
  • Spurl
  • SphereIt
  • Technorati
  • YahooMyWeb
  • DZone
  • feedmelinks
  • Linkter
  • Ma.gnolia
  • Slashdot
  • StumbleUpon
  • TailRank
  • co.mments
01

Blogvaria » Blogvaria Plugins said,

February 26, 2007 @ 2:06 pm

[...] If you are not using my theme but would like to include this add-on to the theme you are using, please see this post about how to add Lightbox to my WP theme. [...]

02

Blogvaria » Validate CSS style “opacity” said,

February 27, 2007 @ 4:15 pm

[...] The workaround above was implemented to validate my CSS when using the ID overlay in my add-on Lightbox. Share and Enjoy: These icons link to social bookmarking sites where readers can share and [...]

03

Alex said,

April 25, 2007 @ 2:34 pm

Thank You

URL for comments RSS 2.0 feed Subscribe to Comments | TrackBack URI

Leave a Comment

Akismet has protected Blogvaria from 60,414 spam comments. Design by Evaria.com. Powered by WordPress.
Our beloved and trusted server has rendered 2.330 pages so far today, an amazing 3.832 pages yesterday
and even more astonishingly 42.338 pages since 23 June 2008 alone without dropping a byte nor a pixel.

Close
E-mail It