Saturday, September 1, 2018

Life, Death and dated undies

Soooo time for my yearly blog post

days of the week undies
Available from The Warehouse
I had a minor health scare a month or two back and ended up in the AMU (Acute Medical unit) for a week, basically an infection in the heart, which wasn't really helped by me initially dismissing my symptoms, and then not bothering to tell the doctor all my symptoms, so I ended up on the wrong medication, and it got worse.

Anyway after arriving at hospital and then knocking myself out half an hour later, i was lying on a hospital bed slightly incoherent, when i suddenly became obsessed with whether I was wearing the correct undies.

 As the old saying goes, "Always put on clean underwear in case you are hit by a bus", but what about dated underwear and by dated I don't mean underwear with flares and velour, but underwear with the day of the week emblazoned on it.

I have this style of underwear, it was going cheap "Thursday" was missing from one pack and "Tuesday" from another pack, so I got two packs really cheap, they're undies and who cares what they look like, I am not a Millennial who works around with my jeans at mid thigh level to show off my undies, so its all good isn't it?, and i sure as heck don't wear them in order, basically whatever's top of the drawer goes on.

But no, I am lying in hospital on a trolley soaked in my own sweat, struggling to keep my eyes open with people all around and I keep getting this stupid thought in my head, "Its Thursday today but what day do my undies say", and of course I had no energy to check, my sweat soaked jeans seemed to have shrunk and become moulded tight to my body, all i am thinking is its going to be so gosh darned embarrassing to drop dead and then have the medicos find I am wearing Saturdays undies.

Yep it is stupid, but it was actually stressful, although while i was worrying about my undies I wasn't worried about anything else, so perhaps my brain decided to protect me by making me obsess over some unimportant detail.

So what have we learnt?


  1. Always tell the doctor all your symptoms, even if they seem insignificant to you
  2. Don't buy Undies with the days on them if you are paranoid about what people may thing and you are not OCD enough to wear them on the correct day


Oh and in case you are wondering, i was wearing a pair of plain non-dated undies.

Saturday, July 8, 2017

Mixed up Animals

Meow meow,
I'm a Cow

Bark bark,
I'm an Aardvark

Moo Moo,
I'm an Emu

Swish, Swish,
I'm a Fish

Cluck cluck,
I'm a Woodchuck

Bok bok,
I'm a Springbok

Howl howl,
I'm an owl

Hoot hoot,
I'm a Bandicoot

Cluck cluck
I'm a Duck

Thursday, December 15, 2016

Xmas songs I don't hate yet

Sometimes at this time of year it is hard to think of things that you don't hate, Xmas songs are one of the direst things out there is a load of dross and they are played endlessly from October till the 25th day of the 12 month.

When I was a kid I loved Snoopys Xmas, it built the anticipation, It also had the red baron which was technically war and killing so as a little boy I loved it, but now I work in retail and it is played every hour of every day, so sod it Snoopy I hope your Sopwith Camel bites the dust

Probably my two favourites


Slades Merry Xmas EveryBody





Wizzards I wish it could be Xmas everyday



Sunday, November 15, 2015

Watching my figure - in the age of evil sugar

For some reason my time-line has been inundated with diet adverts and low fat stuff, so I took inspiration from this and decided to cut down to only having one marshmallow in my hot chocolate.

And this isn't just because I am a health conscious pixie, its also because I couldn't fit two of the blasted things in the cup.

For the record they are Rocky Mountain Mega Marshmallows available at a red shed near you, just ask one of the friendly staff who would be more than happy to help you, Just don't ask me.

Monday, December 8, 2014

Making Paper Bricks - for winter


Whoops and here is a very old post I forgot to hit the publish button on from a year or two ago

Okay, decided to spend the day making paper bricks out of the junkmail, Basically you rip all the junk mail into small bits, throw it into a bucket of water. then stick them into a press and squeeze the water out, then let lay them out to dry in the sunshine, and then you have a pile of paper bricks to burn in winter.
Anyway  halfway through my assistants arrived and dived right in, literally, jumping in the buckets and tearing the paper up. Next step is putting it in the press

.



