V2.0.6: Images are not added to PDF

Please report bugs here!

Moderator: Thorsten

Post Reply
HerrB
Posts: 4
Joined: Mon Jun 25, 2007 9:36 pm

V2.0.6: Images are not added to PDF

Post by HerrB »

Bug-Tracker seems to be down (or empty, to be more exact).

Already posted in the forum, but maybe is here the better place.

Tested with V2.0.6. Problem arises, if PHPMyFAQ is installed to subfolder of webserver/domain.

I don't know, if this has been fixed. Fix for 2.0.6 and above may be:

AddImage method in Pdf.php in inc\PMF_Export:
Change
Code:
if ('http' != substr($image, 0, 4)) {
// Please note that the image must be accessible by HTTP NOT ONLY by HTTPS
$image = 'http://'.$_SERVER['HTTP_HOST'].$image;
}

to
Code:
if ('http' != substr($image, 0, 4)) {
// Please note that the image must be accessible by HTTP NOT ONLY by HTTPS
$image = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.$image;
}

($image line only)

Explanation: If an image isn't fully referenced (incl. http), "http" and the domain will be added to the path. If you use PHPMyFAQ in a subfolder, this folder won't get added to the path. tinyMCE itself uses a relative path excluding the PHPMyFAQ subfolder, so the subfolder is always missing.

Regards,

HerrB
bragot
Posts: 9
Joined: Fri Mar 07, 2008 5:06 pm

Post by bragot »

Does this bug exist in other versions (older or newer?) I'm also running 2.06. thanks!
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

thanks for the hint. The fix will be included in phpMyFAQ 2.0.10.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bildergallery
Posts: 45
Joined: Fri Jun 08, 2007 6:49 pm
Contact:

Gif Images in 2.0.10 funktionieren nicht

Post by bildergallery »

Hallo Thorsten,
ich habe die PDFs meinerseits kontrolliert. PNG sowie JPG Typen werden einwandfrei in PDF's angezeigt. Allerdings scheint es mit den GIF Typen nicht zu gehen.

Ist dem so??

Gruss Ivan
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

ja, GIFs werden nicht unterstützt.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply