Jan 192015
 
 Posted by on 19/01/2015 How-To's Tagged with: ,  No Responses »

Fortunately Ben Gillbanks observed the problems and released version 1.3.1. Still are 2 minor issues in the new version and I mentioned them on WordPress forum. Until Ben will come back from holiday, can replace those 2 variables in the plugin js file or can use my js file from the end of this post.

Few days ago I wrote an article about Browser Shots plugin which was updated with necessary features but the update break the Visual Editor. As Ben Gillbanks promised, he took care of the problem and yesterday he updated the plugin to fix the Visual Editor.

More than that, he took out the ugly javascript alert boxes, and replace them with a nice pop-up for setting the plugin parameters. Also, a nice addition (even if is not documented in any way), is that you can set a caption for the image by writing the text in the editor, then select the words and press the Browser Shots button.

browser-shots-pop-up

Unfortunately… the pop-up still not works as expected… It add the same shortcode as the old version. Even if in pop-up you can add a custom height and a custom link, they are never used. Instead only the link to the image and its width is used to generate the shortcode.

Why? About the link… is simple – a textbox for link is added in pop-up, but its value is never used later in the code. And the height is used like this:

Here is a logical glitch, if “width” exist (and probably this is always true), the else clause is not read and settled “height” is never used. This could be fine if the default height would be settled as “auto”, but no, the default height is 450px and because cannot be settled in the pop-up will have to overwrite manually this value.

So, again, inspired by the new code added by Ben, I corrected it and I added fields to define all parameters for the shortcode, including tooltips for helping people to set these parameters.

 The whole code (including the definitions for new fields in pop-up) can be downloaded from here: Download the new version of Browser Shots js file

Unzip the file and copy it by ftp under /plugins/browser-shots/js/, overwriting the original file.  After that, clear your browser cache.  I spent hours trying to figure out why my changes aren’t executed until I found that my browser still execute the original file.

 

Adding jQuery plugins in Suffusion

Adding jQuery plugins in Suffusion

In this article I will try to show you the basic directions for inserting jQuery codes in Suffusion. The principles are the same for any javascript plugin, but bear in mind that it is not a straight way for getting these plugins to works. Those plugins wasn’t created specifically for WordPress, sometimes they are conflicting with WordPress or theme or other plugins javascript’s.

Continue reading...
Change header as scrolling the page

Change header as scrolling the page

An easy to understand article about how to use jQuery and CSS for obtaining a header which change it’s look when the visitor scroll down on the page. The header shrink to make room for only the navigation bar, which bar will contain a smaller version of logo. Pretty much as you seen on Facebook, and now on Drafie’s Design too.

Continue reading...
Changing Suffusion for WordPress 3.6.

Changing Suffusion for WordPress 3.6.

If you upgrade WordPress to version 3.6. will notice that Suffusion cannot save anymore the changes in options. This is because the new version of jQuery UI used in this update (1.10.3) don’t have anymore the “select” method for tabs, and this method was used in backend of Suffusion for Save/Reset button tabs.

Continue reading...