Basically you rip all the junk mail into small bits, throw it into a bucket of water. then stick them into a press and squeeze the water out, then let lay them out to dry in the sunshine, and then you have a pile of paper bricks to burn in winter.

 good use of the junkmail but is pretty bloody time consuming.

All good fun till Alex spotted a lego advert in a Warehouse mailer that Lottie was busily stomping underfoot, then there was a furious session of pulling paper out of each others buckets and slapping each other with wet paper


At least one post for 2014

Well 2014 is nearly over and I have achieved absolutely nothing, I'm still not a successful author my great novel of the human condition "Ernesto Bertorelli and the chihuahua of doom", my singing career is non-existant owing to the fact i can't sing and as for acting, I am probably the only Kiwi who hasn't appeared in a Lord of the rings movie, although I was followed around the backyard by a group of hot chicks yesterday, unfortunately they were of the feathered variety!.

So on to more realistic goals, I still don't have a full time job, I have had lots of temping work, I am slowly in the process of killing assorted vege gardens round the house in the vain hope of saving money by growing me own vege.

Bah Humbug to the world

Saturday, August 10, 2013

Hot Semi Naked Chicks

Lets see if that title gets me loads of hits on this page.

Picked up a couple of ex battery chooks from Lichfield last weekend, here's one of the little chappettes

They actually look a lot better than the last lot I got, although the comb and wattle are an extremely pale pink and their beaks are a bit odd.

They are fairly timid still, the last lot were much more nosey, mind you the weather is a lot colder at the mo and they have come from a place that was probably heated 24/7 so we will see what happens.
















Around October last year i got my previous battery hens, who looked like the above
and this what the surviving one looks like today
Although its not the best picture her comb and wattle are a lot redder than they seem here.

A cheap laptop

Flicking through Trademe, I saw a laptop with no reserve that seemed to be the model up from my deceased laptop, thinking i could probably combine the two to get a working laptop, I though a $5 bid on it.
A Bargain at twice the price!



And as you can see I won it for the princely sum of $2.50.

So once I had paid $12 shipping it came to $14.50, still cheap, although it could turn out to be a $14.50 paperweight if it doesn't actually go.








It arrived a few days later neatly packaged, opened it up, and there was the first problem, it used an Intel chip whereas my deceased lappie uses AMD, Oh well  excepting the motherboard all the other bits should be compatible.

So i plug it in using my laptop adapter and it posts to the Compaq screen, which is to be expected given there is no hard drive.

Next up I try a Live Linux distro I have lying around on CD, put that in and in a few minutes I am in a linux desktop.

So, so far it works, however a live linux distro on CD is ok for the basics but you can't update things, save settings etc which is a bit of a nusiance everytime you reboot so I decided to try a distro on a USB thumbdrive, I chose Puppy Linux as it small and not too taxing on older machines. Only problem is older laptops/PCs don't support booting from a USB port.

Once again Linux to the rescue, I downloaded PLOP Bootmanager and burnt it to CD, popped the PLOP cd in my CD drive and rebooted the computer. when the computer rebooted, the CD started the PLOP bootmanager with this pretty wee screen
(yes i have cropped the image the actual screen is lovely and crisp looking not at all blurry :) )
Now i have the option to boot from USB, so here we go.








The Puppy Linux Boot Screen


and finally a working desktop

And thats all there was to it $14.50 plus a USB stick and a few parts I had lying around and i have a working laptop.

But wait theres more.
After a bit of use the laptop sounds like a jet trying to take off, so i dismantled it and gave it a clean out, got a bit of dust out etc, reassembeld and still lots of noise, which is odd as my dead laptop was lovely and quiet, went and had a check online, take a wild guess what was listed as one of the Cons of this particular laptop, Noise, as it using a desktop CPU rather than a laptop CPU so the fan is having to really work to keep it lovely and cool.






Sunday, June 2, 2013

Adding a seperate Category Dropdown for the CSS MegaMenu for Zen cart

So you have installed the excellent CSS Mega Menu module from Picaflor Azul available in the zencart add-ons repostory, and you want to either limit the "Shop" dropdown to one category tree, or you want an additional seperate dropdown for a specific category, well here is how I did it.

The Usual Warning
As usual backup everything before you start, this doesn't touch the database (well it reads from it), so everything goes pear shaped you can fix it by replacing with the original files.

Step 1)

Find you category ID number for the category you with to display
The easiest way to do this is to hover over the category and the category number will appear in the link at the bottom of your page, in this case it is category 1379.

Step 2)

Now if you are wanting to limit the existing "Shop" dropdown to a specific category tree,  do the following step and then you are finished, if you want to make a separate dropdown for a category go straight to Step 3
Ok so you just want to limit the existing dropdown to one Category tree
Navigate to

includes/classes/categories_ul_generator.php

Around line 83, you will find the following function

function buildTree($submenu=false)
{
return $this->buildBranch($this->root_category_id, '', $submenu);
}

Edit it so it looks like this, adding in the correct category id for the your site

function buildTreebb($submenu=false)
{
$root_category_id = 1379;
return $this->buildBranch($this->root_category_id, '', $submenu);
}
Save your changes, upload the file

Next we will change the name of the dropdown so it doesn't say "Shop"
Navigate to

includes/templates/YOUR_TEMPLATE/common/tpl_mega_menu.php

around line 46 you will have the following line

<li class="categories-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop"><?php echo HEADER_TITLE_CATEGORIES; ?></a><!-- bof cateories -->

Now we can do flash things and pull the category name from the database etc, but its a damn site faster to just type in the name of the category, like so

<li class="categories-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop">Jenni Bowlin</a><!-- bof cateories -->
Save your changes, upload the file

Go to your website and test the dropdown (you may need to refresh the page first) and it should work fine

You are finished you don't need to read any further.

Step 3)


So here we are creating a seperate dropdown and leaving the "Shop " alone

First we navigate to this folder

 includes/classes/

Now we make a copy of the following file

categories_ul_generator.php

We will call it in this exercise

 categories_ul_generator_bb.php

Now we open the copy we have just made


includes/classes/categories_ul_generator_bb.php

 Around line 24, you will find the following line

  class zen_categories_ul_generator {
var $root_category_id = 0,

Change it to

  class zen_categories_ul_bb_generator {
var $root_category_id = 1379,



 Around line 39, you will find the following line

  function zen_categories_ul_generator($load_from_database = true) 

Change it to

  function zen_categories_ul_bb_generator($load_from_database = true)





Around line 83, you will find the following function

function buildTree($submenu=false)
{
return $this->buildBranch($this->root_category_id, '', $submenu);
}

Edit it so it looks like this, adding in the correct category id for the your site, and changing the name of the function to buildTreebb

function buildTreebb($submenu=false)
{
$root_category_id = 1379;
return $this->buildBranch($this->root_category_id, '', $submenu);
}
Save your changes, upload the file

The next step is to make the dropdown appear on your menu bar

Navigate to

includes/templates/YOUR_TEMPLATE/common/tpl_mega_menu.php

What we are going to do is copy the entire section of code that displays the "Shop" dropdown
in the file above, this should be lines 45 - 69 inclusive so thats all this code

<li class="categories-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop"><?php echo HEADER_TITLE_CATEGORIES; ?></a><!-- bof cateories -->

<div class="dropdown_1column">
<div class="col_1 firstcolumn">
<div class="levels">
<?php

// load the UL-generator class and produce the menu list dynamically from there
require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
$zen_CategoriesUL = new zen_categories_ul_generator;
$menulist = $zen_CategoriesUL->buildTree(true);
$menulist = str_replace('"level4"','"level5"',$menulist);
$menulist = str_replace('"level3"','"level4"',$menulist);
$menulist = str_replace('"level2"','"level3"',$menulist);
$menulist = str_replace('"level1"','"level2"',$menulist);
$menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
$menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
echo $menulist;
?>
</div>
</div>
</div>
</li><!-- eof categories -->

And then we paste it directly underneath so paste it in at about line 70 just above the manufacturers section

Now in you freshly pasted code you need to find the following so we can change the name of the dropdown

<li class="categories-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop"><?php echo HEADER_TITLE_CATEGORIES; ?></a><!-- bof cateories -->

Now we can do flash things and pull the category name from the database etc, but its a damn site faster to just type in the name of the category, like so

<li class="categories-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop">Jenni Bowlin</a><!-- bof cateories -->

Next we need to make the dropdown use our copied dropdown class so find this bit

require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
$zen_CategoriesUL = new zen_categories_ul_generator;
$menulist = $zen_CategoriesUL->buildTree(true);

and replace with this; note all 3 lines have changes, if you don't change them all you page will drop dead directly after the menu title

  require_once (DIR_WS_CLASSES . 'categories_ul_generator_bb.php');
$zen_CategoriesUL = new zen_categories_ul_bb_generator;
$menulist = $zen_CategoriesUL->buildTreebb(true);

Now save and upload the file, then go to your site and test it, you may need to refresh the page

Now you should have a dropdown menu next to the existing "shop" menu
Good Luck

Wednesday, January 16, 2013

Mail Chimp plugin for Zencart - adding extra fields

This is a little more tricky that you think, although once you have had a long read of mailchimps docs it is dead simple.

First of grab the Mail Chimp plugin  by SwGuy from the zencart plugins repository.

By default this only takes your email address, do for our example we will make it take first name and last name of your subscriber.

First step

Install the MailChimp Plugin as per the instructions given.

Second Step

Make sure your MailChimp Account is able to receive the extra fields

Third Step

Open includes/templates/template_default/sideboxes/tpl_mailchimp_sidebox.php

find this piece of code

$content .= ENTRY_EMAIL_ADDRESS;
$content .= '
';


Replace it with this

$content .= ENTRY_EMAIL_ADDRESS;
$content .= '
';
$content .= ENTRY_FIRST_NAME;
$content .= '
';
$content .= ENTRY_LAST_NAME;
$content .= '
';


Save the file

Fourth Step

In /includes/modules/your-template/create_account.php
 find this

mailchimp_add($email_address, $email_format);

and replace with

mailchimp_add($email_address, $firstname, $lastname, $email_format);


Fifth Step

In includes/functions/extra_functions/mailchimp_functions.php
Find this code (line 6-ish)

$merge_vars = array('');

Replace it with this

$merge_vars = Array(
'EMAIL' => $email_address,
'FNAME' => $firstname,
'LNAME' => $lastname
);



And thats all there is to it.

Sunday, December 30, 2012

Hair Removal - by Veet

Right, i am not or never will be a fan of shaving, but well i don't particularly like looking like Bill Baileys homeless brother, so i tend to shave irregularly, basically whenever i look in the mirror and think shit i look like a hippie.

So I looked at hair removal by wax but well being a wimp and reading the reviews here After i finished pissing myself laughing i decided that
a) I have no interest (not that i ever did) in manscaping my downstairs and
b) Its going to be painful on the face too.

So shaving is back on, until I feel lazy again, hell if it hurts to pull a plaster off I dread to think what a wax strip will do.



Visited by a Hedgepig

Hieronymous the hedgehog
Better maintain my average of 3 posts a year.

Anyway, a couple of weeks ago we got a visit from a very noisy little hedgehog, who ate all the cat food then followed me to the letter box and sniffed and rubbed against my slippers, then returned to feeding from the cats bowl, and looked a little miffed that there was no more food left (if a hedgehog can look miffed). He pretty much moved into the carport  for the week and only left when the cat started eating all her her food up.

I decided to name him Hieronymous the hedgehog after the famous painter Hieronymous Bosch, who painted the Garden of earthly delights which when i first saw it i thought was some weird trippy 70s album cover instead its a religious piece from the late 15th century, it is a weird painting and proof that some painters probably sniffed a bit too much of their own paints.



Shiny happy toothpaste

Okay being the renowned cheapskate that i am,I got some clearance toothpaste (shrek related) and when I squeezed it out it was clear green with glitter in it, which got me thinking why does all toothpaste have to be mint flavoured, and why not funky colours, okay i realise white looks clean, but you do rinse your mouth afterwards.

