{combine_css path=$GUESTBOOK_PATH|@cat:"template/style.css"} {combine_script id="livevalidation" load="footer" path=$GUESTBOOK_PATH|@cat:"template/livevalidation.min.js"} {footer_script require='livevalidation'} {if !$comment_add.IS_LOGGED} var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true }); author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your username'|@translate}" }); {/if} {if $add_comment.EMAIL_MANDATORY and (!$add_comment.IS_LOGGED or empty($add_comment.EMAIL))} var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true }); email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your e-mail'|@translate}" }); email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|@translate}" }); {/if} var website = new LiveValidation('website', {ldelim} onlyOnSubmit: true }); website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/i, failureMessage: "{'invalid website address'|@translate}"}); var content = new LiveValidation('contentid', {ldelim} onlyOnSubmit: true }); content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|@translate}" }); jQuery("#addComment").hide(); jQuery("#guestbookAdd").css('width','180px'); jQuery("#expandForm").click(function() {ldelim} jQuery("#guestbookAdd").animate({ldelim}"width": "550px"}, function() {ldelim} jQuery("#expandForm").slideUp(); jQuery("#addComment").slideDown("slow"); }); }); {/footer_script} {if $comment_add.ACTIVATE_RATING} {combine_script id="jquery.raty" path=$GUESTBOOK_PATH|@cat:"template/jquery.raty/jquery.raty.min.js"} {footer_script} jQuery("#comment_rate").raty({ldelim} path: "{$ROOT_URL}{$GUESTBOOK_PATH}template/jquery.raty/", half: true }); {/footer_script} {/if} {* *} {if $themeconf.name == "stripped" or $themeconf.parent == "stripped"} {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/stripped.tpl'} {assign var="clear" value="true"} {elseif $themeconf.name == "simple-grey" or $themeconf.parent == "simple"} {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/simple.tpl'} {assign var="clear" value="true"} {else} {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/default.tpl'} {/if} {if isset($errors) or not empty($infos)} {include file='infos_errors.tpl'} {/if} {if isset($comment_add)}

{'Sign the guestbook'|@translate}

{if not $comment_add.IS_LOGGED or empty($comment_add.EMAIL)} {/if} {if $comment_add.ACTIVATE_RATING} {/if}
{if $comment_add.IS_LOGGED} {$comment_add.AUTHOR} {else} {/if}
{'* : mandatory fields'|@translate}
{/if}

{'There are %d messages'|@translate|@sprintf:$COMMENT_COUNT}

{if isset($comments)}
{if !empty($navbar)}
{include file='navigation_bar.tpl'|@get_extent:'navbar'}
{/if} {include file=$ABS_GUESTBOOK_PATH|@cat:'template/comment_list.tpl'}
{/if} {if $clear}
{/if} {* *}