incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Frederickx" <dirk.frederi...@gmail.com>
Subject Re: G'day
Date Fri, 02 May 2008 15:03:59 GMT
On Fri, May 2, 2008 at 4:21 PM,  <swillis@videoprotein.com> wrote:
>
> We are using jspwiki for our web site and finally have gotten around to
> the making it look nice by doing a custom skin. We are running v2.6.2
> and for some reason when we edit the properties files for the default
> text we can not get rid of G'day. We cleared cache on tomcat, restarted
> tomcat and G'day still shows up. We also cleared browser cache. I
> haven't gone through source code so I was wondering if anyone has had a
> problem changing G'day to some other text or if I am missing something
> somewhere.
>
> On another note!
>
> Doing a skin with about the ability to do rounded corners in CSS makes
> it very tough to make for a good looking skin. After researching
> different ways to do rounded corners I settled on doing a plugin that
> wraps content in a table with the appropriate table edges and divs that
> can then be referenced in CSS. You can see it in action at
> http://www.videoprotein.com and if you click on different pages you will
> see the different color rounded corners. You can also use firebug to see
> how the tables are used to do the rounded corners. This should make it
> fairly easy to do almost every theme at http://drupal.org/project/Themes
> which is what we almost went with because of the theme choices. The big
> missing feature in jspwiki is an easy way to choose great looking themes
> or do your own. I have yet to find a jspwiki template that looks great
> assuming someone spent the time to figure out how to take existing
> jspwiki.css or skin.css and do css magic.
>
> The plugin is simple and allows nesting and for the most part being able
> to reference almost any external css style for wrapping a table. This
> makes it fairly easy to do almost any design with rounded
> corners/straight edges etc. I have included the source for the plugin in
> the event someone wants to do something in the short term with it. I
> have also included the sample CSS. We are in the process of improving
> the visual elements for our web site and have a couple improvements I
> need to make to the plugin to allow for placement and other things that
> are element dependent and easier to do in the wiki plugin versus forcing
> another CSS style to be added. Once I get the plugin to cover all our
> needs I will submit as a plugin to jspwiki.
>
> Thanks
>
> Scooter Willis
> CTO
> VideoProtein
>
> [{RoundTable class='blue' width='100%' height='100%' begin='TRUE'}]
> [{RoundTable class='blueback' width='40%' height='100%' begin='TRUE'}]
> !!!__VIDEO__Protein 3.0
> [{RoundTable class='blueback' begin='FALSE'}]
>
>
> The rest of the page
>
> [{RoundTable begin=FALSE}]
>
>
> The source for the plugin
>
> public class RoundTable implements WikiPlugin {
>    private static Logger log = Logger.getLogger( RoundTable.class
> );
>
>    static final String VARIABLE_NAME = "RoundTable";
>
>    public String execute( WikiContext context, Map params )
>    throws PluginException {
>        String  className = (String)params.get( "class" );
>        if(className == null || className.length() == 0)
>            return "";
>
>        String width = (String)params.get("width");
>        if(width == null || width.length() == 0)
>            width = "100%";
>
>        String height = (String)params.get("height");
>        if(height == null || height.length() == 0)
>            height = "100%";
>
>        boolean begin = true;
>        String value = (String)params.get("begin");
>        if(value != null || value.length() > 0){
>            if(value.equalsIgnoreCase("FALSE"))
>                begin = false;
>        }
>
>        String html = "";
>        if(begin){
>            html = getHTMLStart(className,width,height);
>        }else{
>            html = getHTMLEnd(className);
>        }
>
>        return html;
>    }
>
>    private String getHTMLStart(String className, String width, String
> height){
>        StringBuffer html = new StringBuffer();
>        html.append("<table class=\"" + className + "-table-1\"
> cellspacing=\"0\" cellpadding=\"0\" style=\"width: " + width+ "; height:
> " + height + ";\">");
>          html.append("<colgroup><col/></colgroup>");
>          html.append("<tbody>");
>          html.append("<tr>");
>          html.append("<td style=\"padding: 0px;\">");
>          html.append("<table class=\"" + className + "-table-2\"
> cellspacing=\"0\" cellpadding=\"0\" style=\"height: 100%;\">");
>            html.append("<colgroup><col/></colgroup>");
>            html.append("<tbody>");
>            html.append("<tr>");
>              html.append("<td style=\"vertical-align: bottom; padding:
> 0px;\"><div class=\"" + className + "-FrameBorder-tl\"/></td>");
>              html.append("<td style=\"padding: 0px;\" class=\"" +
> className + "-FrameBorder-t\" width=\"100%\">");
>              html.append("<td style=\"vertical-align: bottom; padding:
> 0px;\"><div class=\"" + className + "-FrameBorder-tr\"/></td>");
>            html.append("</tr>");
>            html.append("</tbody>");
>          html.append("</table>");
>          html.append("</td>");
>          html.append("</tr>");
>
>          html.append("<tr>");
>          html.append("<td width=\"100%\" height=\"100%\"
> align=\"center\" style=\"vertical-align: middle; padding: 0px;\">");
>            html.append("<table class=\"" + className + "-table-3\"
> cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width: 100%;
> height: 100%;\">");
>              html.append("<colgroup><col/></colgroup>");
>              html.append("<tbody>");
>              html.append("<tr>");
>              html.append("<td style=\"padding: 0px;\" class=\"" +
> className + "-FrameBorder-l\"><div class=\"" + className +
> "-FrameBorder-l\"/></td>");
>              html.append("<td style=\"padding: 0px;\" class=\"" +
> className + "-FrameContent\" align=\"center\">");
>                  html.append("<table class=\"" + className +
> "-table-4\" cellspacing=\"0\" cellpadding=\"0\">");
>                  html.append("<tbody>");
>                  html.append("<tr>");
>                  html.append("<td>");
>        return html.toString();
>    }
>
>    private String getHTMLEnd(String className){
>        StringBuffer html = new StringBuffer();
>                  html.append("</td>");
>                  html.append("</tr>");
>                  html.append("</tbody>");
>                  html.append("</table>");
>              html.append("<td style=\"padding: 0px;\" class=\"" +
> className + "-FrameBorder-r\"><div class=\"" + className +
> "-FrameBorder-r\"/></td>");
>              html.append("</tr>");
>              html.append("</tbody>");
>            html.append("</table>");
>          html.append("</td>");
>          html.append("</tr>");
>          html.append("<tr>");
>          html.append("<td style=\"padding: 0px;\">");
>            html.append("<table class=\"" + className + "-table-5\"
> cellspacing=\"0\" cellpadding=\"0\" style=\"width: 100%;\">");
>            html.append("<colgroup><col/></colgroup>");
>            html.append("<tbody");
>            html.append("<tr>");
>            html.append("<td class=\"" + className + "-FrameBorder-bl\"
> style=\"vertical-align: top; padding: 0px;\"><div class=\"" + className
> + "-FrameBorder-bl\"> </div> </td>");
>            html.append("<td style=\"padding: 0px;\" width=\"100%\"
> class=\"" + className + "-FrameBorder-b\"><div class=\"" + className +
> "-FrameBorder-b\"> </div></td>");
>            html.append("<td class=\"" + className + "-FrameBorder-br\"
> style=\"vertical-align: top; padding: 0px;\"><div class=\"" + className
> + "-FrameBorder-br\"> </div> </td>");
>            html.append("</tr>");
>            html.append("</tbody>");
>            html.append("</table>");
>          html.append("</td>");
>          html.append("</tr>");
>        html.append("</tbody>");
>        html.append("</table>");
>
>        return html.toString();
>    }
>
>
> }
>
>
>
>
>
> The css
>
> /***********************************  blueBACK BORDERS
> **********************************************/
>
> .blueback-table-1{
>  margin-left: auto;
>  margin-right: auto;
> }
>
> .blueback-FrameContent{
>  background: transparent url(images/blueback/c.gif) repeat;
>  width:100%;
>  height:100%;
>  text-align: center;
> }
>
> .blueback-FrameBorder-tl {
>  background:  url(images/blueback/tl.gif) no-repeat top  left;
>  width:17px;
>  height:17px;
> }
>
> .blueback-FrameBorder-t {
>  background: transparent url(images/blueback/t.gif) repeat-x 0 0;
>  height:17px;
> }
>
> .blueback-FrameBorder-tr {
>  background: transparent url(images/blueback/tr.gif) no-repeat top
> right;
>  width:17px;
>  height:17px;
> }
>
> .blueback-FrameBorder-l{
>  background: transparent url(images/blueback/l.gif) repeat-y ;
>  background-color:#FFFFFF;
>  width:17px;
> }
>
> .blueback-FrameBorder-r {
>  background: transparent url(images/blueback/r.gif) repeat-y top right;
>
>  background-color:#FFFFFF;
>  width:17px;
> }
>
> .blueback-FrameBorder-bl{
>  background: transparent url(images/blueback/bl.gif) no-repeat 0 0;
>  width:17px;
>  height:17px;
>  font-size:0px;
> }
>
> .blueback-FrameBorder-b {
>  background: transparent url(images/blueback/b.gif) repeat-x 0 0;
>  height:17px;
>  font-size:1px;
> }
>
> .blueback-FrameBorder-br {
>  background: transparent url(images/blueback/br.gif) no-repeat top
> right;
>  width:17px;
>  height:17px;
>  font-size:0px;
> }
>
> /*******************************END
> blueBACK**************************************/
>
>
> /***********************************  blue BORDERS
> **********************************************/
>
> .blue-FrameContent{
>  text-align: left;
> }
>
> .blue-table-4{
>  margin-left: auto;
>  margin-right: auto;
> }
>
> .blue-FrameBorder-tl {
>  background:  url(images/blue/tl.gif) no-repeat top  left;
>  width:17px;
>  height:17px;
> }
>
> .blue-FrameBorder-t {
>  background: transparent url(images/blue/t.gif) repeat-x 0 0;
>  height:17px;
> }
>
> .blue-FrameBorder-tr {
>  background: transparent url(images/blue/tr.gif) no-repeat top right;
>
>  width:17px;
>  height:17px;
> }
>
> .blue-FrameBorder-l{
>  background: transparent url(images/blue/l.gif) repeat-y ;
>  background-color:#FFFFFF;
>  width:17px;
> }
>
> .blue-FrameBorder-r {
>  background: transparent url(images/blue/r.gif) repeat-y top right;
>  background-color:#FFFFFF;
>  width:17px;
> }
>
> .blue-FrameBorder-bl{
>  background: transparent url(images/blue/bl.gif) no-repeat 0 0;
>  width:17px;
>  height:17px;
>  font-size:0px;
> }
>
> .blue-FrameBorder-b {
>  background: transparent url(images/blue/b.gif) repeat-x 0 0;
>  height:17px;
>  font-size:1px;
> }
>
> .blue-FrameBorder-br {
>  background: transparent url(images/blue/br.gif) no-repeat top right;
>
>  width:17px;
>  height:17px;
>  font-size:0px;
> }
>
> /*******************************END
> Blue**************************************/
>

Have a look at
http://www.jspwiki.org/wiki/BrushedTemplateRoundedCorners
to see how to get rounded stuff in JSPWiki too.
It doesn't rely on images, and supports any color you select.

This is not a core feature of jspwiki, but was incorporated as part of
the port of BrushedTemplate.
It may be removed in future releases, when js-plugins come availalble.


dirk

Mime
View raw message