Showing posts with label Thickbox. Show all posts
Showing posts with label Thickbox. Show all posts

Saturday, 13 June 2009

TIP - 'SnagIt' & Image Mapping

email me

This post is only a little taste, a teaser, of what you can achieve using SnagIt. It isn't simply a 'screen capture' utility, it can be used to produce small objet d'art.

 

Can you spot the Google Ad? 


Can you spot the Google Ad?

 

If you combine a 'good' graphics programme (GIMP is 'Open Source' and FREE) with 'WLW', it is only your imagination that limits what you can produce for the edification of your visitors. Let me put it another way; why would you spend hours behind your camera capturing exotic and unusual subjects, and then serve them up in a frying pan rather than on an elegant Wedgewood dinner plate?

OK, that was a bit of an arrogant statement, but my point is that, despite some of the limitations that Blogger imposes on the average user, you can post images that grab the imagination!

The 'girlies' I have used here have featured before when I showcased  'Thickbox', another great little FREE script. The girls are only a bit of eye-candy and you shouldn't hold it against me!

SnagIt can easily insert 'hotspots' on an image that takes you to a new page when the graphic is clicked. This is called 'Image-Mapping', but it is worth it. Once the hotspots have been created on a single graphic image you can direct the viewer to just about anything you care to link to.

You can do exactly the same thing without needing to invest in a software programme. Visit the Poor Person's Image Mapper page and give it a test run. I am always ready to field questions if you run into trouble!

You won't regret it ...

back to the top

 

Saturday, 22 March 2008

TIP - Tools Of The Trade

email me

I have touched on the subject of the tools you should try to use in a previous post, but I wanted to introduce another 'clever' little script and decided that it was worth resurrecting the advice so that I could '... kill two birds ...', in a manner of speaking!

 

A screenshot of EditPad Pro in use
A screenshot of EditPad Pro in use.
The thumbnail on the right is a screenshot of my favourite text editor. If you mouseover the image you will see the effect I am introducing you to in this post. Like 'Thickbox' and 'Lightbox', this is JavaSript, and it provides one way of displaying your graphics without costing you much in the way of overhead. The actual image is a large(ish) 912px by 710px display, and I have set the parameters for this display to show the image at its full scale, because I have textual matter in the image that I want my visitor to read. In practise, especially if you only want a photograph to be displayed at a larger size than the thumbnail, the larger image can be set to any reasonable size that can be accommodated within an average viewers browser window; probably 800px by 600px would be sufficient to showcase any image you post. The script also has a hidden function that allows the viewer to go to the full-sized raw image when clicked. This is good for Blogger, where clicking on an image usually takes the viewer to the raw image in another window.

 

EditPad Pro displaying 'syntax coloring' for an HTML document.
EditPad Pro displaying 'syntax coloring'
for an HTML document.
Similar screenshot, but this time with the HTML document tab selected. Here you can clearly see the colour coding or 'syntax coloring' of the HTML document (stop squinting at the back - mouseover the image!) which makes it a breeze to check all the different lines of code. It also helps if you activate the line numbering feature. Most of these features are available in the 'Lite' version which is FREE for personal use. You really should visit the EditPad Lite homepage (it will open in a new window!) to check out the many features.

I was an avid user of EditPad Lite for years, then one day I realised I used it so frequently that perhaps the Pro version was something I ought to be investigating. Not one to part with my money easily, I checked (and double-checked) the features page and realised that there were some Pro features that would make my life a whole lot easier. So, out came the credit card. And being an impulsive sort of guy, I also bought AceText at the same time. I will introduce you to the author, Jan Goyvaerts, in my next post. Suffice it to say that he writes small utilities that do exactly what they say they will do, and you get lifetime updates and support. What's not to like about that?

BTW, I composed this whole post in EditPad, copied it and pasted it into the 'Edit HTML' window, NOT the 'Compose' (or WYSIWYG) window of the post. I previewed it, tweaked anything that didn't appear to display as it should, and then hit 'PUBLISH POST'. Done!

So much for the 'clever' thingy I promised to introduce you to. Now you have an idea how it works. The 'mouseover' effect enlarges a thumbnail without the visitor having to leave the page. And, if they really want to see the raw image, all they have to do is click the enlarged image to be taken to it.

Cool, huh? But you'll have to wait for the next post to read the full 'skinny' on the 'how to' ...

back to the top

 

Wednesday, 17 October 2007

TIP - Alternative Displays

