Adam Whitlock



Hello, my name is Adam Whitlock and I have currently implimented Wikka in an intranet environment. I'm pretty satisfied with how well it handles our different needs and is very popular. I am quite supprised how much Wikka has made an impression on me, as I would have never thought to use a wiki for an intranet site. Anyone who tries it will be thankful once they realize no one has asked them for additions after the first couple weeks.



Comment Form Width / Height Fix


I came across an issue earlier in the evening when trying out different CSS styles on my personal Wikka installation (no longer up). The comment box in Wikka is fixed. This is very frustrating on a web designers standpoint, especially when working with a narrow design. The designer in me realized that simply encasing the comment form itself with a <DIV> tag would allow any Wikka designer to modify it's apperance.

In '/handlers/page/show.php' find the following code:
                // display comment form
                print("<div class=\"commentform\">\n");
                if ($this->HasAccess("comment"))
                {?>
                        <?php echo $this->FormOpen("addcomment"); ?>
                    <label for="commentbox">Add a comment to this page:<br />
                    <textarea id="commentbox" name="body" rows="6" cols="78"></textarea><br />
                    <input type="submit" value="Add Comment" accesskey="s" />
                        </label>
                    <?php echo $this->FormClose(); ?>
                <?php
                }
                print("</div>\n");
            }
            else
            {
            ?>


Replace with:
                // display comment form
                print("<div class=\"commentform\">\n");
                if ($this->HasAccess("comment"))
                {?>
                        <?php echo $this->FormOpen("addcomment"); ?>
                    <label for="commentbox">Add a comment to this page:<br />
                    <textarea class="commentbox" id="commentbox" name="body" ></textarea><br />
                    <input type="submit" value="Add Comment" accesskey="s" />
                        </label>
                    <?php echo $this->FormClose(); ?>
                <?php
                }
                print("</div>\n");
            }
            else
            {
            ?>


This code change will allow you to assign the CSS class "commentbox" to the form itself. It is necessary to create the '.commentbox' code to your wikka.css file however. This allows you to specify width and height, along with any other CSS feature you desire. For example the following code will create a comment form that takes up 99% of the width as well as provide a decent height:

.commentbox {
    background-color: #eee;
    width: 99%;
    height: 90px;
    border: 1px solid #CCCCCC;
}


When using 100% width using this code, please keep in mind it is not very attractive for Windows IE users, though looks great with many other browsers (FireFox for PC & Mac, Safari, et cetera).




CategoryUsers
Comments
Comment by AdamWhitlock
2006-01-06 20:26:23
Something powerful enough to list a week of all entries as well would be great.
Comment by DarTar
2006-01-08 10:13:23
Hi Adam, you might take a look at http://wikka.jsnx.com/GmBowenWikkaAsPIM
Comment by proxy17.secure-on.net
2006-01-11 18:27:25
That's great DarTar. Thanks for the link. I was looking at that earlier and was not sure if it could handle the flat view, but must have glanced over it.
Comment by DarTar
2008-11-27 04:36:36
Adam, this is how the new default page template will look like: http://wikkawiki.org/WikkaSkinOptimization it should allow much more flexibility, see for example: http://css.openformats.org/wikka.php?wakka=MySkin
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki