mirror of
https://github.com/gtbu/Typesetter-5.3-p8.git
synced 2025-04-02 21:13:14 +02:00
update Editing.php and Image.php
This commit is contained in:
parent
a886d2ab94
commit
1334613b76
2 changed files with 10 additions and 3 deletions
|
@ -1008,7 +1008,8 @@ namespace gp\tool{
|
|||
$img_alt = str_replace('_', ' ', basename(pathinfo($image, PATHINFO_FILENAME)));
|
||||
|
||||
echo '<li>';
|
||||
echo '<a class="gallery_gallery" data-arg="gallery_gallery" href="'.$image.'" data-cmd="gallery" rel="'.$rel_id.'">'; // title="'.htmlspecialchars($caption).'"
|
||||
// echo '<a class="gallery_gallery" data-arg="gallery_gallery" href="'.$image.'" data-cmd="gallery" rel="'.$rel_id.'">'; // title="'.htmlspecialchars($caption).'"
|
||||
echo '<a class="gallery_gallery" data-arg="gallery_gallery" href="'.htmlspecialchars(urlencode($image), ENT_QUOTES, 'UTF-8').'" data-cmd="gallery" rel="'.htmlspecialchars($rel_id, ENT_QUOTES, 'UTF-8').'">';
|
||||
echo '<img src="'.$thumb_path.'" alt="'.$img_alt.'" />';
|
||||
echo '<span class="caption">'.$caption.'</span>';
|
||||
echo '</a>';
|
||||
|
|
|
@ -477,9 +477,15 @@ namespace gp\tool{
|
|||
if( !$new_h ){
|
||||
$new_h = $dst_h;
|
||||
}
|
||||
|
||||
/* $original_w = imagesx($src_img);
|
||||
$original_h = imagesy($src_img);
|
||||
$new_h = $original_h * ($new_w / $original_w); */
|
||||
|
||||
|
||||
$dst_img = imagecreatetruecolor($new_w, $new_h);
|
||||
$new_w = intval($new_w);
|
||||
$new_h = intval($new_h);
|
||||
$dst_img = imagecreatetruecolor($new_w, $new_h);
|
||||
|
||||
if( !$dst_img ){
|
||||
trigger_error('dst_img not created');
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue