Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

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

 

Thursday, 20 December 2007

TIP - Screw that Spanner

email me

I may be in a majority of ONE, but I've always disliked the "Screwdriver & Spanner" icons that appear below every widget in the sidebar. I KNOW my visitors cannot see these distractions, and that they only appear on the page of the blog owner, but I don't like the S&S, so there!

It irritates me because I know that I can access the widgets through my control panel, BUT your take might be different. Especially if you've added a lot of widgets and when you look at them in "Add and Arrange Page Elements", you don't have a clue which one is which. If you are in this category, then skip this 'tute'!

And then there is that "Pencil" icon below every post! Do you need it? For my part the answer is an emphatic 'YES', because I've lost count of the number of times I've re-read a post and found a typo that needs a quick correction. At least the "Pencil" takes me directly to the edit window of the post without having to click through several different steps to reach the same area.

 

 


 

Want to remove one, or the other, or both? You've come to the right place!


 

1. THE PENCIL

Go to Settings | Basic and where it asks you the question, "Show Quick Editing on your Blog?", simply answer "No"

Done.


 

2. THE SPANNER & SCREWDRIVER

Only a bit more complicated. That is, if you consider editing HTML as complicated! You only have to insert a bit of CSS code into the CSS already in your template.

Go to Template | Edit HTML, scroll down until you find the CSS properties and insert the following code anywhere on a new line immediately after a closing brace [ } ]:

.quickedit {
display:none;
}

It is a good idea to put a 'commented-out' description of what you've just inserted, so that you can find it again quickly if you wish to reverse your editing.

 

 


 

Here is another 'screencap' of the same area I captured in the first pic, showing that the 'spanner has been screwed', but if you start to get withdrawal symptons without them there, retrace your steps and undo what you've just done!

 

 

Happy Blogging!

back to the top

 

Sunday, 16 December 2007

TIP - Mouseover Fun

email me

A comment left on David McMahon's Blog by the blogger david of David's "Images of Nature" Photography Gallery fame, asked how the 'Mouse-over' effect was done on the "Invitation" graphic used on David McMahon's page.

It is a simple Javascript function that anybody can use, so here are some quick instructions on how to achieve it. And since david asked, I trolled across to his site and stole one of his graphics to best illustrate what I am about to do!

 


 

1. It isn't necessary to backup your template as you aren't going to touch that side of things!

 


 

2. Choose the image you want to display as the permanent image. Do all the image editing you need to display it at its best. One good idea is to give the image a border, one that you will use again in the second image (see below), so that the mouseover transition appears seamless. Try and make it a reasonable size for the display space of your page, but in any event Blogger will give you the best fit when you upload the image.

2a. Now select the image you want to use as the alternative (or mouseover image) and make sure you crop it to exactly the same size as the previous one. If you used a 'frame' of any description make sure that that frame is also used for the second image.

Here are the two images I intend to use, cropped, edited and framed:

 

 


 

3. I have decided that the picture of the Purple tulips is the one that will appear as the 'static' image and that the Pink tulip will appear as the alternative, or 'rollover', image.

Open a NEW post. You will not be publishing this one, and will eventually delete it after first saving it as a draft. It is only to help you upload your images and get the code that is returned.

 

 

 

 


 

4. Here is the code for the two images you uploaded. Make a note of the bits I have highlighted. That is what you will eventally copy to your actual post, totally ignoring the rest of the Blogger code. You don't want the displayed image to be 'clickable', and for it to open up in a new window. That would sure spoil the effect you are trying to achieve!

 

 

 


 

5. All that remains to do is to add the Javascript to 'envelope' the two images, or add the pic URL's to the Javascript, depends on how you see it. And here it is:

 

