Changeset 15948 for extensions
- Timestamp:
- Jun 22, 2012, 4:10:24 PM (12 years ago)
- Location:
- extensions/GuestBook
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GuestBook/admin/config.php
r15940 r15948 9 9 'email_admin_on_comment_validation' => isset($_POST['email_admin_on_comment_validation']), 10 10 'nb_comment_page' => $_POST['nb_comment_page'], 11 'activate_rating' => isset($_POST['activate_rating']), 11 12 ); 12 13 -
extensions/GuestBook/admin/template/config.tpl
r15940 r15948 13 13 <b>{'Number of comments per page'|@translate}</b> 14 14 <input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{$nb_comment_page}"> 15 </label> 16 </li> 17 18 <li> 19 <label> 20 <input type="checkbox" name="activate_rating" {if ($activate_rating)}checked="checked"{/if}> 21 <b>{'Activate rating'|@translate}</b> 15 22 </label> 16 23 </li> -
extensions/GuestBook/include/guestbook.inc.php
r15940 r15948 111 111 'content' => trim( $_POST['content'] ), 112 112 'website' => trim( $_POST['website'] ), 113 'rate' => $_POST['score'],113 'rate' => @$_POST['score'], 114 114 ); 115 115 … … 228 228 'CONTENT' => trigger_event('render_comment_content',$row['content']), 229 229 'WEBSITE' => $row['website'], 230 'WEBSITE_NAME' => preg_replace('#^(https?:\/\/)#i', null, $row['website']),231 'STARS' => get_stars($row['rate'], GUESTBOOK_PATH .'template/jquery.raty/'),232 'RATE' => $row['rate'],233 230 ); 231 232 if ($conf['guestbook']['activate_rating']) 233 { 234 $tpl_comment['STARS'] = get_stars($row['rate'], GUESTBOOK_PATH .'template/jquery.raty/'); 235 } 234 236 235 237 if (is_admin() and !empty($row['email'])) … … 310 312 'WEBSITE' => $website , 311 313 'EMAIL' => $email , 314 'ACTIVATE_RATING' => $conf['guestbook']['activate_rating'], 312 315 )); 313 316 } -
extensions/GuestBook/language/en_UK/plugin.lang.php
r15940 r15948 9 9 $lang['* : mandatory fields'] = '* : mandatory fields'; 10 10 $lang['There are %d messages'] = 'There are %d messages'; 11 $lang['Activate rating'] = 'Activate rating'; 12 $lang['%s says on %s :'] = '%s says on %s :'; 11 13 12 14 ?> -
extensions/GuestBook/language/fr_FR/plugin.lang.php
r15940 r15948 9 9 $lang['* : mandatory fields'] = '* : champs obligatoires'; 10 10 $lang['There are %d messages'] = 'Il y a %d messages'; 11 $lang['Activate rating'] = 'Activater la notation'; 12 $lang['%s says on %s :'] = '%s a dit le %s :'; 11 13 12 14 ?> -
extensions/GuestBook/maintain.inc.php
r15940 r15948 8 8 'email_admin_on_comment_validation' => false, 9 9 'nb_comment_page' => 15, 10 'activate_rating' => true, 10 11 ))); 11 12 -
extensions/GuestBook/template/comment_list.tpl
r15940 r15948 27 27 </div> 28 28 {/if} 29 30 {if $comment.WEBSITE} 31 {assign var="author" value='<span class="commentAuthor"><a href="'|@cat:$comment.WEBSITE|@cat:'">'|@cat:$comment.AUTHOR|@cat:'</a></span>'} 32 {else} 33 {assign var="author" value='<span class="commentAuthor">'|@cat:$comment.AUTHOR|@cat:'</span>'} 34 {/if} 35 {assign var="date" value='<span class="commentDate">'|@cat:$comment.DATE|@cat:'</span>'} 36 29 37 30 38 <div class="commentHeader"> 31 <span class="commentAuthor">{$comment.AUTHOR}</span> 32 {if $comment.WEBSITE} - <a href="{$comment.WEBSITE}">{$comment.WEBSITE_NAME}</a>{/if} 33 {if $comment.EMAIL} - <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if}<br> 34 <span class="commentDate">{$comment.DATE}</span> 35 {if $comment.RATE}{$comment.STARS}{/if} 39 {'%s says on %s :'|@translate|@sprintf:$author:$date}<br> 40 {if $comment.STARS}{$comment.STARS}{/if} 41 {if $comment.EMAIL} <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if} 36 42 </div> 37 43 {if isset($comment.IN_EDIT)} -
extensions/GuestBook/template/guestbook.tpl
r15940 r15948 1 1 {combine_css path=$GUESTBOOK_PATH|@cat:"template/style.css"} 2 {combine_script id="jquery.raty" path=$GUESTBOOK_PATH|@cat:"template/jquery.raty/jquery.raty.min.js"} 2 3 {if $comment_add.ACTIVATE_RATING} 4 {combine_script id="jquery.raty" path=$GUESTBOOK_PATH|@cat:"template/jquery.raty/jquery.raty.min.js"} 5 {footer_script} 6 $("#comment_rate").raty({ldelim} 7 path: "{$GUESTBOOK_PATH}template/jquery.raty/", 8 half: true 9 }); 10 {/footer_script} 11 {/if} 3 12 4 13 {$MENUBAR} 5 14 6 15 {footer_script} 7 $("#comment_rate").raty({ldelim}8 path: "{$GUESTBOOK_PATH}template/jquery.raty/",9 half: true10 });11 16 $("#expandForm").click(function() {ldelim} 12 17 $("#guestbookAdd").animate({ldelim}"width": "500px"}, function() {ldelim} … … 48 53 {/if} 49 54 <tr> 55 {if $comment_add.ACTIVATE_RATING} 50 56 <td> 51 57 <p>{'Rate'|@translate} :</p> 52 58 <p><span id="comment_rate"></span></p> 53 59 </td> 60 {/if} 54 61 <td> 55 62 <p><label for="website">{'Website'|@translate} :</label></p> -
extensions/GuestBook/template/style.css
r15940 r15948 18 18 margin:0; 19 19 cursor:pointer; 20 border-bottom-width:1px;21 border-bottom-style:dotted;22 20 text-align:center; 23 21 } … … 52 50 list-style:none; 53 51 } 54 55 .commentElement .description { 56 padding:7px !important; 57 } 58 59 .commentElement .commentHeader { 60 background:#444; 61 margin:-7px; 62 margin-bottom:0; 63 padding:3px; 64 color:#ddd; 65 border-radius:5px 5px 0 0; 66 } 67 68 .commentElement .commentHeader a { 69 color:#FFE093; 70 } 52 .commentElement .description { 53 padding:7px !important; 54 } 55 .commentHeader { 56 background:#444; 57 margin:-7px; 58 margin-bottom:0; 59 padding:6px; 60 color:#ddd; 61 border-radius:5px 5px 0 0; 62 } 63 .commentAuthor { 64 font-size:1.1em; 65 } 66 .commentDate { 67 font-size:0.9em; 68 } 69 .commentHeader a { 70 color:#FFE093; 71 }
Note: See TracChangeset
for help on using the changeset viewer.