This is an alternative display, using "Thickbox", for a series of small thumbnails that, when clicked, will take the viewer to a 'Gallery' display without actually leaving the page.
If the "Thickbox" script works as it should, you will be served up a larger image, superimposed on this page, and you will see 'navigation' links from one picture to another. What more can you ask for?
The following series of pictures are of some very attractive young ladies that 'T3 Magazine' uses to advertise their electronic goods. You have to look closely to actually see the electronic items in question (for instance, the fashionable pelmet that girl #8 is wearing detracts somewhat!), but that's OK, because I'm not really advertising for them.
So, here goes!

'T3' girl 1 'T3' girl 2 'T3' girl 3

'T3' girl 4 'T3' girl 5 'T3' girl 6

'T3' girl 7 'T3' girl 8 This is  NOT a 'T3' girl!
I have to strongly emphasise that the series of pics above are not 'sexist' in any way; they were used because they were a convenient 'series' available on my hard drive. Oh, okay, and for a bit of entertainment for the lecherous old men that might visit this page. (see the comment by Anonymous)
That's the end of the demo. You should now have a clearer idea about what you can accomplish on your Blog. Whether it is an 'iBlogger', 'Wordpress' (Wordpress has it built in as a plugin!), or any other.
In line with David McMahon's philosophy of trying to help as many interested bloggers as possible, I am more than willing to help, either here or one-on-one, anybody that asks. If I find that several 'peeps' ask the same question I may resort to using this medium to provide a full explanation so that bloggers can drop by and pick the ideas they wish to use.
Happy Blogging!

Thursday, 24 May 2007

Leap of Faith, too . . . Implementing Thickbox

I am about to use one of David McMahon's original high-res photographs that he sent me some time ago, but which he hasn't actually posted on his blog one that he published on authorblog titled Jose, Can You See . . .. This should demonstrate how a 'medium-sized' picture on a Blogger page (as displayed on David's blog and reproduced in a similar size here) can be viewed at its best by using the 'Thickbox' technique. I like the effect very much; you have to decide whether it is something you'd like to use, too!

OK, let us make a start!

---------------------------------------------------------------------------------

1. Choose to make a new post (I don't think I need to add screencaps for the obvious steps - but correct me if I am wrong).

---------------------------------------------------------------------------------

2. Choose your method, 'Compose' or 'Edit HTML'. I prefer the latter because I have more control, but your mileage will vary. Be warned, you will HAVE to use 'Edit HTML' at a later stage.

I prefer to compose the post in a text editor - (click on the thumbnail for a larger image)

I also compose my posts in a text editor outside the post window, and when I am satisfied that everything is as I want it, I copy/paste into the editing window and save it (but, of course, Blogger has introduced an 'Auto-save' feature which is an excellent idea!). You can see from the 'screencap' that I have already started to format my paragaraphs and, where required, to italicise or bold the text.

---------------------------------------------------------------------------------

3. Before I upload the image I need to take a look at its size in 'high-res' format. This one happens to be 3008-pixels-wide and 2000-pixels-high (size: 827,906 Bytes).

  • Far too large to display as a standalone image in a new window; the viewer would be forced to use scroll bars to view the whole image.
  • Far too large to save many images of this size to your (limited) Blogger disk space allocation.
  • Far too large for a user with a dial-up connection (DUN) who would have to wait an interminable age for the picture to download and appear on his or her screen.
'Thickbox' will automatically adjust it to a viewable size that will display centred in the available space in the viewing window, whatever the screen resolution the viewer is using, but the other two factors mentioned above are still important, because Thickbox will NOT resize your raw picture for you.

I will now upload the image after having reduced it to 800px by 532px (size: 22,382 Bytes). I simply used Irfanview (discussed elsewhere) to reduce the width to 800 pixels and it did the rest for me:

The code returned for an uploaded image

The first thing to notice is how Blogger 'codes' the HTML for the image. In the 'screencap' I have deliberately NOT posted any text so that you get an idea of what sort of thing you need to look for when you start to fiddle with the HTML. In any event Blogger ALWAYS places the uploaded image at the beginning of your post, regardless of where you last placed your cursor. This is an annoying quirk but, we can use it to our advantage if we know that the last image uploaded will always be the first bit of text you come across when you're editing in HTML.

I have highlighted and arrowed the characters "-h" that appear immediately after "s1600". REMOVE THEM. Do it the first time you see your code so that you don't forget later when you're adding other bits as explained in step 4 below!

---------------------------------------------------------------------------------

Code changes highlighted and arrowed

4. Here is the same code again, but note the highlighted additions (errmmm... the deletion is obvious by no longer appearing there!).

  1. Added the code for centering the paragraph and 'closed' the tag.
  2. Added the 'class' telling the script to call up Thickbox.
  3. Added the 'title' text.
  4. Added the 'alt' text.

---------------------------------------------------------------------------------

Whew! That was a toughie - FOR ME. I began to get confused as to whether I was adding screen captures or the actual picture. Had to delete and re-upload a couple of times. But, if you've come this far, then here is the original David McMahon photograph (slaps head! - must remember to add the copyright):

 

Sunrise in the City! - (click on the thumbnail for a larger image) Photograph: © David McMahon

 

That's ALL, folks

back to the top

 

Saturday, 19 May 2007

Leap of Faith . . . Editing your template for Thickbox

This is your 'leap of faith'. This is where you have to make a decision as to whether stepping out into the unknown is worth the end result. I have shown you what you can achieve; you have to decide whether it is worth the effort. I will hazard a guess that most of you decide that it probably is!

So, let us make a start.

---------------------------------------------------------------------------------

1. Call up your page in a new window and check that you're 'signed in'. You should now have this tutorial and your homepage open, either as two separate windows or two tabs (IE7 or Firefox or whatever), and you will need to switch between windows to complete the various steps I will outline.

---------------------------------------------------------------------------------

2. Click on 'Customize' (I vill zay zis only vunce - all editing is being done on YOUR page!).

---------------------------------------------------------------------------------

Choose to edit the  HTML - (click on the thumbnail for a larger image)

3. Choose to 'Edit HTML' when you are faced with these choices.

---------------------------------------------------------------------------------

Save your template - (click on the thumbnail for a larger image)

4. Save your template (but see below) . . .

---------------------------------------------------------------------------------

My preference for saving a template - (click on the thumbnail for a larger image)

5. My preference for saving a template is to copy the template from the editing window by positioning the cursor in the window, pressing 'Ctrl+A', then 'Ctrl+C' (this will select all the text in the window and copy it to the clipboard). Now paste the copied text into your text editor (Notepad or one of the editors I've recommended previously), by opening it and pressing 'Ctrl+V'. Then SAVE that as a text file, with a name you can recognise easily, and in a place that, if you need to, you can find it quickly.

Note: do NOT use a word-processing package like 'Word' as this will corrupt the text you've just saved. For the 'geeky', the difference is between UTF-8 and UTF-16, but that's another story for another time!

---------------------------------------------------------------------------------

6. Find the last 'close brace' above the '</head>' tag. You could scroll down (see image), but the easiest way is to click the 'Edit ---> Find on this page' link in your browser and type '</head>' (without the quotes) into the box and click 'Next'.

---------------------------------------------------------------------------------

7. Insert two or three returns between the curly bracket and the line that reads "]]></b:skin>". If your template doesn't have this line, insert the following code just above the '</head>' tag and it will still work! Copy & paste the code in the box:


/* ----- thickbox settings ----- */

#TB_window {
font: 12px Arial, Helvetica, sans-serif;
color: #333333;
}

#TB_secondLine {
font: 10px Arial, Helvetica, sans-serif;
color:#666666;
}

#TB_window a:link {color: #666666;}
#TB_window a:visited {color: #666666;}
#TB_window a:hover {color: #000;}
#TB_window a:active {color: #666666;}
#TB_window a:focus{color: #666666;}

#TB_overlay {
position: fixed;
z-index:100;
top: 0px;
left: 0px;
background-color:#000;
filter:alpha(opacity=75);
-moz-opacity: 0.75;
opacity: 0.75;
height:100%;
width:100%;
}

* html #TB_overlay { /* ie6 hack */
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}

