Pirobox Extended V.1.0 wp-plugin – Bugfixing

Some time ago, i was in search of a good Lightbox clone with some requirements – slim, good-loking, draggable, with the possibility to show two different zoom-sizes – and found pirobox. Some time after that, i needed to use it in wordpress, and was happy to find that there exists a plugin.

Unfortunately, the plugin produced some bugs when used together with other plugins that use also the jquery library. So i took the liberty to rewrite the main plugin file (called pirobox_ext_wp.php).

Now it makes use of the wordpress built-in activation hooks and librarys. Also got the size a little smaller. If pirolab reads this: maybe you can use it for the next version of the WordPress Plugin.

Plugin Name: Pirobox Extended for WP V.1.0
Plugin URI: http://wordpress.org/extend/plugins/pirobox-extended-for-wp-v10/
Description: This plugin automatically add the and rel="gallery" to images linked in a post, if the script finds more then 1 image, creates automatically  an image gallery.
The plugin adds all necessary files to make it work. You also have the option to call any kind of file with  pirobox extended,all you have to do is follow the instructions on the page <a href="http://www.pirolab.it/pirobox/">Pirobox</a> !! ENJOY
Author: Diego Valobra
Author URI: http://piroblog.pirolab.it/
Version: 1.1
add_action('init', 'pirobox_init');
add_action('wp_head', 'pirobox_head');

function pirobox_init() {
$piro_path = WP_PLUGIN_URL.'/pirobox-extended-for-wp-v10';

//You can choose your style here below, the default style is "/css_pirobox/style_1/style.css"
wp_enqueue_style( 'pirobox', $piro_path.'/css_pirobox/style_1/style.css');
//wp_enqueue_style( 'pirobox', $piro_path.'/css_pirobox/style_2/style.css');

wp_enqueue_script('pirobox-js', $piro_path.'/js/pirobox_extended_feb_2011.js','jquery');

function pirobox_head() {
global $post;
<!-- pirobox extended options, speed , opacity background, image scroll, true = fixed, false = relative -->
<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery('a[href$="jpg"], a[href$="bmp"], a[href$="gif"], a[href$="jpeg"], a[href$="png"]').addClass('pirobox_gall_<?php echo $post->ID; ?>').attr('rel','gallery');
piro_speed :700,
bg_alpha : 0.5,
piro_scroll : true,
piro_drag :false,
piro_nav_pos: 'bottom'
<!-- end options -->

The jquery-plugin itself is my new best friend regarding lightboxes. If you want to take a look, you find all the info at http://www.pirolab.it/pirobox/ .


Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:


Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )


Verbinde mit %s