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.


Mambo component from CafePress Box

 
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
VisiGod
Newbie


Joined: 27 Jan 2004
Posts: 3

PostPosted: Tue Jan 27, 2004 8:02 pm    Post subject: Mambo component from CafePress Box Reply with quote

With the permission of Andy, i've made a mambo module from the CafePress Box.

It's available for download here
Back to top
View user's profile Send private message
hunnebal
Newbie


Joined: 06 Mar 2004
Posts: 6

PostPosted: Mon Mar 08, 2004 12:59 am    Post subject: Reply with quote

Hi VisiGod, what's mambo module? I it an extension of CafePress or is it a separate class? Thanks
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Mon Mar 08, 2004 6:53 am    Post subject: Reply with quote

As taken from their HotScripts entry:

"Mambo Open Source is a feature-rich dynamic portal engine/content management tool capable of building sites from several pages to several thousand. Mambo uses PHP/MySQL and features a very comprehensive admin manager. Mambo Open Source uses a modular framework for component/class extensibility. With Mambo Open Source there is no need for HTML, XML, DHTML skills. Just enter your content, add a picture and then through the easy to use administrator web-interface click Publish."

http://www.mamboserver.com/

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


Joined: 24 Mar 2004
Posts: 2

PostPosted: Wed Mar 24, 2004 9:03 am    Post subject: Reply with quote

I'm currently using the Mambo mod and it seems to slow down the site a lot while pulling images from Cafepress... is there a part of the code I can edit so I can just grab the images from a local directory?

Thank You
Jamie
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Wed Mar 24, 2004 1:29 pm    Post subject: Reply with quote

herinke wrote:
I'm currently using the Mambo mod and it seems to slow down the site a lot while pulling images from Cafepress... is there a part of the code I can edit so I can just grab the images from a local directory?

Thank You
Jamie


Hi Jamie, and welcome to the board.

You can use the caching functions built into the class. To cache the images, include these three lines in your code (assuming you have created an instance of the class inthe variable '$cp'):

Code:
$cp->setCacheDir('./cache');
$cp->setCacheTime(86400);
$cp->setCacheImages(true);


That will cache the data (including images) in the 'cache' directory for one day. You can change the '86400' figure to your own time length (in seconds) or the directory to be whereever you need.

Please note that on the first download it WILL take a while because it's needing to download all of the images to cache them (better way would be to only download the required image if needed... oh well, something for a future version!) But subsequent loads should be much quicker.

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


Joined: 24 Mar 2004
Posts: 2

PostPosted: Wed Mar 24, 2004 4:18 pm    Post subject: Reply with quote

thanks for your reply. I did find a workaround before you posted back and it was a heck of a lot more complicated... I made directories 0-9 and placed the images with their exact names in the corresponding directories. Then changed line 494 with my URL domain instead. It was a lot more work and if I decide to add products will have to add to those directories again, etc. But it did make a big loadtime difference.

I think I'll hang on to your bit of code and when its time for me to add items switch to that instead Smile

Thanks a bunch for your help.
Jamie
Back to top
View user's profile Send private message
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