Changeset 564

Show
Ignore:
Timestamp:
07/09/2007 11:55:56 PM (3 years ago)
Author:
BrianKoontz
Message:

Added additional CSS divs to allow for individual styling of comment
content and comment input actions, created two stylesheets as
examples of "boxed" and "nested" comments, added new config param for
comment stylesheet to allow for admin selection of comment style. Refs
#418.

Location:
trunk
Files:
2 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/actions/header/header.php

    r560 r564  
    5050        <meta name="description" content="<?php echo $this->GetConfigValue("meta_description") ?>" /> 
    5151        <link rel="stylesheet" type="text/css" href="<?php echo $this->StaticHref('css/'.$this->GetConfigValue('stylesheet')); ?>" /> 
     52        <link rel="stylesheet" type="text/css" href="<?php echo $this->StaticHref('css/'.$this->GetConfigValue('comment_stylesheet')); ?>" /> 
    5253        <link rel="stylesheet" type="text/css" href="<?php echo $this->StaticHref('css/print.css'); ?>" media="print" /> 
    5354        <link rel="icon" href="<?php echo $this->StaticHref('images/favicon.ico'); ?>" type="image/x-icon" /> 
  • trunk/css/wikka.css

    r518 r564  
    5050        border-top: 1px solid #CCCCCC; 
    5151        border-bottom: 1px solid #CCCCCC; 
    52 } 
    53  
    54 /* comments */ 
    55  
    56 /* wrapper for the whole comments block, contains the header and the actual comments */ 
    57 #comments { 
    58         margin: 0px; 
    59         background-color: #E3E3E3; 
    60         padding-bottom: 10px; 
    61 } 
    62  
    63 #comments form input[type=submit] { 
    64         font-size: 80%; 
    65 } 
    66  
    67 /* contains the comments form and the navigation bar */ 
    68 .commentsheader { 
    69         clear: both; 
    70         background-color: #E3E3E3; 
    71         padding: 2px 10px 0 10px; 
    72         border-top: 1px solid #CCCCCC; 
    73 } 
    74  
    75 .commentsheader form { 
    76         padding: 5px 0;  
    77 } 
    78  
    79 /* wrapper for the comment lists */ 
    80 .commentscontainer { 
    81         background-color: #E3E3E3; 
    82 } 
    83  
    84 /* alternate color for single comments */ 
    85 .comment2 { 
    86         background-color: #EEEEEE; 
    87         padding: 5px; 
    88         border: 1px solid #CCCCCC; 
    89         margin: 10px; 
    90 } 
    91  
    92 .comment { 
    93         background-color: #DDDDDD; 
    94         padding: 5px; 
    95         border: 1px solid #CCCCCC; 
    96         margin: 10px; 
    97 } 
    98  
    99 .commentform { 
    100         background-color: #EEEEEE; 
    101         padding: 10px; 
    102 } 
    103  
    104 .commentinfo { 
    105         color: #AAAAAA; 
    106 } 
    107  
    108 .commentauthor { 
    109         font-size: 1.2em; 
    110         line-height: 20px; 
    111         color: #000000; 
    112         margin: 5px 5px 0 0; 
    113 } 
    114  
    115 .commentparent { 
    116         font-size: 1em; 
    117         line-height: 20px; 
    118         color: #555555; 
    119         margin: 5px 5px 5px 5px; 
    120 } 
    121  
    122 /* comments navigation */ 
    123  
    124 div#commentsnav { 
    125 /*      border:1px solid #CCC; */ 
    126 /*      background-color:#EEE; */ 
    127         float:right; 
    128         padding:3px; 
    129 } 
    130  
    131 div#commentsnav img.icon { 
    132         border: 1px solid #CCC; 
    133         padding:3px; 
    134         background-color:#EFEFEF; 
    135         margin:1px; 
    136 } 
    137  
    138 div#commentsnav img.icon_on { 
    139         border: 1px solid #CCC; 
    140         padding:3px; 
    141         background-color:#DDD; 
    142         margin:1px; 
    143 } 
    144  
    145 div#commentsnav img.icon:hover { 
    146         background-color:#DDD; 
    14752} 
    14853 
  • trunk/handlers/show/show.php

    r559 r564  
    219219                $comment_class = ''; 
    220220            if($comment['level'] % 2 == 1) { 
    221                         $comment_class = "comment"; 
     221                        $comment_class = "comment-layout-1"; 
    222222                } else { 
    223                         $comment_class = "comment2"; 
     223                        $comment_class = "comment-layout-2"; 
    224224                } 
    225225 
     
    227227?> 
    228228        <div class="<?php echo $comment_class ?>"> 
    229                 <div class="commentinfo"><?php echo COMMENT_DELETED_LABEL ?></div> 
     229                <div class="commentdeleted"><?php echo COMMENT_DELETED_LABEL ?></div> 
    230230<?php 
    231231                } else { 
     
    236236?> 
    237237        <div id="comment_<?php echo $comment['id'] ?>" class="<?php echo $comment_class ?>" > 
     238                <div class="commentheader"> 
    238239                <div class="commentauthor"><?php echo COMMENT_BY_LABEL.$comment_author ?></div> 
    239240                <div class="commentinfo"><?php echo $comment_ts ?></div> 
     241                </div> 
     242                <div class="commentbody"> 
    240243                <?php echo $comment['comment'] ?> 
     244                </div> 
    241245<?php 
    242246                        if($obj->HasAccess('comment_post')) 
    243247                        { 
     248                                echo "<div class=\"commentaction\">"; 
    244249                                echo $obj->FormOpen("processcomment"); 
    245250?> 
     
    258263                                } 
    259264                                echo $obj->FormClose(); 
     265                                echo "</div>"; 
    260266                        } 
    261267                }                
  • trunk/libs/Config.class.php

    r560 r564  
    112112         */ 
    113113        var $edit_buttons_position = 'bottom'; 
     114 
    114115        /** 
    115116         * Stylesheet name. 
     
    118119         */ 
    119120        var $stylesheet = 'wikka.css'; 
     121 
     122        /** 
     123         * Comments stylesheet name. 
     124         * Name of the stylesheet used to render comments.  
     125         * This entry must not be empty must point to an existing and valid CSS 
     126         * file located under the css folder. The default stylesheet is 
     127         * "boxed-comments.css"". 
     128         */ 
     129        var $comment_stylesheet = 'boxed-comments.css'; 
    120130 
    121131        /**