Recent Topics

1 Oct 09, 2012 18:42    

I think the way b2 handles media is the perfect way to present a wallpaper site.

Can we display multiple sizes of the same image 800x600 1024x768 etc.

And one more question: anyway to prevent bandwith leech? Since images are dangerous to play with, some are as big as 1mb and your bandwith could be spent overnight if you dont take precautions.

2 Oct 09, 2012 20:26

$File = ''; // get the File first
$sizes = array('fit-640x480', 'fit-320x320'); // array of sizes from $thumbnail_sizes global

$img_tags = '';
foreach( $sizes as $size )
{
	$img_tags .= $File->get_tag( '', NULL, '', '', $size, 'original' );
}
echo $img_tags;

And one more question: anyway to prevent bandwith leech? Since images are dangerous to play with, some are as big as 1mb and your bandwith could be spent overnight if you dont take precautions.

You can use htaccess to prevent leeching (check referer), don't rely on this method too much. A lot of people send forged referers.

3 Oct 09, 2012 20:57

Thanks, it was just an idea, thougt it could be good, it's not of urgency, i ll play around sometime and see how it goes.


Form is loading...