How do I configure TestLink 1.9.3 so that the images appear in the Word document? (Office 2007).
I've tried adding the following code into printDocument.php (copied from another forum post), but it's unclear to me whether this should work without modification.
####################################################################################
# change relative image paths to absolute image paths
# src="/ => src="http(s)://example.com/
####################################################################################
# fetch protocol and domainname
if($_SERVER["SERVER_PORT"]=='443'){
$url_host = "https://".$_SERVER["HTTP_HOST"];
}elseif($_SERVER["SERVER_PORT"]=='80'){
$url_host = "http://".$_SERVER["HTTP_HOST"];
}else{
$url_host = $_SERVER["HTTP_HOST"].":".$_SERVER["SERVER_PORT"];
}
if(substr($url_host, -1)!='/'){
$url_host.= '/';
}
$xPattern = "/src=\"\//si";
$xValue = "src=\"".$url_host;
$docText = preg_replace($xPattern, $xValue, $docText);
####################################################################################
Another forum post suggests configuring the fckeditor, but I don't understand where to put this code.
Can anybody help?
printing test spec with images
Moderators: Amaradana, TurboPT, TL Developers