I mean why is there no cheese and onion flavoured toothpaste or pork scratching or lemon and honey, now theres a good combination the cleaning power of lemon with the soothing power of honey.
Mint is boring if you are going to use a herb why not parsley or caraway seed flavoured, but no pretty much every toothpaste uses plain old mint and its because we have been conditioned to believe mint is the smell of cleanliness, but then why aren't toilet cleaners mint scented instead they use food smells like vanilla or berry which just makes you hungry when you are taking a dump, quite frankly I'd rather have a minty fresh toilet and vanilla scented breath than the other way around.




Thursday, July 7, 2011

Divide by Cucumber

Shades of DiscWorld, visiting stuff today and saw this, who knew the techies at stuff had a sense of humour. see the text under the image

The original Link is here

 Of course from what i understand the error message should read

+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++

but then again that would probably frighten the conspiracy theorists.

Monday, May 16, 2011

Anyone else watching TED

I finally went on to the TED site

Fascinating video by Arvind Gupta, on making toys out of junk

His little story at the end is good to

Thursday, March 24, 2011

Genetic tests pending...

The downside to homebirths, is that you can't pretend that you were given the wrong children. No matter how much you want to imagine the misbehaving little troglodytes aren't yours, you just know they are.

I blame their mothers side of the family for the naughty genetics.

Anyway it all began on  Tuesday, Alex stuffed a gold bead up his nose, despite having been told a gazillion time not to stuff things in his various orifices, anyway we tried everything to get it out, to no avail, so i loaded him in the courtesy car (did i mention our car dropped dead the previous week)and took him to the local doctors, Lottie had to stay home and screamed her lungs out as she wanted to go too. Once we got to the doctors he was seen extremely quickly, after trying various scary looking tweezers (big and scary Alex looked terrified, that'll teach him) the doctor disappeared for 10 minutes, then came back with tweezers with a big spike on the end (excellent), and see if this doesn't work he'll need to go to Waikato hospital and have it taken out under sedation, (oh bugger), thankfully it worked and the bead got put straight in the bin, so Alex didn't get any ideas.

Fast forward to Wednesday, Lottie stuck a big pile of sellotape up her nose, and we tried everything to get it out, but to no avail, but as it didn't seem to be causing a prob and it was later before we noticed (not to mention I was a touch embarrased to have to take a second kid in to th docs with something wedged up their nose), we left it and waited for the next day. Thursday Shar finds a new pair of tweezers and within about 10 mins we have the sellotape out.

I am hoping the genetic test come soon.

Thursday, March 17, 2011

Sweeter than a cookie

Was entertaining the sprogs on youtube, and i have had this song stuck in my head for weeks.




I have been singing the chorus while shopping, and getting some odd looks.

Wednesday, March 16, 2011

Image Handler and Internet Explorer 9

Edited 17 March to remove testing code - Thanks Steve.

Image Handler is a zencart plugin for those who don't know

IE9 was released recently and is an improvement in all ways.

Unfortunately though IE9 breaks Image Handlers javascript hover function, once the page is fully loaded the hover doesn't work correctly although it works in every other browser and in IE9s compatibility mode.

Anyway i have fixed it, the below is a replacement Image Handlers javascript file, if your js file is version 4.2 or older it needs replacing.

How to use the code

Open your

zencart -> Includes -> templates -> your template -> jscript
jscript_imagehover.js file



Delete all the code in that file, then paste the code below into that file and upload
/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact

Simple Image Trail script- By JavaScriptKit.com was originally modified by Tim Kroeger (tim@breakmyzencart.com) 
for use with Image Handler 2 and better cross browser functionality

Later the Simple Image Trail script- By JavaScriptKit.com was further modified by 
p.hailey@virgin.net in an attempt to  fix ie 6 issues see zencart forum IH2 thread
for detials

Image Handler Jscript
Version 4.3
Modified by Nigel Thomson (nigel@nigel.geek.nz) 12 June 2010
This  modified version of the Simple Image Trail script- By JavaScriptKit.com (4.1) brings in Opera 
support, and fixes the webkit (Safari and Chrome) Bugs
Fix for horizontalscrollbar added 23 june 2010
http://nigeltsblog.blogspot.com/2010/06/zencart-image-handler-webkit-and-opera.html
Fix for IE9 added 16 March 2011
http://nigeltsblog.blogspot.com/2011/03/image-handler-and-internet-explorer-9.html
*/

var offsetfrommouse=[10,10]; //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
var displayduration=0; //duration in seconds image should remain visible. 0 for always.
var currentimageheight = 400;    // maximum image size.
var padding=10; // padding must by larger than specified div padding in stylessheet

// Global variables for sizes of hoverimg
// Defined in "showtrail()", used in "followmouse()"
var zoomimg_w=0;
var zoomimg_h=0;
var vpos;
//Detect IE
var stIsIE = /*@cc_on!@*/false;
//detect opera
var isOpera =
window.opera?1:0;
// Detect Webkit browsers
var isWebKit =
navigator.userAgent.indexOf("AppleWebKit") > -1;

if (document.getElementById || document.all){
document.write('<div id="trailimageid">');
document.write('</div>');
}

function getObj(name) {
if (document.getElementById) {
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
} else if (document.all) {
this.obj = document.all[name];
this.style = document.all[name].style;
} else if (document.layers) {
this.obj = document.layers[name];
this.style = document.layers[name];
}
}

function gettrail(){
return new getObj("trailimageid");
}

function truebody(){
if (isWebKit){
return document.body;
}else if (isOpera) {
return document.documentElement;
}else{

return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
}

function showtrail(imagename,title,oriwidth,oriheight,zoomimgwidth,zoomimgheight, image, startx, starty, startw, starth){
zoomimg_w=zoomimgwidth;
zoomimg_h=zoomimgheight;
if (zoomimgheight > 0){ currentimageheight = zoomimgheight; }
trailobj = gettrail().obj;
trailobj.style.width=(zoomimgwidth+(2*padding))+"px";
trailobj.style.height=(zoomimgheight+(2*padding))+"px";
trailobj.setAttribute("startx", startx);
trailobj.setAttribute("starty", starty);
trailobj.setAttribute("startw", startw);
trailobj.setAttribute("starth", starth);
trailobj.setAttribute("imagename", imagename);
trailobj.setAttribute("imgtitle", title);
document.onmousemove=followmouse;
}

function hidetrail(){
trailstyle = gettrail().style;
trailstyle.visibility = "hidden";
document.onmousemove = "";
trailstyle.left = "-2000px";
trailstyle.top = "-2000px";
}

function followmouse(e){

var xcoord=offsetfrommouse[0];
var ycoord=offsetfrommouse[1];
if (stIsIE){
var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15;
var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight);
}
else
{
var docwidth=pageXOffset+window.innerWidth-15;
var docheight=Math.min(window.innerHeight);

}
var relativeX = null;
var relativeY = null;
if ((typeof e != "undefined") && !(stIsIE)){ // This forces IE9 to go to the else option
if ((typeof e.layerX != "undefined") && (typeof e.layerY != "undefined")) {
relativeX = e.layerX;
relativeY = e.layerY;
} else if ((typeof e.x != "undefined") && (typeof e.y != "undefined")) {
//      relativeX = e.x; // original code replaced to work with Opera
//      relativeY = e.y; // original code replaced to work with Opera
relativeX = event.offsetX;
relativeY = event.offsetX;
}
if (docwidth - e.pageX < zoomimg_w + (3 * padding)) {
xcoord = e.pageX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]);
} else {
xcoord += e.pageX;
}
if (docheight - e.pageY < zoomimg_h + (2 * padding)){
ycoord += e.pageY - Math.max(0,(0 + zoomimg_h + (5 * padding) + e.pageY - docheight - truebody().scrollTop));
// returning different values for ff and (opera and webkit) - fixed 12th june 2010
} else {
ycoord += e.pageY;
}

} else if (typeof window.event != "undefined"){ // This works for IE

if ((typeof event.x != "undefined") && (typeof event.y != "undefined")) {
relativeX = event.x;
relativeY = event.y;
} 
else if ((typeof event.offsetX != "undefined") && (event.offsetY != "undefined")) {
relativeX = event.offsetX;
relativeY = event.offsetY;
}

if (docwidth - event.clientX < zoomimg_w + (3 * padding)) {
xcoord = event.clientX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]);
} else {
xcoord += truebody().scrollLeft+event.clientX;
}
/* event.clientY is not valid in firefox netscape or opera, but ie has to use it */
var ie_offset = -20;
if ( docheight - event.clientY < zoomimg_h + (2 * padding) ){
/*
ycoord += event.clientY - Math.max(0,(0 + zoomimg_h + (5 * padding) - (docheight + truebody().scrollTop -event.clientY) ) );
*/
ycoord += ie_offset + truebody().scrollTop + event.clientY - Math.max(0,(0 + zoomimg_h + (2 * padding) - (docheight - event.clientY) ) );
} else {
ycoord += ie_offset + truebody().scrollTop + event.clientY;
}
}

trail = gettrail();
startx    = trail.obj.getAttribute("startx");
starty    = trail.obj.getAttribute("starty");
startw    = trail.obj.getAttribute("startw");
starth    = trail.obj.getAttribute("starth");
imagename = trail.obj.getAttribute("imagename");
title     = trail.obj.getAttribute("imgtitle");

// calculate and set position BEFORE switching to visible
if (stIsIE){
var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15;
var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight);
}else{
var docwidth=pageXOffset+window.innerWidth-15;
var docheight=Math.max(document.body.offsetHeight, window.innerHeight);
}

if(ycoord < 0) { ycoord = ycoord*-1; }
if ((trail.style.left == "-2000px") || (trail.style.left == "")) { trail.style.left=xcoord+"px"; }
if ((trail.style.top == "-2000px") || (trail.style.top == "")) { trail.style.top=ycoord+"px"; }
trail.style.left=xcoord+"px";
trail.style.top=ycoord+"px";

if (trail.style.visibility != "visible") {
if (((relativeX == null) || (relativeY == null)) ||
((relativeX >= startx) && (relativeX <= (startx + startw))
&& (relativeY >= starty) && (relativeY <= (starty + starth)))){
newHTML = '<div><h1>' + title + '</h1>';
newHTML = newHTML + '<img src="' + imagename + '"></div>';
trail.obj.innerHTML = newHTML;
trail.style.visibility="visible";
}
}
}
and then save the file and upload it to your server, and IE9 should work correctly

Tuesday, January 18, 2011

4 Dumb Clucks

Ok we now have chooks, infact we have had them for a few months, and they live in Casa de Pollo, which was built by yours truly.

I really am not a DIYer as it took me a lot of time, and cost a small fortune, mind you I did buy some power tools so that bumped the cost up.

I was thinking to use it as a playarea for the kids but wifey said NO, I mean it would be a good way to get peace and quiet.


Anyway we got three chooks, Wyandottes which were 12-15 weeks old at the time, and should hopefully start laying in the next couple of weeks.
Alex named them (note they are all HENS as in girls) , and their names are Fireman Sam, Elvis and Wendy

They got joined by Flossie (a Shaver) a rescued chook that had been found roaming the streets, she's a lot older and was at some stage a caged bird as her beak show that it was clipped at some stage, she quickly became head chook, although now the Wyandottes are a good 10cm taller than here, that status is under threat.

Eggs, currently we get 1 every 2 days, so hopefully these others start laying soon, as i am starting to see roast chook with all the trimming every time i look at them, OK not really, and they'll probably all die of old age as I am too much of a sook to bump them off when they stop laying.

Wednesday, December 8, 2010

Image Handler for zencart - making the large image the hover image

Image handler creates 3 sizes of image

  1. -Small thumbnail
  2. -Product image - medium sized image that appears on the product info page and is the hover image that appears when you mouse over a thumbnail) 
  3. -Larger image, which you see by clicking the larger image link on the product info page
A previous commenter (Mathias) asked if it was possible to have the hover image be larger than the product image, this cannot be done out of the box, but you can do it with a small tweak to the code.

as always backup your files before making changes

 In your
includes/classes/bmz_image_handler.class.php

 Find the following (around line 697)
$zoom_sizetype = ($this->sizetype=='small')?'medium':'large';
   
and replace it with
$zoom_sizetype = ($this->sizetype=='small')?'large':'medium';
 Save the file and upload, you may need to refresh the page you are viewing to see the change

Now when you mouse over a thumbnail the large image is shown as the hover




Let me know if it works for you