The code below works...
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) ? 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($im260$lft43$black$font$text);
             
imagettftext($im$fSize0$l210$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>';


if I change the paths in these:

PHP Code:
$im ImageCreateFromPNG('../forums/Themes/BlackBox/images/mainlinks_f/calendar.png');
ImagePNG($im,'../forums/Themes/BlackBox/images/mainlinks_f/calendar1.png'); 
to

PHP Code:
$im ImageCreateFromPNG($settings['theme_url'] . '/images/mainlinks_f/calendar.png');
ImagePNG($im,$settings['theme_url'] . '/images/mainlinks_f/calendar1.png'); 
it no longer works?
$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.