</ul> </div> <div class="menu"> <h3><?php echo gettext("RSS"); ?> </h3> <ul> <li><?php printRSSLink('Gallery', '', 'Gallery', ''); ?> </li> <?php if (function_exists("printZenpageRSSLink")) { ?> <li><?php printZenpageRSSLink("News", "", "", "News"); ?> </li> <li><?php printZenpageRSSLink("NewsWithImages", "", "", "News and Gallery"); ?> </li> <?php } ?> </ul> </div>
function footer() { global $_zp_gallery_page, $_zp_current_category, $_zp_gallery; $exclude_login = array('password.php', 'register.php', 'contact.php'); ?> <div id="footer"> <?php switch ($_zp_gallery_page) { default: printRSSLink('Gallery', '', 'RSS', ''); break; case 'album.php': printRSSLink('Album', '', 'RSS', ''); break; case 'news.php': if (is_NewsCategory()) { printZenpageRSSLink('Category', $_zp_current_category->getTitlelink(), '', 'RSS', ''); } else { printZenpageRSSLink('News', '', '', 'RSS', ''); } break; } ?> <?php if ($_zp_gallery_page != 'password.php' && $_zp_gallery_page != 'archive.php') { printCustomPageURL(gettext('Archive View'), 'archive', '', ' | ', ''); } ?> <?php if ($_zp_gallery_page != 'contact.php' && getOption('zp_plugin_contact_form') && ($_zp_gallery_page != 'password' || $_zp_gallery->isUnprotectedPage('contact'))) { printCustomPageURL(gettext('Contact us'), 'contact', '', ' | ', ''); } ?> <?php if ($_zp_gallery_page != 'register.php' && !zp_loggedin() && function_exists('printRegistrationForm') && ($_zp_gallery_page != 'password.php' || $_zp_gallery->isUnprotectedPage('register'))) { printCustomPageURL(gettext('Register for this site'), 'register', '', ' | ', ''); } ?> <?php if (function_exists('printUserLogin_out') && !in_array($_zp_gallery_page, $exclude_login)) { printUserLogin_out(' | ', '', true); } ?> <?php if (function_exists('printLanguageSelector')) { ?> <br /> <?php printLanguageSelector(); } else { ?> <br /> <?php } ?> <?php printZenphotoLink(); ?> </div> <?php }
?> " title="<?php echo 'Gallery Index'; ?> "><?php echo getGalleryTitle(); ?> </a> | <?php printZenpageItemsBreadcrumb(" » ", ""); ?> <?php if (getOption('Allow_search')) { printSearchForm("", "search", "", gettext("Search gallery")); } printPageTitle(); printPageContent(); printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', ', '); printRSSLink('Gallery', '', 'RSS', ' | '); printZenpageRSSLink("News", "", "", gettext("News"), ''); //comment form plugin support if (function_exists('printCommentForm')) { printCommentForm(); } zp_apply_filter('theme_body_close'); ?> </body> </html> <?php } else { include SERVERPATH . '/' . ZENFOLDER . '/404.php'; }
printRSSLink('Album', '<li>', gettext('Album RSS'), '</li>'); ?> <?php } ?> <?php printRSSLink('Gallery', '<li>', 'Gallery', '</li>'); ?> <?php if (function_exists("printZenpageRSSLink")) { ?> <?php printZenpageRSSLink("News", "", "<li>", gettext("News"), '</li>'); ?> <?php printZenpageRSSLink("NewsWithImages", "", "<li>", gettext("News and Gallery"), '</li>'); ?> <?php } ?> </ul> </div> <?php } ?> <?php if (getOption("zenpage_contactpage") && getOption('zp_plugin_contactform')) { ?> <div class="menu"> <ul>
/** * Prints a form for posting comments * * @param bool $showcomments defaults to true for showing list of comments * @param string $addcommenttext alternate text for "Add a comment:" * @param bool $addheader set true to display comment count header * @param string $comment_commententry_mod use to add styles, classes to the comment form div */ function printCommentForm($showcomments = true, $addcommenttext = NULL, $addheader = true, $comment_commententry_mod = '') { global $_zp_gallery_page, $_zp_themeroot, $_zp_current_admin_obj, $_zp_current_comment; if (is_null($addcommenttext)) { $addcommenttext = '<h3>' . gettext('Add a comment:') . '</h3>'; } switch ($_zp_gallery_page) { case 'album.php': if (!getOption('comment_form_albums')) { return; } $comments_open = OpenedForComments(ALBUM); $formname = '/comment_form.php'; break; case 'image.php': if (!getOption('comment_form_images')) { return; } $comments_open = OpenedForComments(IMAGE); $formname = '/comment_form.php'; break; case 'pages.php': if (!getOption('comment_form_pages')) { return; } $comments_open = zenpageOpenedForComments(); $formname = '/comment_form.php'; break; case 'news.php': if (!getOption('comment_form_articles')) { return; } $comments_open = zenpageOpenedForComments(); $formname = '/comment_form.php'; break; default: return; break; } $arraytest = '/^a:[0-9]+:{/'; // this screws up Eclipse's brace count!!! ?> <!-- printCommentForm --> <div id="commentcontent"> <?php $num = getCommentCount(); if ($showcomments) { if ($num == 0) { if ($addheader) { echo '<h3 class="empty">' . gettext('No Comments') . '</h3>'; } $display = ''; } else { if ($addheader) { echo '<h3>' . sprintf(ngettext('%u Comment', '%u Comments', $num), $num) . '</h3>'; } if (getOption('comment_form_toggle')) { ?> <script type="text/javascript"> // <!-- <![CDATA[ function toggleComments(hide) { if (hide) { $('div.comment').hide(); $('#comment_toggle').html('<button type="button" onclick="javascript:toggleComments(false);"><?php echo gettext('show comments'); ?> </button>'); } else { $('div.comment').show(); $('#comment_toggle').html('<button type="button" onclick="javascript:toggleComments(true);"><?php echo gettext('hide comments'); ?> </button>'); } } $(document).ready(function() { toggleComments(true); }); // ]]> --> </script> <?php $display = ' style="display:none"'; } else { $display = ''; } } ?> <div id="comments"> <div id="comment_toggle"><!-- place holder for toggle button --></div> <?php while (next_comment()) { if (!getOption('comment_form_showURL')) { $_zp_current_comment['website'] = ''; } ?> <div class="comment" <?php echo $display; ?> > <a name="c_<?php echo $_zp_current_comment['id']; ?> "></a> <div class="commentinfo"> <h4><?php printCommentAuthorLink(); ?> : on <?php echo getCommentDateTime(); printEditCommentLink('Edit', ', ', ''); ?> </h4> </div><!-- class "commentinfo" --> <div class="commenttext"><?php echo getCommentBody(); ?> </div><!-- class "commenttext" --> </div><!-- class "comment" --> <?php } ?> </div><!-- id "comments" --> <?php } ?> <!-- Comment Box --> <?php if ($comments_open) { $stored = array_merge(getCommentStored(), array('street' => '', 'city' => '', 'state' => '', 'country' => '', 'postal' => '')); $raw = $stored['custom']; if (preg_match($arraytest, $raw)) { $custom = unserialize($raw); foreach ($custom as $key => $value) { if (!empty($value)) { $stored[$key] = $value; } } } $disabled = array('name' => '', 'website' => '', 'anon' => '', 'private' => '', 'comment' => '', 'street' => '', 'city' => '', 'state' => '', 'country' => '', 'postal' => ''); foreach ($stored as $key => $value) { $disabled[$key] = false; } if (zp_loggedin()) { $raw = $_zp_current_admin_obj->getCustomData(); if (preg_match($arraytest, $raw)) { $address = unserialize($raw); foreach ($address as $key => $value) { if (!empty($value)) { $disabled[$key] = true; $stored[$key] = $value; } } } $name = $_zp_current_admin_obj->getName(); if (!empty($name)) { $stored['name'] = $name; $disabled['name'] = ' disabled="disabled"'; } else { $user = $_zp_current_admin_obj->getUser(); if (!empty($user)) { $stored['name'] = $user; $disabled['name'] = ' disabled="disabled"'; } } $email = $_zp_current_admin_obj->getEmail(); if (!empty($email)) { $stored['email'] = $email; $disabled['email'] = ' disabled="disabled"'; } if (!empty($address['website'])) { $stored['website'] = $address['website']; $disabled['website'] = ' disabled="disabled"'; } } $data = zp_apply_filter('comment_form_data', array('data' => $stored, 'disabled' => $disabled)); $disabled = $data['disabled']; $stored = $data['data']; if (MEMBERS_ONLY_COMMENTS && !zp_loggedin(POST_COMMENT_RIGHTS)) { echo gettext('Only registered users may post comments.'); } else { if (!empty($addcommenttext)) { echo $addcommenttext; } ?> <div id="commententry" <?php echo $comment_commententry_mod; ?> > <?php $theme = getCurrentTheme(); $form = getPlugin('comment_form' . $formname, $theme); require $form; ?> </div><!-- id="commententry" --> <?php } } else { ?> <div id="commententry"> <h3><?php echo gettext('Closed for comments.'); ?> </h3> </div><!-- id="commententry" --> <?php } ?> </div><!-- id="commentcontent" --> <?php if (getOption('comment_form_rss')) { ?> <br clear="all" /> <?php switch ($_zp_gallery_page) { case "image.php": printRSSLink("Comments-image", "", gettext("Subscribe to comments"), ""); break; case "album.php": printRSSLink("Comments-album", "", gettext("Subscribe to comments"), ""); break; case "news.php": printZenpageRSSLink("Comments-news", "", "", gettext("Subscribe to comments"), ""); break; case "pages.php": printZenpageRSSLink("Comments-page", "", "", gettext("Subscribe to comments"), ""); break; } } ?> <!-- end printCommentForm --> <?php }