addon examples
16/04/2008 11:02 PM Filed in: addon
We have added a new addon example site, to show you how
our addon's 'may' look within your solution. The design
+ colouring is all controlled through CSS, which means
we can format the look for your brand / company
check it out here
check it out here
new look site
16/04/2008 10:46 PM Filed in: bardog
We have just launch our new look site. It is now more
"google" friendly to enhance our search rankings and
thus more traffic being directed to our site. Including
well formed CSS, HTML, an auto generated sitemap etc.,
this is a great example of what we can offer you.
What you see here or within our addon example site is available to you!
What you see here or within our addon example site is available to you!
mailer addon update
03/04/2008 10:05 PM Filed in: addon
using php to generate transparent thumbnails
25/03/2008 11:08 AM Filed in: code
example
I can't take any credit for writing the code below and
can't remember where I got it from, but I think it is
worth sharing as I know how painful it was trying to
generate thumbnails with a 'decent' transparent
background.
This works and has only been tested with *.PNG files only. The important bit is to use the imagecreatetruecolortransparent() function detailed below, instead of php's standard imagecreatetruecolor(). The new function does a similar thing, but also creates a new image with an actual transparent background and not a specific colour (normally black and then try to filter that colour out)...
Just try it, it works great...
$w = 50; //width
$h = 50; //height
$srcFile = ""; //selected file
$dest = imagecreatetruecolortransparent($w, $h);
$src = imagecreatefrompng($srcFile);
imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $h, $size[0], $size[1]);
return $dest;
function imagecreatetruecolortransparent($x, $y)
{
$i = imagecreatetruecolor($x, $y);
$b = imagecreatefromstring(base64_decode(blankpng()));
imagealphablending($i, false);
imagesavealpha($i, true);
imagecopyresized($i, $b ,0 ,0 ,0 ,0 ,$x, $y, imagesx($b), imagesy($b));
return $i;
}
function blankpng()
{
$c = "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAAC";
$c .= "M/rhtAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m";
$c .= "dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAA";
$c .= "DqSURBVHjaYvz//z/DYAYAAcTEMMgBQAANegcCBNCg";
$c .= "dyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCB";
$c .= "NCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAAN";
$c .= "egcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQ";
$c .= "AANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQ";
$c .= "oHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAg";
$c .= "TQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAA";
$c .= "DXoHAgTQoHcgQAANegcCBNCgdyBAgAEAMpcDTTQWJ";
$c .= "VEAAAAASUVORK5CYII=";
return $c;
}
This works and has only been tested with *.PNG files only. The important bit is to use the imagecreatetruecolortransparent() function detailed below, instead of php's standard imagecreatetruecolor(). The new function does a similar thing, but also creates a new image with an actual transparent background and not a specific colour (normally black and then try to filter that colour out)...
Just try it, it works great...
$w = 50; //width
$h = 50; //height
$srcFile = ""; //selected file
$dest = imagecreatetruecolortransparent($w, $h);
$src = imagecreatefrompng($srcFile);
imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $h, $size[0], $size[1]);
return $dest;
function imagecreatetruecolortransparent($x, $y)
{
$i = imagecreatetruecolor($x, $y);
$b = imagecreatefromstring(base64_decode(blankpng()));
imagealphablending($i, false);
imagesavealpha($i, true);
imagecopyresized($i, $b ,0 ,0 ,0 ,0 ,$x, $y, imagesx($b), imagesy($b));
return $i;
}
function blankpng()
{
$c = "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAAC";
$c .= "M/rhtAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m";
$c .= "dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAA";
$c .= "DqSURBVHjaYvz//z/DYAYAAcTEMMgBQAANegcCBNCg";
$c .= "dyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCB";
$c .= "NCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAAN";
$c .= "egcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQ";
$c .= "AANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQ";
$c .= "oHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAg";
$c .= "TQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAA";
$c .= "DXoHAgTQoHcgQAANegcCBNCgdyBAgAEAMpcDTTQWJ";
$c .= "VEAAAAASUVORK5CYII=";
return $c;
}
album addon
17/03/2008 12:08 AM Filed in: addon
new addons
12/03/2008 08:29 PM Filed in: addon
go check out the new addon that can be added to your
site..
- admin addon
- album addon
- event addon
- mailer addo
- shop addon
- snippet addon
They are all still work in progress so any thoughts and comments are much appreciated.. flick us an email at info@baredog.com
cheers
- admin addon
- album addon
- event addon
- mailer addo
- shop addon
- snippet addon
They are all still work in progress so any thoughts and comments are much appreciated.. flick us an email at info@baredog.com
cheers