#TB_window {
position: fixed;
background: #ffffff;
z-index: 102;
color:#000000;
display:none;
border: 4px solid #525252;
text-align:left;
top:50%;
left:50%;
}

* html #TB_window { /* ie6 hack */
position: absolute;
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
}

#TB_window img#TB_Image {
display:block;
margin: 15px 0 0 15px;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
border-top: 1px solid #666;
border-left: 1px solid #666;
}

#TB_caption{
height:25px;
padding:7px 30px 10px 25px;
float:left;
}

#TB_closeWindow{
height:25px;
padding:11px 25px 10px 0;
float:right;
}

#TB_closeAjaxWindow{
padding:7px 10px 5px 0;
margin-bottom:1px;
text-align:right;
float:right;
}

#TB_ajaxWindowTitle{
float:left;
padding:7px 0 5px 10px;
margin-bottom:1px;
}

#TB_title{
background-color:#e8e8e8;
height:27px;
}

#TB_ajaxContent{
clear:both;
padding:2px 15px 15px 15px;
overflow:auto;
text-align:left;
line-height:1.4em;
}

#TB_ajaxContent.TB_modal{
padding:15px;
}

#TB_ajaxContent p{
padding:5px 0px 5px 0px;
}

#TB_load{
position: fixed;
display:none;
height:13px;
width:208px;
z-index:103;
top: 50%;
left: 50%;
margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */
}

* html #TB_load { /* ie6 hack */
position: absolute;
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
}

#TB_HideSelect{
z-index:99;
position:fixed;
top: 0;
left: 0;
background-color:#fff;
border:none;
filter:alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
height:100%;
width:100%;
}

* html #TB_HideSelect { /* ie6 hack */
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}

