Change Thumb URL Creation
This commit is contained in:
parent
dc91683b10
commit
3fc02a3a12
2 changed files with 5 additions and 3 deletions
|
@ -30,7 +30,7 @@ $sort = $_GET['so'] ?? 1;
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// Initialize Thumbnail Handler
|
// Initialize Thumbnail Handler
|
||||||
$t = new Thumb(Helpers::end_dir($imagedir.$dir), $thumbdir, 200, 200);
|
$t = new Thumb(Helpers::end_dir($imagedir.$dir), $thumbdir, $thumburl, 200, 200);
|
||||||
|
|
||||||
// Filelist Cache Handling
|
// Filelist Cache Handling
|
||||||
$cdir = $dir;
|
$cdir = $dir;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
class thumb {
|
class thumb {
|
||||||
protected string $imagedir;
|
protected string $imagedir;
|
||||||
protected string $thumbdir;
|
protected string $thumbdir;
|
||||||
|
protected string $thumburl;
|
||||||
|
|
||||||
protected int $w = 200;
|
protected int $w = 200;
|
||||||
protected int $h = 200;
|
protected int $h = 200;
|
||||||
|
@ -29,9 +30,10 @@ class thumb {
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct($idir, $tdir, $width, $heigth) {
|
public function __construct($idir, $tdir, $turl, $width, $heigth) {
|
||||||
$this->imagedir = $idir;
|
$this->imagedir = $idir;
|
||||||
$this->thumbdir = $tdir;
|
$this->thumbdir = $tdir;
|
||||||
|
$this->thumburl = $turl;
|
||||||
$this->w = $width;
|
$this->w = $width;
|
||||||
$this->h = $heigth;
|
$this->h = $heigth;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +81,7 @@ class thumb {
|
||||||
imagedestroy($image);
|
imagedestroy($image);
|
||||||
imagedestroy($thumbnail);
|
imagedestroy($thumbnail);
|
||||||
}
|
}
|
||||||
return $dstname.'.'.$ext;
|
return $this->thumburl.$dstname.'.'.$ext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue