Howdy list,

This is a quick patch which adds an IMAGEURL tag
for use in html templates.

The IMAGEURL tag can be used in sqwebmail HTML
templates like this:

<td background="[#IMAGEURL#]/mybackground.jpg">

In the above example, [#IMAGEURL#] is replaced with
the URL location of the template's images directory.
Usually this is "/webmail", but with my "imageurl &
templatedir environ patch" it is now possible to run two
different templates on the same domain name with the
same CGI executable. This new functionality introduces
the need to dynamically generate the IMAGEURL within
templates so that each template can use a custom
IMAGEURL directory.

This patch ONLY works in conjuction with my
"imageurl & templatedir environ patch" which I
posted here on 07/03/03. 

NOTE: The environ patch has not yet been approved
by Sam.

Thanks!

-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net

--- sqwebmail-3.5.3.20030629/sqwebmail/sqwebmail.c	Thu Jul  3 18:02:32 2003
+++ sqwebmail-3.5.3.20030629.new/sqwebmail/sqwebmail.c	Fri Jul  4 14:25:42 2003
@@ -1243,6 +1243,13 @@
 		{
 			doldapsearch();
 		}
+		else if (strcmp(kw, "IMAGEURL") == 0)
+		{
+		char	*imageurl=malloc_get_imageurl();
+
+			printf("%s", imageurl);
+			free(imageurl);
+		}			
 		else if (strcmp(kw, "LOADMAILFILTER") == 0)
 		{
 			mailfilter_init();

Reply via email to