Search found 45 matches

by modplod
Sat Mar 04, 2006 10:11 am
Forum: PHP - Code
Topic: which is best?
Replies: 9
Views: 328

getimagesize() should be used to determine image type, not extension. Hi, I tryed for hours last night to us this, but with no more luck than before, I'm really new to this, sorry to ask, but could someone show me how I would use getimagesize() to find the image type and compare it to a list of sup...
by modplod
Fri Mar 03, 2006 6:00 pm
Forum: PHP - Code
Topic: which is best?
Replies: 9
Views: 328

which is best?

I dont kow what will work best for me: This $filenameE=explode(".",$name); if ($filenameE[1]="jpg"){$src_img=imagecreatefromjpeg($name);} or this $filenameE=explode(".",$name); if (preg_match("/jpeg/",$filenameE[1])){$src_img=imagecreatefromjpeg($name);} The c...
by modplod
Fri Mar 03, 2006 4:21 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

SOLVED

Im not really sure what your getting at neophyte, but I have got this code to place the thumbnails into the correct directory, and create them the right size. My problem now is that a: the thumbs are all black and b: the script seems to run 1 time too many, and creates a file named tn_ which is also...
by modplod
Fri Mar 03, 2006 12:25 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

hello again, I'm back with the next problem I have. I got the class above to function, only I now have to dynamicaly create thumbnails prior to downloading the images to save bandwith. I have added the following methods to my class to allow it to create thumnails, only its not working right. For som...
by modplod
Thu Mar 02, 2006 11:58 am
Forum: PHP - Code
Topic: need a replacment!!
Replies: 2
Views: 214

cool I check them out, thanks for your info.
by modplod
Thu Mar 02, 2006 11:50 am
Forum: PHP - Code
Topic: need a replacment!!
Replies: 2
Views: 214

need a replacment!!

Hi all I'm looking for some replacement code for the following $fileList = $this->getFileList(); $imageMaxRatio = $this->imageMaxWidth / $this->imageMaxHeight; $numFiles = sizeof ($fileList); echo ("<table width=100%>"); for ($i=0; $i<$numFiles;) { echo "<tr>"; for ($cols=1; $col...
by modplod
Mon Feb 27, 2006 9:44 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

Thanks for all your help guys, I solved the problem, with a compleat rewrite of my original code, works almost as I I had hoped.
thanks again.
by modplod
Mon Feb 27, 2006 7:15 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

arborint wrote:Conceptually in OOP they are different.

In you code you do the following:

Code: Select all

$directory = dir ($this->browsedir);
..
        $this->directory->close();

yes I do....why??


I also tryed

Code: Select all

$directory->close();
by modplod
Mon Feb 27, 2006 7:10 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

same thing just a bit longer, thanks anyhow Conceptually in OOP they are different. I've not read much about OOP concepts in php or other lang', other than a few intros in text books. However after starting to write this, and a few other scripts. I think I should get right on that. As you can see f...
by modplod
Mon Feb 27, 2006 6:34 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

I think I have found the problem $directory->close(); for some reason the line above is entering into a open loop and bogging the server down. The only other thing that even remotly works in its place(that I know about) is $directory->close(); but this just hangs the script. All the vars are being p...
by modplod
Mon Feb 27, 2006 6:23 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

same thing just a bit longer,
thanks anyhow
by modplod
Mon Feb 27, 2006 3:38 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

cool, I think I tryed something simler to that just before I when with what I got.

but I need all the code to execute when the class is called with the command new galler($galName) If I can get this I dont realy care where everything inside the class is or how it runs

I'll try that again
thanks
by modplod
Mon Feb 27, 2006 12:52 pm
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

cool I'll tyr that latter thanks :D
by modplod
Mon Feb 27, 2006 11:53 am
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

yer, I know, I'm in the process of moving things around a bit to streem line the code,

Thanks anyhow.
by modplod
Mon Feb 27, 2006 11:36 am
Forum: PHP - Code
Topic: my class sux!!!!
Replies: 17
Views: 818

my class sux!!!!

Hi all, I need some help with one of the classes im building for my site, it a simple gallery script that reads the contents of a dir and displays them as thumbmails ith links to view the images full size, (at this time it just displays simple linmks and images) The problem is that at the end of the...