andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


New version available!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> CafePress Box
View previous topic :: View next topic  
Author Message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Fri Nov 21, 2003 9:00 pm    Post subject: New version available! Reply with quote

Hi,

A new version of the CafePress Box class is available. Here are the changes:

Thanks to suggestion from 'jmfpub', you can now supply a category of a paid-for account, as well as the store id.

Images can now be resized before they are cached. This resizing will only apply to cached images and is based proportionally on the width of the image. The resizing should work on both GD < 2 and GD > 2. It tries to auto-detect the version of GD, and if it cannot determine it then no resizing will take place.

Image caching is set to off as default.

Fixed bug that would stop product list caching if image caching was turned off.

I've also tried to go some way in documenting the functions, too.

That's about it. Let me know if you like the updates!

Many thanks to jmfpub for the post about store categories!

Andy


Last edited by amnuts on Fri Mar 24, 2006 3:41 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jmfpub
Newbie


Joined: 05 Nov 2003
Posts: 3
Location: Illinois

PostPosted: Sun Nov 23, 2003 8:23 am    Post subject: Re: New Version Reply with quote

Hey Andy,

It looks great. The only other suggestion I would make is that for the next upgrade, you should offer the option of outputting valid XHTML. I changed the output in my copy to make it validate. It was no big deal. Took about 5 minutes. I've been trying to do the same with CPShop with somewhat less success.

I have to say, I really like the simplicity with which you get this to work. I've seen others try to do this sort of thing (usually as part of a larger package), and they really make a mountain out of a mole hill. You do good work! Thanks again for saving me a few hours of pulling out my hair!

Keep it up!

Ed Grosvenor
Webmaster / Technology Editor
Jennifer M. Ferrell Publishing
Back to top
View user's profile Send private message Visit poster's website
shiola
Newbie


Joined: 08 Nov 2003
Posts: 3

PostPosted: Wed Nov 26, 2003 9:59 am    Post subject: Reply with quote

amnuts - you don't hang around do you?!!!

Nice one. I'm going to have a go at getting this set up soon as I'm planning on updating my home page for the new year. I'll let you know how I get on.

btw, I'm just down the road in Worthing, W.Sussex.
Back to top
View user's profile Send private message Visit poster's website
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Wed Nov 26, 2003 1:39 pm    Post subject: Reply with quote

shiola wrote:
amnuts - you don't hang around do you?!!!

Nice one. I'm going to have a go at getting this set up soon as I'm planning on updating my home page for the new year. I'll let you know how I get on.

btw, I'm just down the road in Worthing, W.Sussex.


Cool! I'm just outside of Brighton!

If you do let me know how it goes for you using the class in your redesign, then I'd be really interested in it. I'd love to hear more of people's experiences in using this class (and any of the others on this site!) in their own websites/projects.

Cheers!

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
shiola
Newbie


Joined: 08 Nov 2003
Posts: 3

PostPosted: Wed Dec 10, 2003 8:49 pm    Post subject: Reply with quote

I'm having trouble setting up.

I got your example to work, so I then copied this;

<?php

$cp->setResizeCachedImages(75);
$cp->setStore('shiolastore');
$cp->displayItem(true);

?>

and put this at the top;

<?php

include 'class.cafepressbox.php';
$cp = new cafePressBox;
$cp->setCacheDir('./cache');
$cp->setCacheTime(86400);
$cp->setCacheImages(true);

?>

I've uploaded class.cafepressbox.php and the page is index.php

What am I doing wrong?

(If you hadn't already guessed I'm a PHP fool).
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> CafePress Box All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group