Revision [13813]

This is an old revision of AdamWhitlock made by AdamWhitlock on 2006-04-11 00:37:07.

 

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 http://www.adamwhitlock.com. 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: 100%;
    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).

There are 4 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki