The code below works...
if I change the paths in these:PHP Code:if ($context['allow_calendar']) {
$font = 'arial.ttf';
$text = date("d");
$dow = date("l");
$im = ImageCreateFromPNG('../forums/Themes/BlackBox/images/mainlinks_f/calendar.png');
$black = ImageColorAllocate($im,50,50,50);
$white = ImageColorAllocate($im,255,255,255);
$lft = (strlen($text)==2) ? 8 : 16;
$fSize = 7;
switch (strlen($dow)) {
Case 6:
$l2 = 12;
break;
Case 7:
$l2 = 10;
break;
Case 8:
$l2 = 7;
break;
Case 9:
$l2 = 4;
$fSize=6.5;
break;
}
imagettftext($im, 26, 0, $lft, 43, $black, $font, $text);
imagettftext($im, $fSize, 0, $l2, 10, $white, $font, $dow);
ImagePNG($im,'../forums/Themes/BlackBox/images/mainlinks_f/calendar1.png');
imagedestroy($im);
echo '<td class="linktd"><a href="index.php?action=calendar" title="CALENDAR"><img src="../forums/Themes/BlackBox/images/mainlinks_f/calendar1.png" border=0></a></td>';
}
toPHP Code:$im = ImageCreateFromPNG('../forums/Themes/BlackBox/images/mainlinks_f/calendar.png');
ImagePNG($im,'../forums/Themes/BlackBox/images/mainlinks_f/calendar1.png');
it no longer works?PHP Code:$im = ImageCreateFromPNG($settings['theme_url'] . '/images/mainlinks_f/calendar.png');
ImagePNG($im,$settings['theme_url'] . '/images/mainlinks_f/calendar1.png');
$settings['theme_url'] is set yes. cause I can echo it and the path is correct... it doesnt want to load or write the image.


Reply With Quote