8
So Will you saying the problem is in the
extgallery/hook-thumb.php
// $Id$
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
require '../../mainfile.php';
include_once XOOPS_ROOT_PATH.'/modules/extgallery/class/publicPerm.php';
if(!isset($_GET['id'])) {
$photoId = 0;
} else {
$photoId = intval($_GET['id']);
}
$photoHandler = xoops_getmodulehandler('publicphoto', 'extgallery');
$photo = $photoHandler->get($photoId);
switch(strtolower(strrchr($photo->getVar('photo_name'), "."))) {
case ".png": $type = "image/png"; break;
case ".gif": $type = "image/gif"; break;
case ".jpg": $type = "image/jpeg"; break;
default: $type = "application/octet-stream"; break;
}
$permHandler = ExtgalleryPublicPermHandler::getHandler();
if($permHandler->isAllowed($xoopsUser, 'public_access', $photo->getVar('cat_id'))) {
$photo = $photoHandler->objectToArray($photo);
header ("Content-type: ".$type."");
readfile(XOOPS_ROOT_PATH."/uploads/extgallery/public-photo/thumb/thumb_".$photo['photo_name']);
} else {
header ("Content-type: ".$type."");
readfile(XOOPS_ROOT_PATH."/modules/extgallery/images/not-allowed.jpg");
}
?>
I see some stuff in there but will need to study it a little.
Now about the other point you made. You not 100% on the TCPDF issue. I am still having problems with pdf generation in other places in the news that does not have the gallery tags in them. If you have a .gif file in a news story I don't care what you do you cannot make a .pdf period. Maybe the new release of tcpdf has fixed this issue.