The Beloved Motivator Script is back

Post Reply
User avatar
theENIGMATRON
Website Developer
Website Developer
Posts: 4326
Joined: Thu Mar 05, 2009 9:10 pm
PSN ID: theENIGMATRON
Steam ID: theenigmatron
Game of the Week: Barbie Beauty Boutique
Movie of the Week: Twilight Saga

Here she is, I know how much she was loved and used back in the day:

Motivator/


Image

Image

Image

Image
Image
User avatar
DJ-Daz
Admin - Nothing Better To Do.
Posts: 8922
Joined: Wed Jan 14, 2009 1:54 pm
PSN ID: DJ-Daz-
XBL ID: DJ Dazbo
Steam ID: DJ-Dazbo

It no likey PNG files. Probably doesn't know what to do with the transparent layer
Image
Image
User avatar
theENIGMATRON
Website Developer
Website Developer
Posts: 4326
Joined: Thu Mar 05, 2009 9:10 pm
PSN ID: theENIGMATRON
Steam ID: theenigmatron
Game of the Week: Barbie Beauty Boutique
Movie of the Week: Twilight Saga

Dazbobaby wrote: Tue Jun 16, 2020 3:03 pm It no likey PNG files. Probably doesn't know what to do with the transparent layer
Code is there for png.......

What format was the extention, it will only accept lowercase.

Code: Select all

        //Save the resized image
        if($extension == "jpg" || $extension == "jpeg" || $extension == "JPG"){
            imagejpeg($uploadedimage, $filepath, 100);
        }elseif($extension == "png") {
            imagepng($uploadedimage, $filepath);
        }elseif($extension == "gif") {
          imagegif($uploadedimage, $filepath);
        } 

Am not sure why i did it like that, as i should just store the name to lowercase.
or use an expression to ensure i account for all.
Something like:

Code: Select all

        if($extension == '[jJ][pP][gG]' || $extension ==  '[jJ][pP][eE][gG]'  ){
            imagejpeg($uploadedimage, $filepath, 100);
        }
Image
User avatar
DJ-Daz
Admin - Nothing Better To Do.
Posts: 8922
Joined: Wed Jan 14, 2009 1:54 pm
PSN ID: DJ-Daz-
XBL ID: DJ Dazbo
Steam ID: DJ-Dazbo

That worked
Image
Image
User avatar
theENIGMATRON
Website Developer
Website Developer
Posts: 4326
Joined: Thu Mar 05, 2009 9:10 pm
PSN ID: theENIGMATRON
Steam ID: theenigmatron
Game of the Week: Barbie Beauty Boutique
Movie of the Week: Twilight Saga

Ill update it for both lower and upper using an expression, as techinally a Jpeg will not work nor will a jPeg or a jpG
Its amazing when you look back at code you typed many moons ago and wonder WTF you did it that way

Should work fine now for any type of uppercase lowercase combo
Image
User avatar
DJ-Daz
Admin - Nothing Better To Do.
Posts: 8922
Joined: Wed Jan 14, 2009 1:54 pm
PSN ID: DJ-Daz-
XBL ID: DJ Dazbo
Steam ID: DJ-Dazbo

Image
Image
Image
User avatar
DJ-Daz
Admin - Nothing Better To Do.
Posts: 8922
Joined: Wed Jan 14, 2009 1:54 pm
PSN ID: DJ-Daz-
XBL ID: DJ Dazbo
Steam ID: DJ-Dazbo

Image
Image
User avatar
theENIGMATRON
Website Developer
Website Developer
Posts: 4326
Joined: Thu Mar 05, 2009 9:10 pm
PSN ID: theENIGMATRON
Steam ID: theenigmatron
Game of the Week: Barbie Beauty Boutique
Movie of the Week: Twilight Saga

Image
Image
Post Reply
  • Information
  • Who is online

    Users browsing this forum: Amazon [Bot] and 2 guests