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.


how's to use dropshadow ???

 
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 -> Drop Shadowed Thumbnail Creator
View previous topic :: View next topic  
Author Message
speak-up
Newbie


Joined: 19 Jun 2003
Posts: 8

PostPosted: Thu Jun 19, 2003 12:16 pm    Post subject: how's to use dropshadow ??? Reply with quote

Sorry for the stupid question
but i already upload the
1/class.dropshadow.php
2/test.dropshadow.php
3/test.originaldropshadow.php
4/class.originaldropshadow.php
to my server (unix php 4.3.2 gd 2.0.12)
i dont know how to use the dropshadown Sad
and i call www.speak-up.net/shadows/class.dropshadow.php?shadow=1&show=resizeToPercent&input=PLANE.JPG&colour=ffffff&size=50
it displayed a blank screen Sad
pls help me very thanks


Last edited by speak-up on Thu Jun 19, 2003 12:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
speak-up
Newbie


Joined: 19 Jun 2003
Posts: 8

PostPosted: Thu Jun 19, 2003 12:17 pm    Post subject: Reply with quote

i already upload image file
PLANE.jpg to the same folder (http://www.speak-up.net/shadows/)
Back to top
View user's profile Send private message
speak-up
Newbie


Joined: 19 Jun 2003
Posts: 8

PostPosted: Thu Jun 19, 2003 12:20 pm    Post subject: Reply with quote

and where i can find the gd for windows??? i'm using win xp ... and i just can find out the gd for unix Sad
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 Jun 23, 2003 6:47 am    Post subject: Re: how's to use dropshadow ??? Reply with quote

speak-up wrote:
www.speak-up.net/shadows/class.dropshadow.php?shadow=1&show=resizeToPercent&input=PLANE.JPG&colour=ffffff&size=50


Hi Speak-Up, and welcome ot the board!

The reason you're getting a blank page shown is because you're trying to access the class directly - you cannot do that. A class first needs to be initiated (using the 'new' constructor) and assigned to a variable, through which you can then use the methods of the class.

Check out the test.dropshadow.php class and you'll see this text:

PHP:
<?php

    
require "class.dropshadow.php";

    
$ds = new dropShadow(FALSE);
    
$ds->setShadowPath('./shadows/');
    
$ds->loadImage('./images/test.jpg');
    
$ds->resizeByPercent(500);
    
$ds->applyShadow('CCCCCC');
    
$ds->showShadow('png');

?>


First you include the class file (the 'require' line.) Then you have to create an instance of that class (the 'new dropShadow' line), and then you can use whatever methods you want in that class. Obviously you will want to change the options, or call different functions, or whatever. But that should give you a starting point.

As for GD for windows - it should come in the PHP zip package (don't think it comes with the installer.) You'll want to use gd2.dll, I think is the file name. Don't forget to update your php.ini file for it!

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


Joined: 19 Jun 2003
Posts: 8

PostPosted: Thu Jun 26, 2003 7:52 am    Post subject: Reply with quote

Hi Andy
I did it, now i know the way to use
Everything is so easy Smile
Very thanks for your help Cool
Hoang
PS : rated 10/10 for the Drop Shadowed Thumbnail Creator Wink
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Thu Jun 26, 2003 8:12 am    Post subject: Reply with quote

speak-up wrote:
PS : rated 10/10 for the Drop Shadowed Thumbnail Creator Wink


Thanks very much! Smile I'm glad that you've got it working and you like it.

If you're a user of the websites HotScripts.com or PHPClasses.org (links to the left of the browser), then perhaps you could go there and rate the scripts of mine you use? It'd be appreciated! Smile

Cheers, and happy image manipulating!

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


Joined: 19 Jun 2003
Posts: 8

PostPosted: Sat Jun 28, 2003 6:47 am    Post subject: Reply with quote

Hi
I've rated excellent for the Drop Shadow Thumnail Creator Wink
And may i ask a question??
If i want to use the thumb creator like this way
http://www.speak-up.net/shadows/test.dropshadow.php?file=filename_i_want_to_creat_shadow
What i have to do??
I know it may be in the file test.originaldropshadow.php Smile
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Sat Jun 28, 2003 9:36 am    Post subject: Reply with quote

speak-up wrote:
Hi
I've rated excellent for the Drop Shadow Thumnail Creator Wink
And may i ask a question??
If i want to use the thumb creator like this way
http://www.speak-up.net/shadows/test.dropshadow.php?file=filename_i_want_to_creat_shadow

What i have to do??
I know it may be in the file test.originaldropshadow.php Smile


Well, if you are always wanting it the same size, the same location, etc., then you could just extend the drop shadow class with your own, and then call that. You would set up one little class that sets all the defaults and then use the file name you pass to call that class with. For example (and I'm winging this, so there may be some mistakes and you may have to tweak it to suit your own needs):

PHP:
<?php

require 'class.dropshadow.php';

class 
myThumbs extends dropShadow
{
    function 
myThumbs($file)
    {
        
// set up the image
        
$this->setShadowPath('./shadows/');
        
$this->loadImage($file);

        
// obviously you do what you need to here
        
$this->resizeByPercent(500);
        
$this->applyShadow('CCCCCC');

        
// I'm saving, but you could show, or whatever else
        
$this->saveShadow('png');
    }
}


$thumb = new myThumbs($_GET['file']);


?>



As I'm applying the shadow there I use the saveShadow function. If I were just wanting to resize and save, then I'd use the saveFinal function.

Of course, you could add more functionality to that using the drop shadow class as your base class, and some checks your could throw in there. But that should give you and over all idea on how to start.

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


Joined: 19 Jun 2003
Posts: 8

PostPosted: Sun Jun 29, 2003 11:57 am    Post subject: Reply with quote

Thanks ya so much
And this is what i've just done


Embarassed not too bad Embarassed Wink


Last edited by speak-up on Mon Sep 08, 2003 12:38 pm; edited 2 times in total
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Sun Jun 29, 2003 1:33 pm    Post subject: Reply with quote

speak-up wrote:
Thanks ya so much
And this is what i've just done...


Groovy! Smile Is that you? Btw, like the live chat phpBB mod on your website - where'd you find that?

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


Joined: 19 Jun 2003
Posts: 8

PostPosted: Wed Jul 02, 2003 11:01 am    Post subject: Reply with quote

http://www.speak-up.net/shoutbox.zip

PS: it's my gurl's pix Smile ... she's really nice , isnt she?? Very Happy
Back to top
View user's profile Send private message
surffreak[.tk]
Newbie


Joined: 07 Aug 2003
Posts: 1
Location: Belgium

PostPosted: Thu Aug 07, 2003 11:02 am    Post subject: Reply with quote

hey speak-upn, how does your tm4eva.php file looks? Can you give me the code pleaze

Thx
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
speak-up
Newbie


Joined: 19 Jun 2003
Posts: 8

PostPosted: Mon Sep 08, 2003 12:28 pm    Post subject: Reply with quote

PHP:
<?php

    
list($x$y) = explode(','$_GET['size']);

    include 
"class.dropshadow.php";

    
$ds = new dropShadow(FALSE);
    
$ds->setShadowPath('./');
    
$ds->loadImage('./'.$_GET['input']);
    if (
$x || $y$ds->{$_GET['show']}($x$y);
    
$ds->$show($x$y);
    if (
$_GET['shadow'] == 1)
    {
        
$ds->applyShadow($_GET['colour']);
        
$ds->showShadow('jpg');
    }
    else 
$ds->showFinal('jpg');    

?>

Here it is .. hope to help ya Smile ... if u did send pm me, i think i could answer u earlier Smile, anyway hope that i still could please you
Cheer
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 -> Drop Shadowed Thumbnail Creator 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