#TB_iframeContent{
clear:both;
border:none;
margin-bottom:-1px;
margin-top:1px;
_margin-bottom:1px;
}

/* ----- end of thickbox settings ----- */

/* ----- start of Terry's settings ----- */

.img_left { /* terrys hack */
float: left;
margin-right: 20px;
margin-bottom: 6px;
}

.img_right { /* terrys hack */
float: right;
margin-left: 20px;
margin-bottom: 6px;
}

.clear { /* terrys hack */
clear: both;
}

.dropcap { /* terrys hack */
font-family: times;
color: #8CA3BB;
font-size: 70px;
float: left;
padding-right: 2px;
padding-top: 2px;
line-height: 60px
}

/* ----- end of Terry's settings ----- */

---------------------------------------------------------------------------------

8. This is what it should look like after you've pasted in the code. Still with me?

---------------------------------------------------------------------------------

9. Find the '</head>' tag again, then copy/paste the following code just above it:


    <script src='http://www.tapmal.com/thickbox/jquery.js' type='text/javascript'/>

    <script src='http://www.tapmal.com/thickbox/thickbox.js' type='text/javascript'/>

---------------------------------------------------------------------------------

10. This is what your template should look like after you've pasted in the relevant code.

A brief explanation: the code is telling the blogger engine where to find the JavaScript sources for the Thickbox to work. I have currently pointed it to my own server, which will always be available with the most up-to-date "js" scripts for this function. You see, I use this path as well, so you can be certain that as long as I am on the web, you don't have to worry about where to get your JavaScript or your animated 'loading' GIF.

---------------------------------------------------------------------------------

11. You can click on the 'PREVIEW' link, but you won't notice any change to how your blog displays, and that is because the bits of code we've put in don't actually change how your blog is displayed UNTIL you call the specific function. But more about that in the next post.

---------------------------------------------------------------------------------

Now 'SAVE' your template (you already have the original so you don't have to be too concerned) and 'View' your blog. No difference? Bravo! That means all the 'tweaking' you've done was completed successfully!

So far, so good! Now you just have to wait for the second part to see how to 'edit' each of your picture posts to achieve the 'Thickbox' effect.

Come back again, soon!

back to the top

 

Cracked it . . .

This is just here to tell you that I've managed to crack the prickly problem of making 'Thickbox' work with Blogger-uploaded pictures.

More will be added to this post . . . standby!

---------------------------------------------------------------------------------

Update: - (later in the day)

We will have to tackle this in two parts.

  • The first is the 'edit' you need to apply to your template.
  • The second will be what you need to do to get your picture(s) to display in the sexy Thickbox format.

The next couple of posts will deal with each scenario and, just to show that everything actually works as it should, I will display the larger graphics as a Thickbox image!

Edit: change of plan - I will display the pictures as full-sized images so that you can READ the text the image displays!

If you are still not clear about what a 'Thickbox' display looks like, you can scroll down the page to a couple of earlier posts, or if you prefer, click on the following links: Test Post and Picture displays - 101b.

All this is in response to something started by David McMahon, who emailed me with a 'suggestion' that I respond to some questions on his blog, and then subsequent questions and comments by papoosue, phaseoutgirl and B.T.Bear (esq.) (who does a mean tutorial, too)!

Gather round, and the first to claim success will get an 'honourable mention' on David McMahon's authorblog.

back to the top

 

Saturday, 12 May 2007

TIP - Picture displays 101(b)

A bit of blurb on David McMahon - (click on the thumbnail for a larger image)This is an experiment to attempt to 'integrate' the lightbox variant, called "Thickbox", into a standard Blogger post.

If it works, then I've cracked this prickly little problem. Keep your fingers crossed, because if this thing comes off, none of our blogs are going to be viewed the same way ever again!

And if this works I will try the 'Gallery' display for pictures, still using 'Thickbox', but it will require much more editing of the HTML in the post. I am sure that a lot of people will throw their hands up in horror at this suggestion, but I will attempt to walk you through all the processes, step by step, until editing your pictures becomes second nature.

And I will explain HOW in the next post.

Promise!

---------------------------------------------------------------------------------

A bit of blurb on David McMahon - (click on the thumbnail for a larger image)

Update: 11 May 2007

Darn, but it only works 'partially'.

The script is being called successfully in both these examples, but the larger image that was uploaded to the Blogger server for the first attempt is 'refusing' to open!

The image on the right opens as it is expected to, the only difference is that the larger image is on a different server (my own). Don't understand why this is happening, but I am investigating . . .

Watch this space!

Promise!

---------------------------------------------------------------------------------

Update: 19 May 2007

Cracked it! I will post the step-by-step 'tute' as soon as I've managed to get all the screen captures necessary to make things crystal clear.

Watch out for a new post!

back to the top