%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.ui.*" %>
<%@ page import="java.util.*" %>
<%
// preferences cookie
// here are the DEFAULT user preferences -- change these values if you want different defaults
String DELIM = "\u00a4";
String prefDateFormat = "dd-MMM-yy HH:mm a, Z";
String prefSkinName = "PlainVanilla";
String prefTimeZone = "";
String prefEditAreaHeight = "24";
String prefEditorType = "plain";
String prefShowQuickLinks = "no";
String prefShowCalendar = "no" ;
Cookie[] cookies = request.getCookies();
if (cookies != null)
{
for (int i = 0; i < cookies.length; i++)
{
if( "JSPWikiUserPrefs".equals( cookies[i].getName() ) )
{
String s = TextUtil.urlDecodeUTF8( cookies[i].getValue() ) ;
String[] ss = s.split( DELIM );
int sslen = ss.length;
if( sslen > 1 ) prefSkinName = ss[0]; //more robust -- at least 2 parms recognised
if( sslen > 1 ) prefDateFormat = ss[1];
if( sslen > 2 ) prefTimeZone = ss[2];
if( sslen > 3 ) prefEditAreaHeight = ss[3];
if( sslen > 4 ) prefShowQuickLinks = ss[4];
if( sslen > 5 ) prefShowCalendar = ss[5];
if( sslen > 6 ) prefEditorType = ss[6];
break;
}
}
}
session.setAttribute("prefSkinName", prefSkinName );
session.setAttribute("prefDateFormat", prefDateFormat );
session.setAttribute("prefTimeZone", prefTimeZone );
session.setAttribute("prefEditAreaHeight", prefEditAreaHeight );
session.setAttribute("prefEditorType", prefEditorType );
session.setAttribute("prefShowQuickLinks", prefShowQuickLinks );
session.setAttribute("prefShowCalendar", prefShowCalendar );
%>
<%--
--%>
<%-- FIXME: check is prefSkinName exists -- otherwise fall back to PlainVanilla --%>
<%-- hack to show transparent png's in IE --%>
"
title="Search " />
"
title="Help" />
"
title="Front page" />
<%-- support categories / fixme --%>
<%-- add stuff for the brushed template --%>