Connect with us

Plugins

Gallery Plus

Published

on

You may notice on some of our posts a gallery of images. We are using the built in WordPress up-loader, and when there are a few images we use the gallery insert button. But we are fans of jQuery and are using Thickbox.

As you know the basic gallery insert with attach the gallery images and link them to an image attachment page. Instead we installed the Gallery Plus plugin by Justin Hawkwood.

This plugin alone will add the ability under the Settings — options to add a “title” attribute in the <a> link and a rel attribute of “lightbox”.

Now I do have some site’s with lightbox installed, and I am a fan of the script, but I didn’t want to use the Scriptaculous script. And I do know that there is a Lightbox script based on jQuery.

Anyway… since I am using the Thickbox script on this site, the plugin needed a little tweaking:

There are two files contained in the download: gallery-plus.php & options.php, both with need to be edited. Lets start with the options.php:

Find.

update_option('gallery_plus_overlay', $_POST['gallery_plus_overlay']);

Add the 2nd line below, like this.

update_option('gallery_plus_overlay', $_POST['gallery_plus_overlay']);
update_option('gallery_plus_overlay2', $_POST['gallery_plus_overlay2']);

Next Find.

$gallery_plus_overlay = stripslashes(get_option('gallery_plus_overlay'));

Add the 2nd line below, like this.

$gallery_plus_overlay = stripslashes(get_option('gallery_plus_overlay'));
$gallery_plus_overlay2 = stripslashes(get_option('gallery_plus_overlay2'));

This is where it gets tricky. Find these next lines.

<tr valign="baseline">
<th scope="row"><?php _e('"rel" value in &lt;a&gt; tag:') ?></th>
<td><select name="gallery_plus_overlay">
<option value="none"<?php if ($gallery_plus_overlay == 'none') echo ' selected="selected"'; ?>>none</option>
<option value="lightbox"<?php if ($gallery_plus_overlay == 'lightbox') echo ' selected="selected"'; ?>>lightbox</option>
</select> Specify which, if any, javscript image overlay package to use. THIS PLUGIN DOES NOT INSTALL ANY OVERLAY PACKAGES.<br /><em>Note: Only applies when <strong>Link type</strong> is set to "image".</em>
</td></tr>

And Add these lines above.

<tr valign="baseline">
<th scope="row"><?php _e('Insert "class=..." Attribute In Link:') ?></th>
<td><select name="gallery_plus_overlay2">
<option value="none"<?php if ($gallery_plus_overlay2 == 'none') echo ' selected="selected"'; ?>>NONE</option>
<option value="thickbox"<?php if ($gallery_plus_overlay2 == 'thickbox') echo ' selected="selected"'; ?>>thickbox</option>
</select> <em>Note: Only applies when <strong>Link Images To Full Resolution</strong> is on.</em>
</td></tr>

It should look like this:

<tr valign="baseline">
<th scope="row"><?php _e('Insert "class=..." Attribute In Link:') ?></th>
<td><select name="gallery_plus_overlay2">
<option value="none"<?php if ($gallery_plus_overlay2 == 'none') echo ' selected="selected"'; ?>>NONE</option>
<option value="thickbox"<?php if ($gallery_plus_overlay2 == 'thickbox') echo ' selected="selected"'; ?>>thickbox</option>
</select> <em>Note: Only applies when <strong>Link Images To Full Resolution</strong> is on.</em>
</td></tr>


<tr valign="baseline">
<th scope="row"><?php _e('"rel" value in &lt;a&gt; tag:') ?></th>
<td><select name="gallery_plus_overlay">
<option value="none"<?php if ($gallery_plus_overlay == 'none') echo ' selected="selected"'; ?>>none</option>
<option value="lightbox"<?php if ($gallery_plus_overlay == 'lightbox') echo ' selected="selected"'; ?>>lightbox</option>
</select> Specify which, if any, javscript image overlay package to use. THIS PLUGIN DOES NOT INSTALL ANY OVERLAY PACKAGES.<br /><em>Note: Only applies when <strong>Link type</strong> is set to "image".</em>
</td></tr>

Now lets edit the gallery-plus.php file:

Find.

'overlay' => get_option('gallery_plus_overlay'),

Add the 2nd line below, like this.

'overlay' => get_option('gallery_plus_overlay'),
'overlay2' => get_option('gallery_plus_overlay2'),

Next Find.

<a href=\"$full_image_href[0]\"" . (($overlay != 'none') ? ' class="' . $overlay . '"' : '') . ($atagtitle ? " title=\"".trim(htmlspecialchars($attachment->post_title, ENT_QUOTES ))."\"" : '') . "><img src=\"$thumbnail_link[0]\" title=\"".trim(htmlspecialchars($attachment->post_title, ENT_QUOTES ))."\" alt=\"".trim(htmlspecialchars($attachment->post_excerpt, ENT_QUOTES))."\" width=\"$thumbnail_link[1]\" height=\"$thumbnail_link[2]\" class=\"attachment-thumbnail\" /></a></{$icontag}>";

And change the $overlay to $overlay2, like this.

<a href=\"$full_image_href[0]\"" . (($overlay2 != 'none') ? ' class="' . $overlay2 . '"' : '') . ($atagtitle ? " title=\"".trim(htmlspecialchars($attachment->post_title, ENT_QUOTES ))."\"" : '') . "><img src=\"$thumbnail_link[0]\" title=\"".trim(htmlspecialchars($attachment->post_title, ENT_QUOTES ))."\" alt=\"".trim(htmlspecialchars($attachment->post_excerpt, ENT_QUOTES))."\" width=\"$thumbnail_link[1]\" height=\"$thumbnail_link[2]\" class=\"attachment-thumbnail\" /></a>
</{$icontag}>";

note: I know that this is really just riding the plugin of the lightbox script and telling it to use the thickbox only script, but till it’s added in, this is the way I went about it.

Thanks

News

Possible photo tagging plugin update

Have you tried to download any of the community tagging plugins with no prevail?

Published

on

I recently posted a comment in response to a post on Justin Tadlock’s WordPress site about custom taxonomies. Then was asked by a reader how I integrated my custom taxonomies with one of Matt Mullenwegs “tagging” plugin.

  1. Community Tags
  2. Matt’s Community Tags

Anyway, I tried to install and use both plugins before with no luck. But decided to download Community Tags and try my luck again. With some hacking, I got it working. For a demo you can check out and tag (someone you know or recognize only, please) a picture over at my photography site, http://thefrosty.com.

Anyway, before I get carried away, I had a reader email me and ask how I integrated the plugin. And I thought I would ask you if you would be interedted in a re-re-release of the plugin.

At present time I do have some array errors, but everything works just fine as is.

Your comment feedback would be great! Thanks!

Continue Reading

Plugins

Follow up on WordPress plugin changelogs

Following up on the WordPress weekly, and the final topic of discussion; changelogs and implementing them into your plugins. Now a plugin, shows the changelog in your plugin page…

Published

on

Changelogger, a plugin which will show the changelog of that plugin directly on your plugin page, as long as it exists within the plugin readme.txt file. Download it from the WordPress plugin repository.

Remember, if your a plugin developer, please read and use this template for your readme file.

Continue Reading

Cult

Initial dot org release of VideoPress

Published

on

Version 0.1.0 of VideoPress now available for you self hosted WordPress blog.

Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Cynthia Frelund Net Worth: How Rich is Cynthia Frelund Actually?

Cynthia Frelund Net Worth: How Rich is Cynthia Frelund Actually?

Cynthia Frelund is Data Analyst Expert for the NFL Media Network where she focuses on breaking down all the numbers on the show Numbers Game. Moreover, from the perspective of the fans, she is a key influencer in their fantasy football predictions. As of 2019, Cynthia Frelund net worth is estimated to be $1 million. […]

Ron Rivera Net Worth: How Rich is the former Panthers Coach?

Ron Rivera Net Worth: How Rich is the former Panthers Coach?

Ron Rivera is a retired football player and a former coach who managed Carolina Panthers in the National Football League. As of 2019, Ron Rivera net worth is estimated to be $5 million. Rivera was born on January 7, 1962, in Fort Ord, California. His father Eugenio Rivera was a military man. Due to his […]

Bianca Del Rio Net Worth: How Rich is the Drag Queen Actually?

Bianca Del Rio Net Worth: How Rich is the Drag Queen Actually?

Roy Haylock professionally known by the stage name Bianca Del Rio, is an American drag queen, comedian, actor, and costume designer. She is best known for winning the 6th season of RuPaul’s Drag Race. As of 2019, Bianca Del Rio net worth is estimated to be $2 million. Haylock was born on June 27, 1975, in Gretna, Louisiana. He […]

Tucker Roberts Net Worth: How Rich is Olivia Munn’s Boyfriend?

Tucker Roberts Net Worth: How Rich is Olivia Munn’s Boyfriend?

Tucker Roberts is an American businessman who recently came in the spotlight after his relationship with Hollywood actress Olivia Munn. As of 2019, Tucker Roberts net worth is estimated to be $10 million. Tucker was born in Philadelphia, Pennsylvania to parents Brian Roberts and Aileen Kennedy Roberts. His father is the CEO of Comcast, an […]

Trending