Plugins
Gallery Plus
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 <a> 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 <a> 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
Cult
Initial dot org release of VideoPress
Plugins
Using the swekey on your blog
If you’ve downloaded the Swekey plugin and plan on using it for users to login here is what you might see.
The first image here shows what a user might see if and when you’ve got “allow registers” and said user has a Swekey plugged into there computer while registering to your site. I registered on a test blog I use, once I typed in my user name and email this pop up is what I saw. I checked ok, and another message stated that my swekey was now attached to my profile.
When I went to my profile I saw the Authentication section, where I could check or uncheck to use my Swekey that’s attached to my profile. Essentially with this enabled, I’ll I would have to do to login to the administration panel was have the usb with me, and at any public computer can pop it in and type in the address with out remembering my user name or password.
So.. I did a little test and this is what I saw. While logged into the admin panel, I pulled the usb key out and in a few seconds the page sent me to a “attempting to log out” page, and was unable to access the site until I put the swekey back in.
Plugins
Swekey: A safe web enabler usb?
I received a Swekey in the mail this week. What’s a Swekey you ask?
Like regular keys protect your car and your home against thieves and burglars, the swekey protects your internet accounts against any kind of piracy
Any swekey protected web site will never accept to log you in if your swekey is not plugged into your computer… Read more
So I am going to start off by stating that there is a WordPress plugin to enable this handy little USB key on WordPress powered sites. For information on the plugin you can visit it on the plugin directory.
Hopefully you’re using the latest WordPress install (2.7.1), in which you can head to the plugins menu and click on Add New. Do a search for Swekey and install the latest version (which at the time of writing this was version 1.0.7).
Once you’ve got the latest version installed head into your settings and find the Swekey setting page which will look like:
I’m going to have to do some research on the first three options in the setting page, which I am not sure what other server URL I’d use or if needed be outside the localhost (which I am assuming is default — or left blank as it states).
The fourth option asks you whether you want to accept regular login’s without the swekey (in cause of misplacement) or to only allow login access with the swekey. For the most part I would not choose the latter option as the swekey isn’t that popular. This also might only be handy at the current state to the people inside the development of the Swekey, but a good idea none the less.
The next option inside the setting panel will either allow or disallow your users to attach/detach there profiles with the swekey to your site. If you’re site doesn’t allow users to register and you hand register everyone, you may want to do the same with this option.
Second to last, you can edit the Supported Brands: 8 chars hexadecimal upper case value. Which at this time am not sure what it does..yet.
The last option is simply a placement for the swekey logo if you choose to upload one.
So now we’ve got the plugin installed, I guess I better get to using and testing it before continuing anymore.. 🙂
-
Tips & Tricks7 months ago
WordPress Security Hacks
-
Pages2 months ago
Write For Us – Guest Post
-
Showcase2 months ago
StylizedWeb.com
-
News2 months ago
How to: Show/Hide any div box with jQuery in WordPress
-
Tips & Tricks4 weeks ago
Remove the title attribute using jQuery
-
Tips & Tricks6 months ago
How to: show/hide a widget in WordPress with jQuery
-
Plugins6 months ago
Top Membership plugins
-
Tips & Tricks2 months ago
Limit the characters that display on the_title
You must be logged in to post a comment Login