function commonComment() { if (function_exists('printCommentForm')) { ?> <div id="commentbox"> <?php if (getCommentErrors() || getCommentCount() == 0) { $style = NULL; $head = ''; } else { //TODO: if the following line is used as intended the comment textarea is hidden to start with and when shown is not full width. // $style = ' class="comment" style="display:none;"'; $style = ' class="commentx" style="display:block;"'; $head = "<div{$style}><h3>" . gettext('Add a comment') . '</h3></div>'; } printCommentForm(true, $head, true, $style); ?> </div><!-- id="commentbox" --> <?php } }
function commonComment() { if (function_exists('printCommentForm')) { ?> <div id="commentbox"> <?php if (getCommentErrors()) { $style = NULL; $head = ''; } else { $style = 'style="display:none;"'; $head = '<br clear="all" /><p class="buttons"><a href="javascript:toggle(\'commententry\');" >' . gettext('Add a comment') . '</a></p><br clear="all" />'; } printCommentForm(true, $head, true, $style); ?> </div><!-- id="commentbox" --> <?php } }
}); }); // ]]> --> </script> <?php } ?> <?php printRSSHeaderLink('Gallery', gettext('Gallery RSS')); setOption('thumb_crop_width', 85, false); setOption('thumb_crop_height', 85, false); setOption('images_per_page', getOption('images_per_page') - 1, false); if (!isImagePhoto($_zp_current_image)) { echo '<style type="text/css"> #prevnext a strong {display:none;}</style>'; } if (function_exists('getCommentErrors') && getCommentErrors()) { $errors = 1; ?> <link rel="stylesheet" type="text/css" href="<?php echo $_zp_themeroot; ?> /css/comments-show.css" /> <?php } else { $errors = 0; ?> <link rel="stylesheet" type="text/css" href="<?php echo $_zp_themeroot; ?> /css/comments-hide.css" /> <?php
function commonComment() { if (function_exists('printCommentForm')) { ?> <div id="commentbox"> <?php if (getCommentErrors() || getCommentCount() == 0) { $style = NULL; $head = ''; } else { $style = ' class="commentx" style="display:block;"'; $head = "<div{$style}><h3>" . gettext('Add a comment') . '</h3></div>'; } printCommentForm(true, $head, true, $style); ?> </div><!-- id="commentbox" --> <?php } }
/** * Tool to put an out error message if a comment possting was not accepted * * @param string $class optional division class for the message */ function printCommentErrors($class = 'error') { $s = getCommentErrors(); if ($s) { echo '<div class="' . $class . '">' . $s . '</div>'; } }