}
-void put_trailing_javascript(void) {
- wprintf("%s", ChrPtr(WC->trailing_javascript));
+void tmplput_trailing_javascript(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *vContext, int ContextType)
+{
+ struct wcsession *WCC = WC;
+
+ if (WCC != NULL)
+ StrBufAppendTemplate(Target, nArgs, Tokens, vContext, ContextType,
+ WCC->trailing_javascript, 0);
}
/*
{
if (print_standard_html_footer) {
wprintf("</div> <!-- end of 'content' div -->\n");
- svcallback("TRAILING_JAVASCRIPT", put_trailing_javascript);
do_template("trailing", NULL);
}
void http_transmit_thing(const char *content_type,
int is_static) {
+#ifndef TECH_PREVIEW
lprintf(9, "http_transmit_thing(%s)%s\n",
content_type,
(is_static ? " (static)" : "")
);
+#endif
output_headers(0, 0, 0, 0, 0, is_static);
hprintf("Content-type: %s\r\n"
long i;
svput("BOXTITLE", WCS_STRING, Title);
- do_template("beginbox", NULL);
+ do_template("beginboxx", NULL);
wprintf("<ul class=\"%s\">", Class);
close(fd);
+#ifndef TECH_PREVIEW
lprintf(9, "output_static('%s') %s\n", what, content_type);
+#endif
http_transmit_thing(content_type, 1);
}
if (yesbstr("force_close_session")) {
struct wcsession *WCC = WC;
if (WCC != NULL) {
+/*
+ StrBufAppendTemplate(Target, nArgs, Tokens, Context, ContextType,
+ WCC->ImportantMessage, 0);
+*/
+ WCC->ImportantMessage[0] = '\0';
StrEscAppend(Target, NULL, WCC->ImportantMessage, 0, 0);
WCC->ImportantMessage[0] = '\0';
}
void tmplput_bstr(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
{
- StrBufAppendBuf(Target,
- SBstr(Tokens->Params[0]->Start,
- Tokens->Params[0]->len), 0);
+ const StrBuf *Buf = SBstr(Tokens->Params[0]->Start,
+ Tokens->Params[0]->len);
+ if (Buf != NULL)
+ StrBufAppendTemplate(Target, nArgs, Tokens,
+ Context, ContextType,
+ Buf, 1);
}
RegisterNamespace("CSSLOCAL", 0, 0, tmplput_csslocal, CTX_NONE);
RegisterNamespace("IMPORTANTMESSAGE", 0, 0, tmplput_importantmessage, CTX_NONE);
RegisterNamespace("OFFERSTARTPAGE", 0, 0, offer_start_page, CTX_NONE);
+ RegisterNamespace("TRAILING_JAVASCRIPT", 0, 0, tmplput_trailing_javascript, CTX_NONE);
}