<table align="center"><tr><td align="center">
<img onmouseover="Javascript: this.firstsrc=
this.getAttribute('src'); this.secondsrc=
'http://bp0.blogger.com/_fV9I2C_dAUY/R2Wrh1GGLRI/
AAAAAAAAASM/pn8sq1dh8vc/s400/tulip_pink_round_blu.
gif'; this.setAttribute('src',this.
secondsrc);" onmouseout="Javascript: this.setAttribute
('src',this.firstsrc);" alt="" src='http://bp2.blogger
.com/_fV9I2C_dAUY/R2WrhVGGLQI/AAAAAAAAASE/
gPIt_Eq88zw/s400/tulip_purple_round_blu.gif' />
</td></tr></table>

 

Some things to draw to your attention:

  • You can actually copy/paste the code from the box and save it somewhere, preferably in the [ Settings | Formatting | Post Template ] area of your Admin page (see this previous post).
  • The SECOND (rollover, mouseover, whatever) picture link is the first one to appear in the script; the FIRST (static) picture link is included as the second link reference - (hey, it's not me being difficult - it's the way the script works!).
  • You must (duhhh, obviously!) change the pic URL links in the script to the ones returned by Blogger when you upload your own pics.
  • It is IMPORTANT that you make sure that the quotation marks that surround the URL links are single ( ' ) and not double quotes ( " ), as this has a relevance on how the script is executed.

 


 

So, did I manage to successfully tip-toe through david's tulips? Let's have a look:

 

 


 

Looks okay to me. I guess it's your turn now ...

back to the top

 

Wednesday, 28 November 2007

TIP - Polls (apart) ...

From: David McMahon
To: Terry Fletcher
Subject: Polls in a Post ...

El Tel

Off the top of your head, can you remember the icon that produces a poll in New Blogger? Having done so many all those months ago, I'm scratching my head because I want to embed one in a post!!

Cheers.

David


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

Another hot potato!

Why? Because, although I know about the 'Poll' feature introduced by Blogger, I'd only ever tried it out in the side panel where it is automatically lodged if you elect to run a Poll on your page.

How does one add a Poll to a Post? "Piece of cake," was my first thought on the matter. I figured I'd add an <iframe> and insert the code for the Poll into the <iframe>, and that would be that! Yeah, sure! You can try that approach and see how far it gets you.

So, it was off to "Google-Blogger-Land" to see what solutions were on offer. I stumbled across one or two articles about Polls, hundreds commenting they couldn't even find the feature on their site and others, who were able to find it, asking for the feature to be rolled out to include the ability to insert a Poll in a Post. Of course, you've probably guessed by now, most of these discussions were based on NEW-Blogger Beta, at the time that Polls were added as a 'Nice-to-have' feature. Sometimes I despair.

The current state of affairs is that the Poll feature has been rolled out as a 'widget' that can be accessed via the 'Page Elements' of your customization menu. It is a simple "click and accept" feature and, as far as it goes, it works fairly well. There are a few limitations, but it appears that nothing is going to be done to enhance the feature further.

What about a "Poll in a Post"? Tough! This feature is not available, and there isn't any clue as to whether it ever will be. Does that mean it can't be done?

Absolutely NOT!

But it currently calls for a bit of HTML and Template fiddling, and most casual Bloggers will probably not be interested in implementing something that isn't a 'click-and-go' feature.

For those that think it is a 'cool' idea to occasionally add a Poll to a Post, I shall roll out a 'tute' with screencaps in my next offering.

Watch this space ...

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!

Saturday, 25 August 2007

TIP - Post Formatting

You compose your 'post'. That's the hard part. You post your 'post'. That's the easy part. You sit back and wait for somebody to visit, read and comment. That's the satisfactory part.

In between you get on with your life. As we all do. But isn't it amazing that when the Blogging-bug has struck that we all appear to schedule our everyday tasks around our (sacrosanct) blogging time?

So, why not make it easy on yourself? Why not pre-plan how you compose and publish your blog posts so that when you hit the "PUBLISH POST" button you can be assured that they will appear exactly how you envisaged they would?

1. Select 'Dashboard' or 'Customise' (depending where you are on your Blog) and you will be taken to your 'Template' page. Select 'Settings', then 'Formatting' and you will be faced with the page you can see in the pic below. Take note of the two areas I mention. These are the main changes you may need to make, but check the rest of the boxes in case you've overlooked something. Don't forget to "Save Settings" after you've made your changes. These changes aren't critical, unlike changes you make to the template; they can always get changed back if you aren't satisfied with what you've done!

 

 

2. In the pic below you will see that I have already inserted a few 'justified' paragraph 'starts' and 'ends', because that is how I compose my posts. Your mileage will vary. I also have the whole code for the 'Up Arrow' that I use at the end of each post. This makes life easy for me as I don't have to remember the exact code, and since it appears in exactly the same place in each post (repetitive coding) I decided to insert it into the formatting template for all future posts.

 

 

I also have a series of 'hyphens' (dashes) included as a standard divider between 'sections' of a post. It was something I started in my earlier posts and something I decided I would continue to do for subsequent ones. I could find a post with a dashed line and copy/paste it into the new post, but this way is so much easier, don't you think?

You may wish to use a horizontal rule instead and you can achieve that by using the 'Compose' feature and selecting it from the menu, or if you are using the HTML feature just type the following ...

<hr width="50%" align="center">

... to give you a horizontal rule that is 50% of the width of the display area, and which is centred in the middle of the page.

More tips to come ... !

back to the top

 

Sunday, 29 July 2007

Change Your Header - OLD Blogger

OLD Blogger instructions. Here we go. Please bear in mind that this will come in two parts - OLD and NEW-Blogger. Why? Because I hacked away at both, and it would be a waste if I didn't at least mention OLD-Blogger for some 'peeps' who are still using it.

So, before we get down and dirty with the template changes, have you got your image ready? You probably have or you wouldn't be interested in attempting to change it. Make sure that the image is the width of your current template. In 'Rounders-3' and 'Rounders-4' the width of the image is the same as the width of the template - 740 pixels. The height is whatever you want it to be, but I suggest 150 pixels for a balanced display.

The following is the picture I settled on after much editing in Photoshop. You will see a screen-caliper I use as an aid when 'measuring' stuff for the web and it clearly shows that the width of the picture is 740 pixels. Measuring things using the 'artists thumb' method isn't much good for web design. It has to be precise or your display will look shoddy!

OK, we have the replacement ready so let's go see what we need to attack. Once again, please let me remind you that this is OLD-Blogger that we are working on. If you want the information for NEW-Blogger, read the post that follows this one.

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

1. Backup your old template. Either by using the built-in backup feature in Blogger, or by copy/pasting it to a text editor of your choice, and saving it in a location you can find easily and with a name that makes sense to you!

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

2. Upload your image so that it gets to lodge itself on Blogger's servers, because you're going to have to call it up during the editing process. You can do this in a new draft post that you won't be publishing:

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

3. The highlighted bit is what you need when replacing the template's own image. The rest is superfluous:

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

4. Now choose the 'Template' tab and choose to 'Edit HTML' (if you're still reading this and you are a NEW-Blogger user, please note the differences in the options offered to you). Follow the instructions in the graphic below:

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

5. And here are the changes:

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

6. Still in the 'Edit HTML' window, find <!-- Blog Header --> and delete the bits that I've highlighted. This is so that the 'Blog Title' and 'Blog Description' don't show up over (or through) your carefully constructed graphic!

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

7. That should have been all you needed to do, but when I made the changes to David's blog, one of his visitors commented that the 'link' that the original header provided back to the home page of the blog was now broken, and that she found it disconcerting that clicking on the new banner didn't take her anywhere! That's the strength of 'feedback', that a simple oversight made a visitor's browsing experience less than satisfactory. So I went back in and did another small change that the next couple of graphics describe. I would recommend that you do it as well. This graphic shows what needs to be edited . . .

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

8. And this graphic shows it after it has been edited . . .

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

That's all folks. If you haven't already done so, take a wander across to David McMahon's blog. What you see is precisely what was achieved editing his banner while he was still using OLD-Blogger.

He is, of course, now using NEW-Blogger. Which means I can use his site as an example for the 'tute' on changing things in NEW-Blogger as well. Watch out for the next post . . .

back to the top

 

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