/** * Helper function to print the individual slides * * @param obj $albumobj Album object * @param obj $imgobj Current slide obj * @param int $width Slide image width * @param int $height Slide image height * @param int $cropw Slide image crop width * @param int $croph Slide image crop height * @param bool $linkslides True or false if the slides should be linked to their image page. * Note: In carousel mode this means full image links as here slides are always linked to the image page. * @param bool $crop True or false to crop the image * @param bool $carousel if the slideshow is a carousel so we can enable full image linking (only images allowed!) */ static function getSlide($albumobj, $imgobj, $width, $height, $cropw, $croph, $linkslides, $crop = false, $carousel = false) { global $_zp_current_image; if ($crop) { $imageurl = $imgobj->getCustomImage(NULL, $width, $height, $cropw, $croph, NULL, NULL, true, NULL); } else { $maxwidth = $width; $maxheight = $height; getMaxSpaceContainer($maxwidth, $maxheight, $imgobj); $imageurl = $imgobj->getCustomImage(NULL, $maxwidth, $maxheight, NULL, NULL, NULL, NULL, NULL, NULL); } $slidecontent = '<div class="slide">' . "\n"; // no space in carousels for titles! if (!$carousel) { $slidecontent .= '<h4>' . html_encode($albumobj->getTitle()) . ': ' . html_Encode($imgobj->getTitle()) . '</h4>' . "\n"; } if ($carousel) { // on the carousel this means fullimage as they are always linked anyway if ($linkslides) { $url = pathurlencode($imgobj->getFullImageURL()); } else { $url = pathurlencode($imgobj->getLink()); } $slidecontent .= '<a href="' . $url . '">' . "\n"; } else { if (!$carousel && $linkslides) { $slidecontent .= '<a href="' . pathurlencode($imgobj->getLink()) . '">' . "\n"; } } $active = ''; if ($carousel && !is_null($_zp_current_image)) { if ($_zp_current_image->filename == $imgobj->filename) { $active = ' class="activeslide"'; } else { $active = ''; } } $slidecontent .= '<img src="' . pathurlencode($imageurl) . '" alt=""' . $active . '>' . "\n"; if ($linkslides || $carousel) { $slidecontent .= '</a>' . "\n"; } // no space in carousels for this! if (getOption("cycle-slideshow_showdesc") && !$carousel) { $slidecontent .= '<div class="slide_desc">' . html_encodeTagged($imgobj->getDesc()) . '</div>' . "\n"; } $slidecontent .= '</div>' . "\n"; return $slidecontent; }
function printCustomField($field, $label = NULL, $object = NULL) { $detail = NULL; $text = getCustomField($field, $object, $detail); if (is_null($label)) { $label = $detail['desc'] . ': '; } if (!empty($text)) { echo html_encodeTagged($label . $text); } }
<a class="thumb-link" href="<?php echo html_encode(getAlbumURL()); ?> " title="<?php echo getNumAlbums() . ' ' . gettext('subalbums') . ' / ' . getNumImages() . ' ' . gettext('images') . ' - ' . strip_tags(shortenContent(getBareAlbumDesc(), 300, '...')); ?> "> <?php if ($zpmin_thumb_crop) { printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), null, $zpmin_album_thumb_size, $zpmin_album_thumb_size, $zpmin_album_thumb_size, $zpmin_album_thumb_size); } else { printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), $zpmin_album_thumb_size); } ?> <span class="album-title"><?php echo html_encodeTagged(shortenContent(getBareAlbumTitle(), 25, '...')); ?> </span> </a> </div> <?php } ?> </div> <div id="thumbs-wrap"> <?php while (next_image()) { ?> <div class="thumb-maxspace"> <a class="thumb-link" href="<?php echo html_encode(getImageURL());
function zpArdoise_printImageStatistic($number, $option, $albumfolder = '', $showtitle = false, $showdate = false, $showdesc = false, $desclength = 40, $showstatistic = '', $width = NULL, $height = NULL, $crop = NULL, $collection = false, $fullimagelink = false, $threshold = 0, $a_class = NULL) { $images = getImageStatistic($number, $option, $albumfolder, $collection, $threshold); if (is_null($crop) && is_null($width) && is_null($height)) { $crop = 2; } else { if (is_null($width)) { $width = 85; } if (is_null($height)) { $height = 85; } if (is_null($crop)) { $crop = 1; } else { $crop = (int) $crop && true; } } echo "\n<div id=\"{$option}\">\n"; echo "<ul>"; foreach ($images as $image) { if ($fullimagelink) { $aa_class = ' class="' . $a_class . '"'; $imagelink = $image->getFullImageURL(); } else { $aa_class = NULL; $imagelink = $image->getLink(); } echo "<li><a href=\"" . html_encode(pathurlencode($imagelink)) . "\"" . $aa_class . " title=\"" . html_encode($image->getTitle()) . "\">\n"; switch ($crop) { case 0: echo "<img src=\"" . html_encode(pathurlencode($image->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . "\" alt=\"" . html_encode($image->getTitle()) . "\" /></a>\n"; break; case 1: echo "<img src=\"" . html_encode(pathurlencode($image->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, TRUE))) . "\" alt=\"" . html_encode($image->getTitle()) . "\" width=\"" . $width . "\" height=\"" . $height . "\" /></a>\n"; break; case 2: echo "<img src=\"" . html_encode(pathurlencode($image->getThumb())) . "\" alt=\"" . html_encode($image->getTitle()) . "\" /></a>\n<br />"; break; } if ($showtitle) { echo "<h3><a href=\"" . html_encode(pathurlencode($image->getLink())) . "\" title=\"" . html_encode($image->getTitle()) . "\">\n"; echo $image->getTitle() . "</a></h3>\n"; } if ($showdate) { echo "<p>" . zpFormattedDate(DATE_FORMAT, strtotime($image->getDateTime())) . "</p>"; } if ($showstatistic === "rating" or $showstatistic === "rating+hitcounter") { $votes = $image->get("total_votes"); $value = $image->get("total_value"); if ($votes != 0) { $rating = round($value / $votes, 1); } echo "<p>" . sprintf(gettext('Rating: %1$u (Votes: %2$u)'), $rating, $votes) . "</p>"; } if ($showstatistic === "hitcounter" or $showstatistic === "rating+hitcounter") { $hitcounter = $image->get("hitcounter"); if (empty($hitcounter)) { $hitcounter = "0"; } echo "<p>" . sprintf(gettext("Views: %u"), $hitcounter) . "</p>"; } if ($showdesc) { echo html_encodeTagged(shortenContent($image->getDesc(), $desclength, ' (...)')); } echo "</li>"; } echo "</ul></div>\n"; }
/** * Print page content either of the current page or if requested by titlelink directly. If not both return false * Set the titlelink of a page to call a specific even un-published page ($published = false) as a gallery description or on another custom page for example * * @param string $titlelink the titlelink of the page to print the content from * @param bool $published If titlelink is set, set this to false if you want to call an un-published page's content. True is default * @return mixed */ function printPageContent($titlelink = NULL, $published = true) { echo html_encodeTagged(getPageContent($titlelink, $published)); }
/** * Prints the x related articles based on a tag search * * @param int $number Number of items to get * @param string $type 'albums', 'images','news','pages', "all" for all combined. * @param string $specific If $type = 'albums' or 'images' name of album * @param bool $excerpt If a text excerpt (gallery items: description; Zenpage items: content) should be shown. NULL for none or number of length * @param bool $thumb For $type = 'albums' or 'images' if a thumb should be shown (default size as set on the options) */ function printRelatedItems($number = 5, $type = 'news', $specific = NULL, $excerpt = NULL, $thumb = false, $date = false) { global $_zp_gallery, $_zp_current_album, $_zp_current_image; $label = array('albums' => gettext('Albums'), 'images' => gettext('Images'), 'news' => gettext('News'), 'pages' => gettext('Pages')); $result = getRelatedItems($type, $specific); $resultcount = count($result); if ($resultcount != 0) { ?> <h3 class="relateditems"> <?php printf(gettext('Related %s'), $type); ?> </h3> <ul id="relateditems"> <?php $count = 0; foreach ($result as $item) { $count++; ?> <li class="<?php echo $item['type']; ?> "> <?php $category = ''; switch ($item['type']) { case 'albums': $obj = newAlbum($item['name']); $url = $obj->getLink(); $text = $obj->getDesc(); $category = gettext('Album'); break; case 'images': $alb = newAlbum($item['album']); $obj = newImage($alb, $item['name']); $url = $obj->getLink(); $text = $obj->getDesc(); $category = gettext('Image'); break; case 'news': $obj = newArticle($item['name']); $url = $obj->getLink(); $text = $obj->getContent(); $category = gettext('News'); break; case 'pages': $obj = newPage($item['name']); $url = $obj->getLink(); $text = $obj->getContent(); $category = gettext('Page'); break; } ?> <?php if ($thumb) { $thumburl = false; switch ($item['type']) { case 'albums': $thumburl = $obj->getThumb(); break; case 'images': $thumburl = $obj->getThumb(); break; } if ($thumburl) { ?> <a href="<?php echo html_encode(pathurlencode($url)); ?> " title="<?php echo html_encode($obj->getTitle()); ?> " class="relateditems_thumb"> <img src="<?php echo html_encode(pathurlencode($thumburl)); ?> " alt="<?php echo html_encode($obj->getTitle()); ?> " /> </a> <?php } } ?> <h4><a href="<?php echo html_encode(pathurlencode($url)); ?> " title="<?php echo html_encode($obj->getTitle()); ?> "><?php echo html_encode($obj->getTitle()); ?> </a> <?php if ($date) { ?> <span class="relateditems_date"> <?php echo zpFormattedDate(DATE_FORMAT, strtotime($obj->getDateTime())); ?> </span> <?php } ?> <?php if ($type == 'all') { ?> (<small><?php echo $category; ?> </small>)<?php } ?> </h4> <?php if ($excerpt) { echo html_encodeTagged(shortenContent($text, $excerpt, '...', true)); } ?> </li> <?php if ($count == $number) { break; } } // foreach if ($count) { ?> </ul> <?php } } }
?> <div> <ul class="search-item"><li><?php printf(gettext('Pages (%s)'), $numpages); ?> </li></ul> <?php while (next_page()) { ?> <div class="news-truncate clearfix"> <h3 class="search-title"><?php printPageURL(); ?> </h3> <div class="search-content clearfix"> <?php echo html_encodeTagged(shortenContent(getBare(getPageContent()), 100, getOption("zenpage_textshorten_indicator"))); ?> </div> </div> <?php } ?> </div> <?php } } ?> <?php include 'inc_footer.php';
/** * 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 * @param bool $desc_order default false, set to true to change the comment order to descending ( = newest to oldest) */ function printCommentForm($showcomments = true, $addcommenttext = NULL, $addheader = true, $comment_commententry_mod = '', $desc_order = false) { global $_zp_gallery_page, $_zp_current_admin_obj, $_zp_current_comment, $_zp_captcha, $_zp_authority, $_zp_HTML_cache, $_zp_current_image, $_zp_current_album, $_zp_current_page, $_zp_current_article; if (getOption('email_new_comments')) { $email_list = $_zp_authority->getAdminEmail(); if (empty($email_list)) { setOption('email_new_comments', 0); } } if (is_null($addcommenttext)) { $addcommenttext = '<h3>' . gettext('Add a comment:') . '</h3>'; } switch ($_zp_gallery_page) { case 'album.php': if (!getOption('comment_form_albums')) { return; } $obj = $_zp_current_album; break; case 'image.php': if (!getOption('comment_form_images')) { return; } $obj = $_zp_current_image; break; case 'pages.php': if (!getOption('comment_form_pages')) { return; } $obj = $_zp_current_page; break; case 'news.php': if (!getOption('comment_form_articles') || !is_NewsArticle()) { return; } $obj = $_zp_current_article; break; default: return; break; } $comments_open = $obj->getCommentsAllowed(); ?> <!-- 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')) { ?> <div id="comment_toggle"><!-- place holder for toggle button --></div> <script type="text/javascript"> // <!-- <![CDATA[ function toggleComments(hide) { if (hide) { $('div.comment').hide(); $('.Pagination').hide(); $('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(false);"><?php echo gettext('show comments'); ?> </button>'); } else { $('div.comment').show(); $('.Pagination').show(); $('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(true);"><?php echo gettext('hide comments'); ?> </button>'); } } $(document).ready(function () { toggleComments(window.location.hash.search(/#zp_comment_id_/)); }); // ]]> --> </script> <?php $display = ' style="display:none"'; } else { $display = ''; } } $hideoriginalcomments = ''; if (getOption('comment_form_pagination') && COMMENTS_PER_PAGE < $num) { $hideoriginalcomments = ' style="display:none"'; // hide original comment display to be replaced by jQuery pagination } if (getOption('comment_form_pagination') && COMMENTS_PER_PAGE < $num) { ?> <div class="Pagination"></div><!-- this is the jquery pagination nav placeholder --> <div id="Commentresult"></div> <?php } ?> <div id="comments"<?php echo $hideoriginalcomments; ?> > <?php while (next_comment($desc_order)) { if (!getOption('comment_form_showURL')) { $_zp_current_comment['website'] = ''; } ?> <div class="comment" <?php echo $display; ?> > <div class="commentinfo"> <h4 id="zp_comment_id_<?php echo $_zp_current_comment['id']; ?> "><?php printCommentAuthorLink(); ?> : <?php echo gettext('on'); ?> <?php echo getCommentDateTime(); printEditCommentLink(gettext('Edit'), ', ', ''); ?> </h4> </div><!-- class "commentinfo" --> <div class="commenttext"><?php echo html_encodeTagged(getCommentBody(), false); ?> </div><!-- class "commenttext" --> </div><!-- class "comment" --> <?php } ?> </div><!-- id "comments" --> <?php } if (getOption('comment_form_pagination') && COMMENTS_PER_PAGE < $num) { ?> <div class="Pagination"></div><!-- this is the jquery pagination nav placeholder --> <?php } ?> <!-- Comment Box --> <?php if ($comments_open) { if (MEMBERS_ONLY_COMMENTS && !zp_loggedin(POST_COMMENT_RIGHTS)) { echo gettext('Only registered users may post comments.'); } else { $disabled = array('name' => '', 'website' => '', 'anon' => '', 'private' => '', 'comment' => '', 'street' => '', 'city' => '', 'state' => '', 'country' => '', 'postal' => ''); $stored = array_merge(array('email' => '', 'custom' => ''), $disabled, getCommentStored()); $custom = getSerializedArray($stored['custom']); foreach ($custom as $key => $value) { if (!empty($value)) { $stored[$key] = $value; } } foreach ($stored as $key => $value) { $disabled[$key] = false; } if (zp_loggedin()) { if (extensionEnabled('userAddressFields')) { $address = userAddressFields::getCustomData($_zp_current_admin_obj); 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']; foreach ($data as $check) { foreach ($check as $v) { if ($v) { $_zp_HTML_cache->disable(); // shouldn't cache partially filled in pages break 2; } } } if (!empty($addcommenttext)) { echo $addcommenttext; } ?> <div id="commententry" <?php echo $comment_commententry_mod; ?> > <?php $theme = getCurrentTheme(); $form = getPlugin('comment_form/comment_form.php', $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') && getOption('RSS_comments')) { ?> <br clear="all" /> <?php if (class_exists('RSS')) { 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": printRSSLink("Comments-news", "", gettext("Subscribe to comments"), ""); break; case "pages.php": printRSSLink("Comments-page", "", gettext("Subscribe to comments"), ""); break; } } } ?> <!-- end printCommentForm --> <?php }
/** * Prints the logout link if the user is logged in. * This is for album passwords only, not admin users; * * @param string $before before text * @param string $after after text * @param int $showLoginForm to display a login form * to not display a login form, but just a login link, set to 0 * to display a login form set to 1 * to display a link to a login form in colorbox, set to 2, but you must have colorbox enabled for the theme pages where this link appears.) * @param string $logouttext optional replacement text for "Logout" */ function printUserLogin_out($before = '', $after = '', $showLoginForm = NULL, $logouttext = NULL) { global $_zp_gallery, $__redirect, $_zp_current_admin_obj, $_zp_login_error, $_zp_gallery_page; $excludedPages = array('password.php', 'register.php', 'favorites.php', '404.php'); $logintext = gettext('Login'); if (is_null($logouttext)) { $logouttext = gettext("Logout"); } $params = array("'userlog=0'"); if (!empty($__redirect)) { foreach ($__redirect as $param => $value) { $params[] .= "'" . $param . '=' . urlencode($value) . "'"; } } if (is_null($showLoginForm)) { $showLoginForm = getOption('user_logout_login_form'); } if (is_object($_zp_current_admin_obj)) { if (!$_zp_current_admin_obj->logout_link) { return; } } $cookies = Zenphoto_Authority::getAuthCookies(); if (empty($cookies) || !zp_loggedin()) { if (!in_array($_zp_gallery_page, $excludedPages)) { switch ($showLoginForm) { case 1: ?> <div class="passwordform"> <?php printPasswordForm('', true, false); ?> </div> <?php break; case 2: if (getOption('colorbox_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page)) && zp_has_filter('theme_head', 'colorbox::css')) { ?> <script type="text/javascript"> // <!-- <![CDATA[ $(document).ready(function() { $(".logonlink").colorbox({ inline: true, innerWidth: "400px", href: "#passwordform", close: '<?php echo gettext("close"); ?> ', open: $('#passwordform_enclosure .errorbox').length }); }); // ]]> --> </script> <?php if ($before) { echo '<span class="beforetext">' . html_encodeTagged($before) . '</span>'; } ?> <a href="#" class="logonlink" title="<?php echo $logintext; ?> "><?php echo $logintext; ?> </a> <span id="passwordform_enclosure" style="display:none"> <div class="passwordform"> <?php printPasswordForm('', true, false); ?> </div> </span> <?php if ($after) { echo '<span class="aftertext">' . html_encodeTagged($after) . '</span>'; } } break; default: if ($loginlink = zp_apply_filter('login_link', getCustomPageURL('password'))) { if ($before) { echo '<span class="beforetext">' . html_encodeTagged($before) . '</span>'; } ?> <a href="<?php echo $loginlink; ?> " title="<?php echo $logintext; ?> "><?php echo $logintext; ?> </a> <?php if ($after) { echo '<span class="aftertext">' . html_encodeTagged($after) . '</span>'; } } } } } else { if ($before) { echo '<span class="beforetext">' . html_encodeTagged($before) . '</span>'; } $logoutlink = "javascript:launchScript('" . FULLWEBPATH . "/',[" . implode(',', $params) . "]);"; ?> <a href="<?php echo $logoutlink; ?> " title="<?php echo $logouttext; ?> "><?php echo $logouttext; ?> </a> <?php if ($after) { echo '<span class="aftertext">' . html_encodeTagged($after) . '</span>'; } } }
/** * @deprecated * @since 1.4.5 */ function printField($context, $field, $convertBR = NULL, $override = false, $label = '') { deprecated_functions::notify(gettext('Front end editing is not supported. Use the property specific methods.')); if (is_null($convertBR)) { $convertBR = !extensionEnabled('tiny_mce'); } switch ($context) { case 'image': global $_zp_current_image; $object = $_zp_current_image; break; case 'album': global $_zp_current_album; $object = $_zp_current_album; break; case 'pages': global $_zp_current_zenpage_page; $object = $_zp_current_zenpage_page; break; case 'news': global $_zp_current_zenpage_news; $object = $_zp_current_zenpage_news; break; default: trigger_error(sprintf(gettext('printField() invalid function call, context %X.'), $context), E_USER_NOTICE); return false; } if (!$field) { trigger_error(sprintf(gettext('printField() invalid function call, field:%s.'), $field), E_USER_NOTICE); return false; } if (!is_object($object)) { trigger_error(gettext('printField() invalid function call, not an object.'), E_USER_NOTICE); return false; } if ($override) { $text = trim($override); } else { $text = trim(get_language_string($object->get($field))); } $text = zpFunctions::unTagURLs($text); $text = html_encodeTagged($text); if ($convertBR) { $text = str_replace("\r\n", "\n", $text); $text = str_replace("\n", "<br />", $text); } if (!empty($text)) { echo $label; } echo $text; }
?> <li class="grid_5"> <a href="<?php echo html_encode(getAlbumURL()); ?> " title="<?php echo html_encodeTagged(getAnnotatedAlbumTitle()); ?> "> <?php printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), NULL, 376, 140, 376, 140, NULL, null, NULL, NULL); ?> </a> <span class="title"> <?php echo html_encodeTagged(getAnnotatedAlbumTitle()); ?> <span class="italic"> [<?php printf(ngettext('%u image', '%u images', getNumImages()), getNumImages()); ?> ] </span><br /> <?php echo getAlbumDate("(%d/%m/%Y)"); ?> </span> </li> <?php } ?>
<?php } ?> <?php if (getNextNewsURL()) { ?> <li class="next span6 pull-right"> <a href="<?php $article_url = getNextNewsURL(); echo $article_url['link']; ?> " title="<?php echo $article_url['title']; ?> "><?php echo html_encodeTagged(shortenContent($article_url['title'], 30, '(...)')); ?> → </a> </li> <?php } ?> </ul> <?php } ?> <div class="row"> <div class="span9"> <?php include 'inc_print_news.php';
<a href="<?php echo html_encode(jqm_getLink()); ?> " title="<?php printBareNewsTitle(); ?> "> <?php printNewsTitle(); ?> <small>(<?php printNewsDate(); ?> )</small> <div class="albumdesc"><?php echo html_encodeTagged(shortenContent(getBare(getNewsContent()), 57, '(...)', false)); ?> </div> </a> </li> <?php } ?> </ul> <?php printNewsPageListWithNav(gettext('next »'), gettext('« prev'), true, 'pagelist', true, 7); } ?> </div> <div class="content-secondary">
/** * Prints arbitrary data from the image object * * @param string $field the field name of the data desired * @param string $label text to label the field. * @author Ozh */ function printImageData($field, $label = '') { global $_zp_current_image; $text = getImageData($field); if (!empty($text)) { echo html_encodeTagged($label . $text); } }
<span class="buttons"> <button type="button" title="<?php echo gettext('paste'); ?> " onclick="paste();"> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/pass.png" onclick="paste();" /> <?php echo gettext('paste'); ?> </button> </span> <?php printf($title, html_encodeTagged($obj->getTitle())); ?> </h3> <p> <?php if ($image) { if (!$picture) { ?> <label class="nowrap"><input type="radio" name="link" value="thumb" id="link_thumb_none" onchange="zenchange();" /><?php echo gettext('thumb only'); ?> </label> <label class="nowrap"><input type="radio" name="link" value="thumblink" id="link_thumb_image" checked="checked" onchange="zenchange();" /><?php printf($token, 'thumb'); ?>
/** * Add a point to a map object * @param $map google map object * @param $coord coordinates array */ function addGeoCoord($map, $coord) { global $_x, $_y, $_z, $_n; if ($coord) { $marker = array(); $title = str_replace('/', '\\/', str_replace('"', '\\"', str_replace(array("\n", "\r"), "", html_encodeTagged($coord['title'])))); $desc = str_replace('/', '\\/', str_replace('"', '\\"', str_replace(array("\n", "\r"), "", html_encodeTagged($coord['desc'])))); $thumb = str_replace('/', '\\/', str_replace('"', '\\"', str_replace(array("\n", "\r"), "", html_encodeTagged($coord['thumb'])))); if ($title != '') { $title = '<h3 class="map_title">' . $title . '</h3>'; } if ($desc != '') { $desc = '<div class="map_desc">' . $desc . '</div>'; } if ($coord['thumb'] != '') { $thumb = '<p class="map_img">' . $coord['thumb'] . '</p>'; } $marker['position'] = number_format($coord['lat'], 12, '.', '') . ", " . number_format($coord['long'], 12, '.', ''); $marker['title'] = addslashes($coord['title']); $marker['infowindow_content'] = $title . $thumb . $desc; $map->add_marker($marker); $lat_f = $coord['lat'] * M_PI / 180; $long_f = $coord['long'] * M_PI / 180; $_x = $_x + cos($lat_f) * cos($long_f); $_y = $_y + cos($lat_f) * sin($long_f); $_z = $_z + sin($lat_f); $_n++; } }
?> </li> <?php if (strlen(getAlbumDate()) > 0) { ?> <li class="date"><?php printAlbumDate(''); ?> </li><?php } ?> <?php if (strlen(getAlbumDesc()) > 0) { ?> <li class="desc"><?php echo html_encodeTagged(shortenContent(getAlbumDesc(), 150, '...')); ?> </li><?php } ?> <?php if (strlen($tagstring) > 0) { ?> <li class="tags"><?php printTags('links', ' ', 'taglist', ', '); ?> </li><?php } ?> </ul> </div>
echo gettext('View album:'); printAnnotatedAlbumTitle(); ?> "> <?php printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), null, 79, 79, 79, 79, NULL, null, NULL, NULL); ?> <h3><?php printAlbumTitle(); ?> <small> (<?php printAlbumDate(''); ?> )</small></h3> <div class="albumdesc"><?php echo html_encodeTagged(shortenContent(getAlbumDesc(), 100, '(...)', false)); ?> </div> <small class="ui-li-aside ui-li-count"><?php jqm_printImageAlbumCount(); ?> </small> </a> </li> <?php } ?> </ul> <?php } ?>
"> <?php if (isLandscape()) { printCustomAlbumThumbImage(getBareAlbumTitle(), null, 160, 120, 160, 120); } else { printCustomAlbumThumbImage(getBareAlbumTitle(), null, 120, 160, 120, 160); } ?> </a> <span class="front-date"><?php printAlbumDate(); ?> </span> <p class="front-desc"> <?php echo html_encodeTagged(truncate_string(getAlbumDesc(), 175)); ?> <a href="<?php echo htmlspecialchars(getAlbumURL()); ?> " title="<?php echo gettext('View album:'); ?> <?php echo html_encode(getBareAlbumTitle()); ?> ">»</a> </p> </li> <?php $x = $x + 1;
</small></h5> <ul class="searchresults"> <?php while (next_news()) { $c++; ?> <li<?php printZDToggleClass('news', $c, $number_to_show); ?> > <h6><?php printNewsURL(); ?> </h6> <p class="zenpageexcerpt"><?php echo html_encodeTagged(shortenContent(strip_tags(getNewsContent()), 80, getOption("zenpage_textshorten_indicator"))); ?> </p> </li> <?php } ?> </ul> <hr /> <?php } ?> </div> <?php } ?>
/** * Prints the table part of a single page item for the sortable pages list * * @param object $page The array containing the single page * @param bool $flag set to true to flag the element as having a problem with nesting level */ function printItemsListTable($item, $flag) { global $_zp_gallery; $link = ''; $array = getItemTitleAndURL($item); if ($array['valid']) { switch ($item['type']) { case "album": $link = '<a href="../../admin-edit.php?page=edit&album=' . html_encode($item['link']) . '">' . html_encodeTagged(truncate_string($item['link'], 40, '...')) . '</a>'; break; case "page": $link = '<a href="../zenpage/admin-edit.php?page&titlelink=' . html_encode($item['link']) . '">' . html_encodeTagged(truncate_string($item['link'], 40, '...')) . '</a>'; break; case "category": $link = '<a href="../zenpage/admin-edit.php?newscategory&titlelink=' . html_encode($item['link']) . '">' . html_encodeTagged(truncate_string($item['link'], 40, '...')) . '</a>'; break; case 'customlink': $link = '<a href="' . html_encode($item['link']) . '">' . html_encodeTagged(truncate_string($item['link'], 40, '...')) . '</a>'; break; case 'menulabel': $link = ''; break; case 'html': $link = html_encode(truncate_string($item['link'], 40, '...')); break; default: $link = html_encodeTagged(truncate_string($item['link'], 40, '...')); break; } } else { if (array_key_exists('theme', $array)) { $link = '<span class="notebox">' . sprintf(gettext('Target does not exist in <em>%1$s</em> theme'), $array['theme']) . '</span>'; } else { $link = '<span class="notebox">' . gettext('Target does not exist'); } } ?> <div class="page-list_row"> <div class="page-list_title"> <?php printItemEditLink($item); ?> </div> <div class="page-list_extra"> <em><?php echo $item['type']; ?> </em> </div> <div class="page-list_extra"> <?php echo $link; ?> </div> <div class="page-list_iconwrapper"> <div class="page-list_icon"> <?php if ($array['protected']) { ?> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/lock_2.png" alt="<?php echo gettext("The object of this menu is under password protection"); ?> " title="<?php echo gettext("The object of this menu is under password protection"); ?> " style="border: 0px;" /> <?php } else { ?> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/place_holder_icon.png" alt="<?php echo gettext("under password protection"); ?> " style="border: 0px;" /> <?php } ?> </div> <div class="page-list_icon"> <?php if ($item['show'] === '1') { ?> <a href="menu_tab.php?publish&id=<?php echo $item['id'] . "&show=0&menuset=" . html_encode($item['menuset']); ?> &add&XSRFToken=<?php echo getXSRFToken('update_menu'); ?> " title="<?php echo gettext('hide'); ?> " > <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/pass.png" alt="<?php echo gettext('hide'); ?> " style="border: 0px;" /> </a> <?php } else { ?> <a href="menu_tab.php?publish&id=<?php echo $item['id'] . "&show=1&menuset=" . html_encode($item['menuset']); ?> &add&XSRFToken=<?php echo getXSRFToken('update_menu'); ?> " title="<?php echo gettext('show'); ?> "> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/action.png" alt="<?php echo gettext('show'); ?> " style="border: 0px;" /> </a> <?php } ?> </div> <div class="page-list_icon"> <?php switch ($item['type']) { default: if (!empty($array['url'])) { ?> <a href="<?php echo $array['url']; ?> "> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/view.png" alt="<?php echo gettext('view'); ?> " title="<?php echo gettext('view'); ?> " style="border: 0px;" /> </a> <?php break; } case 'menulabel': case 'menufunction': case 'html': ?> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/icon_inactive.png" alt="" style="border: 0px;" /> <?php break; } ?> </div> <div class="page-list_icon"> <a href="javascript:deleteMenuItem('<?php echo $item['id']; ?> ','<?php printf(gettext('Ok to delete %s? This cannot be undone.'), html_encode($array['name'])); ?> ');" > <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/fail.png" alt="<?php echo gettext('delete'); ?> " title="<?php echo gettext('delete'); ?> " style="border: 0px;" /> </a> </div> <div class="page-list_icon"> <input class="checkbox" type="checkbox" name="ids[]" value="<?php echo html_encode($item['id']); ?> " onclick="triggerAllBox(this.form, 'ids[]', this.form.allbox);" /> </div> </div> </div> <?php }