Example #1
0
 /**
  * Gets the feed item data in a Zenpage news feed
  *
  * @param array $item Titlelink a Zenpage article or filename of an image if a combined feed
  * @return array
  */
 protected function getItemNews($item)
 {
     $categories = '';
     $feeditem['enclosure'] = '';
     $obj = newArticle($item['titlelink']);
     $title = $feeditem['title'] = get_language_string($obj->getTitle('all'), $this->locale);
     $link = $obj->getLink();
     $count2 = 0;
     $plaincategories = $obj->getCategories();
     $categories = '';
     foreach ($plaincategories as $cat) {
         $catobj = newCategory($cat['titlelink']);
         $categories .= get_language_string($catobj->getTitle('all'), $this->locale) . ', ';
     }
     $categories = rtrim($categories, ', ');
     $feeditem['desc'] = shortenContent($obj->getContent($this->locale), getOption('RSS_truncate_length'), '...');
     if (!empty($categories)) {
         $feeditem['category'] = html_encode($categories);
         $feeditem['title'] = $title . ' (' . $categories . ')';
     }
     $feeditem['link'] = PROTOCOL . '://' . $this->host . $link;
     $feeditem['media_content'] = '';
     $feeditem['media_thumbnail'] = '';
     $feeditem['pubdate'] = date("r", strtotime($item['date']));
     return $feeditem;
 }
/**
 * Prints a context sensitive menu of all pages as a unordered html list
 *
 * @param string $option The mode for the menu:
 * 												"list" context sensitive toplevel plus sublevel pages,
 * 												"list-top" only top level pages,
 * 												"omit-top" only sub level pages
 * 												"list-sub" lists only the current pages direct offspring
 * @param string $mode 'pages' or 'categories'
 * @param bool $counter Only $mode = 'categories': Count the articles in each category
 * @param string $css_id CSS id of the top level list
 * @param string $css_class_topactive class of the active item in the top level list
 * @param string $css_class CSS class of the sub level list(s)
 * @param string $$css_class_active CSS class of the sub level list(s)
 * @param string $indexname insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" (default) if you don't use it, it is not printed then.
 * @param int $showsubs Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list".
 * @param bool $startlist set to true to output the UL tab (false automatically if you use 'omit-top' or 'list-sub')
 * @param int $limit truncation limit display strings
 * @return string
 */
function printNestedMenu($option = 'list', $mode = NULL, $counter = TRUE, $css_id = NULL, $css_class_topactive = NULL, $css_class = NULL, $css_class_active = NULL, $indexname = NULL, $showsubs = 0, $startlist = true, $limit = NULL)
{
    global $_zp_zenpage, $_zp_gallery_page, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_category;
    if (is_null($limit)) {
        $limit = MENU_TRUNCATE_STRING;
    }
    if ($css_id != "") {
        $css_id = " id='" . $css_id . "'";
    }
    if ($css_class_topactive != "") {
        $css_class_topactive = " class='" . $css_class_topactive . "'";
    }
    if ($css_class != "") {
        $css_class = " class='" . $css_class . "'";
    }
    if ($css_class_active != "") {
        $css_class_active = " class='" . $css_class_active . "'";
    }
    if ($showsubs === true) {
        $showsubs = 9999999999.0;
    }
    switch ($mode) {
        case 'pages':
            $items = $_zp_zenpage->getPages();
            $currentitem_id = getPageID();
            if (is_object($_zp_current_zenpage_page)) {
                $currentitem_parentid = $_zp_current_zenpage_page->getParentID();
            } else {
                $currentitem_parentid = NULL;
            }
            $currentitem_sortorder = getPageSortorder();
            break;
        case 'categories':
        case 'allcategories':
            $items = $_zp_zenpage->getAllCategories();
            if (is_object($_zp_current_category) && $mode == 'categories') {
                $currentitem_sortorder = $_zp_current_category->getSortOrder();
                $currentitem_id = $_zp_current_category->getID();
                $currentitem_parentid = $_zp_current_category->getParentID();
            } else {
                $currentitem_sortorder = NULL;
                $currentitem_id = NULL;
                $currentitem_parentid = NULL;
            }
            break;
    }
    // don't highlight current pages or foldout if in search mode as next_page() sets page context
    if (in_context(ZP_SEARCH) && $mode == 'pages') {
        // categories are not searched
        $css_class_topactive = "";
        $css_class_active = "";
        rem_context(ZP_ZENPAGE_PAGE);
    }
    if (0 == count($items) + (int) ($mode == 'allcategories')) {
        return;
    }
    // nothing to do
    $startlist = $startlist && !($option == 'omit-top' || $option == 'list-sub');
    if ($startlist) {
        echo "<ul{$css_id}>";
    }
    // if index link and if if with count
    if (!empty($indexname)) {
        if ($limit) {
            $display = shortenContent($indexname, $limit, MENU_TRUNCATE_INDICATOR);
        } else {
            $display = $indexname;
        }
        switch ($mode) {
            case 'pages':
                if ($_zp_gallery_page == "index.php") {
                    echo "<li {$css_class_topactive}>" . html_encode($display) . "</li>";
                } else {
                    echo "<li><a href='" . html_encode(getGalleryIndexURL()) . "' title='" . html_encode($indexname) . "'>" . html_encode($display) . "</a></li>";
                }
                break;
            case 'categories':
            case 'allcategories':
                if ($_zp_gallery_page == "news.php" && !is_NewsCategory() && !is_NewsArchive() && !is_NewsArticle()) {
                    echo "<li {$css_class_topactive}>" . html_encode($display);
                } else {
                    echo "<li><a href=\"" . html_encode(getNewsIndexURL()) . "\" title=\"" . html_encode($indexname) . "\">" . html_encode($display) . "</a>";
                }
                if ($counter) {
                    if (in_context(ZP_ZENPAGE_NEWS_CATEGORY) && $mode == 'categories') {
                        $totalcount = count($_zp_current_category->getArticles(0));
                    } else {
                        save_context();
                        rem_context(ZP_ZENPAGE_NEWS_DATE);
                        $totalcount = count($_zp_zenpage->getArticles(0));
                        restore_context();
                    }
                    echo ' <span style="white-space:nowrap;"><small>(' . sprintf(ngettext('%u article', '%u articles', $totalcount), $totalcount) . ')</small></span>';
                }
                echo "</li>\n";
                break;
        }
    }
    $baseindent = max(1, count(explode("-", $currentitem_sortorder)));
    $indent = 1;
    $open = array($indent => 0);
    $parents = array(NULL);
    $order = explode('-', $currentitem_sortorder);
    $mylevel = count($order);
    $myparentsort = array_shift($order);
    for ($c = 0; $c <= $mylevel; $c++) {
        $parents[$c] = NULL;
    }
    foreach ($items as $item) {
        switch ($mode) {
            case 'pages':
                $catcount = 1;
                //	so page items all show.
                $pageobj = new ZenpagePage($item['titlelink']);
                $itemtitle = $pageobj->getTitle();
                $itemsortorder = $pageobj->getSortOrder();
                $itemid = $pageobj->getID();
                $itemparentid = $pageobj->getParentID();
                $itemtitlelink = $pageobj->getTitlelink();
                $itemurl = $pageobj->getLink();
                $count = '';
                break;
            case 'categories':
            case 'allcategories':
                $catobj = new ZenpageCategory($item['titlelink']);
                $itemtitle = $catobj->getTitle();
                $itemsortorder = $catobj->getSortOrder();
                $itemid = $catobj->getID();
                $itemparentid = $catobj->getParentID();
                $itemtitlelink = $catobj->getTitlelink();
                $itemurl = $catobj->getLink();
                $catcount = count($catobj->getArticles());
                if ($counter) {
                    $count = ' <span style="white-space:nowrap;"><small>(' . sprintf(ngettext('%u article', '%u articles', $catcount), $catcount) . ')</small></span>';
                } else {
                    $count = '';
                }
                break;
        }
        if ($catcount) {
            $level = max(1, count(explode('-', $itemsortorder)));
            $process = $level <= $showsubs && $option == "list" || ($option == 'list' || $option == 'list-top') && $level == 1 || ($option == 'list' || $option == 'omit-top' && $level > 1) && ($itemid == $currentitem_id || $itemparentid == $currentitem_id || $level < $mylevel && $level > 1 && strpos($itemsortorder, $myparentsort) === 0 || $level == $mylevel && $currentitem_parentid == $itemparentid) || $option == 'list-sub' && $itemparentid == $currentitem_id;
            if ($process) {
                if ($level > $indent) {
                    echo "\n" . str_pad("\t", $indent, "\t") . "<ul{$css_class}>\n";
                    $indent++;
                    $parents[$indent] = NULL;
                    $open[$indent] = 0;
                } else {
                    if ($level < $indent) {
                        $parents[$indent] = NULL;
                        while ($indent > $level) {
                            if ($open[$indent]) {
                                $open[$indent]--;
                                echo "</li>\n";
                            }
                            $indent--;
                            echo str_pad("\t", $indent, "\t") . "</ul>\n";
                        }
                    } else {
                        // level == indent, have not changed
                        if ($open[$indent]) {
                            // level = indent
                            echo str_pad("\t", $indent, "\t") . "</li>\n";
                            $open[$indent]--;
                        } else {
                            echo "\n";
                        }
                    }
                }
                if ($open[$indent]) {
                    // close an open LI if it exists
                    echo "</li>\n";
                    $open[$indent]--;
                }
                echo str_pad("\t", $indent - 1, "\t");
                $open[$indent]++;
                $parents[$indent] = $itemid;
                if ($level == 1) {
                    // top level
                    $class = $css_class_topactive;
                } else {
                    $class = $css_class_active;
                }
                if (!is_null($_zp_current_zenpage_page)) {
                    $gettitle = $_zp_current_zenpage_page->getTitle();
                    $getname = $_zp_current_zenpage_page->getTitlelink();
                } else {
                    if (!is_null($_zp_current_category)) {
                        $gettitle = $_zp_current_category->getTitle();
                        $getname = $_zp_current_category->getTitlelink();
                    } else {
                        $gettitle = '';
                        $getname = '';
                    }
                }
                $current = "";
                if ($itemtitlelink == $getname && !in_context(ZP_SEARCH)) {
                    switch ($mode) {
                        case 'pages':
                            if ($_zp_gallery_page == 'pages.php') {
                                $current = $class;
                            }
                            break;
                        case 'categories':
                        case 'allcategories':
                            if ($_zp_gallery_page == 'news.php') {
                                $current = $class;
                            }
                            break;
                    }
                }
                if ($limit) {
                    $itemtitle = shortenContent($itemtitle, $limit, MENU_TRUNCATE_INDICATOR);
                }
                echo "<li><a {$current} href=\"" . html_encode($itemurl) . "\" title=\"" . html_encode(getBare($itemtitle)) . "\">" . html_encode($itemtitle) . "</a>" . $count;
            }
        }
    }
    // cleanup any hanging list elements
    while ($indent > 1) {
        if ($open[$indent]) {
            echo "</li>\n";
            $open[$indent]--;
        }
        $indent--;
        echo str_pad("\t", $indent, "\t") . "</ul>";
    }
    if ($open[$indent]) {
        echo "</li>\n";
        $open[$indent]--;
    } else {
        echo "\n";
    }
    if ($startlist) {
        echo "</ul>\n";
    }
}
Example #3
0
</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 
}
?>
/**
 * Handles an album for printAlbumMenuList
 *
 * @param array $albums albums array
 * @param string $folder
 * @param string $option see printAlbumMenuList
 * @param string $showcount see printAlbumMenuList
 * @param int $showsubs see printAlbumMenuList
 * @param string $css_class see printAlbumMenuList
 * @param string $css_class_topactive see printAlbumMenuList
 * @param string $css_class_active see printAlbumMenuList
 * @param bool $firstimagelink If set to TRUE and if the album has images the link will point to page of the first image instead the album thumbnail page
 * @param bool $keeptopactive If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only)
 * @param int $limit truncation of display text
 */
function printAlbumMenuListAlbum($albums, $folder, $option, $showcount, $showsubs, $css_class, $css_class_topactive, $css_class_active, $firstimagelink, $keeptopactive, $limit = NULL)
{
    global $_zp_gallery, $_zp_current_album, $_zp_current_search, $_recursion_limiter;
    if (is_null($limit)) {
        $limit = MENU_TRUNCATE_STRING;
    }
    if (is_null($showcount)) {
        $showcount = ALBUM_MENU_COUNT;
    }
    if (is_null($showsubs)) {
        $showsubs = ALBUM_MENU_SHOWSUBS;
    }
    if ($showsubs && !is_numeric($showsubs)) {
        $showsubs = 9999999999.0;
    }
    $pagelevel = count(explode('/', $folder));
    $currenturalbumname = "";
    foreach ($albums as $album) {
        $level = count(explode('/', $album));
        $process = $level < $showsubs && $option == "list" || $option != 'list-top' && strpos($folder, $album) === 0 && $level <= $pagelevel;
        if ($process && hasDynamicAlbumSuffix($album) && !is_dir(ALBUM_FOLDER_SERVERPATH . $album)) {
            if (in_array($album, $_recursion_limiter)) {
                $process = false;
            }
            // skip already seen dynamic albums
        }
        $topalbum = newAlbum($album, true);
        if ($level > 1 || $option != 'omit-top') {
            // listing current level album
            if ($level == 1) {
                $css_class_t = $css_class_topactive;
            } else {
                $css_class_t = $css_class_active;
            }
            if ($keeptopactive) {
                if (isset($_zp_current_album) && is_object($_zp_current_album)) {
                    $currenturalbum = getUrAlbum($_zp_current_album);
                    $currenturalbumname = $currenturalbum->name;
                }
            }
            $count = "";
            if ($showcount) {
                $toplevelsubalbums = $topalbum->getAlbums();
                $toplevelsubalbums = count($toplevelsubalbums);
                $topalbumnumimages = $topalbum->getNumImages();
                if ($topalbumnumimages + $toplevelsubalbums > 0) {
                    $count = ' <span style="white-space:nowrap;"><small>(';
                    if ($toplevelsubalbums > 0) {
                        $count .= sprintf(ngettext('%u album', '%u albums', $toplevelsubalbums), $toplevelsubalbums);
                    }
                    if ($topalbumnumimages > 0) {
                        if ($toplevelsubalbums) {
                            $count .= ' ';
                        }
                        $count .= sprintf(ngettext('%u image', '%u images', $topalbumnumimages), $topalbumnumimages);
                    }
                    $count .= ')</small></span>';
                }
            }
            if (in_context(ZP_ALBUM) && !in_context(ZP_SEARCH_LINKED) && (@$_zp_current_album->getID() == $topalbum->getID() || $topalbum->name == $currenturalbumname) || in_context(ZP_SEARCH_LINKED) && ($a = $_zp_current_search->getDynamicAlbum()) && $a->name == $topalbum->name) {
                $current = $css_class_t . ' ';
            } else {
                $current = "";
            }
            $title = $topalbum->getTitle();
            if ($limit) {
                $display = shortenContent($title, $limit, MENU_TRUNCATE_INDICATOR);
            } else {
                $display = $title;
            }
            if ($firstimagelink && $topalbum->getNumImages() != 0) {
                $link = "<li><a " . $current . "href='" . html_encode($topalbum->getImage(0)->getLink()) . "' title='" . html_encode($title) . "'>" . html_encode($display) . "</a>" . $count;
            } else {
                $link = "<li><a " . $current . "href='" . html_encode($topalbum->getLink(1)) . "' title='" . html_encode($title) . "'>" . html_encode($display) . "</a>" . $count;
            }
            echo $link;
        }
        if ($process) {
            // listing subalbums
            $subalbums = $topalbum->getAlbums();
            if (!empty($subalbums)) {
                echo "\n<ul" . $css_class . ">\n";
                array_push($_recursion_limiter, $album);
                printAlbumMenuListAlbum($subalbums, $folder, $option, $showcount, $showsubs, $css_class, $css_class_topactive, $css_class_active, $firstimagelink, false, $limit);
                array_pop($_recursion_limiter);
                echo "\n</ul>\n";
            }
        }
        if ($option == 'list' || $option == 'list-top' || $level > 1) {
            // close the LI
            echo "\n</li>\n";
        }
    }
}
Example #5
0
</small></div>
					<ul class="searchresults news">
					<?php 
        while (next_news()) {
            $c++;
            ?>
						<li<?php 
            printZDToggleClass('news', $c, $number_to_show);
            ?>
>
						<h4><?php 
            printNewsURL();
            ?>
</h4>
							<p class="zenpageexcerpt"><?php 
            echo shortenContent(strip_tags(getNewsContent()), 80, getOption("zenpage_textshorten_indicator"));
            ?>
</p>
						</li>
						<?php 
        }
        ?>
					</ul>
				<?php 
    }
}
?>
			<h3 class="searchheader imgresults">
			<?php 
$alb = 'album';
$imgs = 'image';
Example #6
0
function exerpt($content, $length)
{
    return shortenContent(getBare($content), $length, getOption("zenpage_textshorten_indicator"));
}
Example #7
0
 /**
  * Gets the feed item data in a Zenpage news feed
  *
  * @param array $item Titlelink a Zenpage article or filename of an image if a combined feed
  * @return array
  */
 protected function getItemNews($item)
 {
     $categories = '';
     $feeditem['enclosure'] = '';
     $obj = new ZenpageNews($item['titlelink']);
     $title = $feeditem['title'] = get_language_string($obj->getTitle('all'), $this->locale);
     $link = $obj->getLink();
     $count2 = 0;
     $plaincategories = $obj->getCategories();
     $categories = '';
     foreach ($plaincategories as $cat) {
         $catobj = new ZenpageCategory($cat['titlelink']);
         $categories .= get_language_string($catobj->getTitle('all'), $this->locale) . ', ';
     }
     $categories = rtrim($categories, ', ');
     $desc = $obj->getContent($this->locale);
     $desc = str_replace('//<![CDATA[', '', $desc);
     $desc = str_replace('//]]>', '', $desc);
     $feeditem['desc'] = shortenContent($desc, getOption('externalFeed_truncate_length'), '...');
     if (!empty($categories)) {
         $feeditem['category'] = html_encode($categories);
         $feeditem['title'] = $title . ' (' . $categories . ')';
     }
     $feeditem['link'] = $link;
     $feeditem['media_content'] = '';
     $feeditem['media_thumbnail'] = '';
     $feeditem['pubdate'] = date("r", strtotime($obj->getDateTime()));
     return $feeditem;
 }
Example #8
0
/**
 * 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, $_zp_current_zenpage_page, $_zp_current_zenpage_news;
    $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 = new ZenpageNews($item['name']);
                    $url = $obj->getLink();
                    $text = $obj->getContent();
                    $category = gettext('News');
                    break;
                case 'pages':
                    $obj = new ZenpagePage($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) {
                switch ($item['type']) {
                    case 'albums':
                    case 'images':
                        $d = $obj->getDateTime();
                        break;
                    case 'news':
                    case 'pages':
                        $d = $obj->getDateTime();
                        break;
                }
                ?>
							<span class="relateditems_date">
								<?php 
                echo zpFormattedDate(DATE_FORMAT, strtotime($d));
                ?>
							</span>
							<?php 
            }
            ?>
						<?php 
            if ($type == 'all') {
                ?>
 (<small><?php 
                echo $category;
                ?>
</small>)<?php 
            }
            ?>

					</h4>
					<?php 
            if ($excerpt) {
                echo shortenContent($text, $excerpt, '...', true);
            }
            ?>
				</li>
				<?php 
            if ($count == $number) {
                break;
            }
        }
        // foreach
        if ($count) {
            ?>
			</ul>
			<?php 
        }
    }
}
Example #9
0
        ?>
		<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 image statistic according to $option as an unordered HTML list
 * A css id is attached by default named accordingly'$option'
 *
 * @param string $number the number of albums to get
 * @param string $option "popular" for the most popular images,
 *                       "latest" for the latest uploaded,
 *                       "latest-date" for the latest uploaded, but fetched by date,
 * 											 "latest-mtime" for the latest uploaded, but fetched by mtime,
 *                       "mostrated" for the most voted,
 *                       "toprated" for the best voted
 * @param string $albumfolder foldername of an specific album
 * @param bool $showtitle if the image title should be shown
 * @param bool $showdate if the image date should be shown
 * @param bool $showdesc if the image description should be shown
 * @param integer $desclength the length of the description to be shown
 * @param string $showstatistic "hitcounter" for showing the hitcounter (views),
 * 															"rating" for rating,
 * 															"rating+hitcounter" for both.
 * @param integer $width the width/cropwidth of the thumb if crop=true else $width is longest size. (Default 85px)
 * @param integer $height the height/cropheight of the thumb if crop=true else not used.  (Default 85px)
 * @param bool $crop 'true' (default) if the thumb should be cropped, 'false' if not
 * @param bool $collection only if $albumfolder is set: true if you want to get statistics from this album and all of its subalbums
 *
 * @return string
 */
function printImageStatistic($number, $option, $albumfolder = '', $showtitle = false, $showdate = false, $showdesc = false, $desclength = 40, $showstatistic = '', $width = 85, $height = 85, $crop = true, $collection = false)
{
    $images = getImageStatistic($number, $option, $albumfolder, $collection);
    echo "\n<div id=\"{$option}\">\n";
    echo "<ul>";
    foreach ($images as $image) {
        echo "<li><a href=\"" . html_encode($image->getImageLink()) . "\" title=\"" . html_encode($image->getTitle()) . "\">\n";
        if ($crop) {
            echo "<img src=\"" . html_encode($image->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, TRUE)) . "\" alt=\"" . html_encode($image->getTitle()) . "\" /></a>\n";
        } else {
            echo "<img src=\"" . html_encode($image->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE)) . "\" alt=\"" . html_encode($image->getTitle()) . "\" /></a>\n";
        }
        if ($showtitle) {
            echo "<h3><a href=\"" . html_encode($image->getImageLink()) . "\" 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 shortenContent($image->getDesc(), $desclength, ' (...)');
        }
        echo "</li>";
    }
    echo "</ul></div>\n";
}
Example #11
0
</h1>
					<?php 
}
?>
				</div>
			</div>
			
			<div id="home-bar">
				<div id="gal-desc-wrap">
					<?php 
if (getGalleryDesc()) {
    ?>
					<div id="gal-desc">
						<div class="inner pad">
							<div><?php 
    echo shortenContent(getGalleryDesc(), 400, '...');
    ?>
</div>
						</div>
					</div>
					<?php 
}
?>
					<div class="inner pad">
						<div id="cbp-bicontrols" class="cbp-bicontrols">	
							<span class="cbp-biprev"></span>
							<span class="cbp-bipause"></span>
							<span class="cbp-binext"></span>
						</div>
					</div>
				</div>
Example #12
0
        }
    }
    if ($numnews > 0) {
        while (next_news()) {
            ?>
						<div class="one-half column">
							<div class="news-clip">
								<div class="bold-header"><?php 
            printNewsURL();
            ?>
 <small><em><i title="<?php 
            echo gettext('News Result');
            ?>
" class="fa fa-newspaper-o fa-fw"></i></em></small></div>
								<div class="search-excerpt"><?php 
            echo shortenContent(strip_tags(getNewsContent()), 200, getOption('zenpage_textshorten_indicator'));
            ?>
</div>
							</div>
						</div>
					<?php 
            $c++;
            if ($c == 2) {
                echo '</div><div class="row">';
                $c = 0;
            }
        }
    }
    ?>
					</div>
					<?php 
Example #13
0
		<?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, '(...)'));
            ?>
 &rarr; </a>
				</li>
		<?php 
        }
        ?>
		</ul>
			<?php 
    }
    ?>

	<div class="row">
		<div class="span9">
			<?php 
    include 'inc_print_news.php';
Example #14
0
<?php

include 'inc-header.php';
?>

		<div id="page-header" class="wrap" style="background-image: linear-gradient(rgba(0, 0, 0, 0.75),rgba(0, 0, 0, 0.75)), url(<?php 
echo $bg;
?>
);">
			<div class="inner">
				<h1><?php 
printAlbumTitle();
?>
</h1>
				<div class="desc"><?php 
echo shortenContent(getAlbumDesc(), 300, '...');
?>
</div>
			</div>
		</div>
		<a id="view"></a>
		
		<div class="bar">
			<div class="inner">
				<?php 
echo $quickmenu;
?>
				<div class="pad" id="breadcrumb">
					<a href="<?php 
echo getGalleryIndexURL();
?>
Example #15
0
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";
}
Example #16
0
function printNews()
{
    ?>
	<div class="box overview-utility">
		<h2 class="h2_bordered"><?php 
    echo gettext("News from Zenphoto.org");
    ?>
</h2>
		<?php 
    if (is_connected()) {
        require_once dirname(__FILE__) . '/zenphoto_news/rsslib.php';
        require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
        $recents = RSS_Retrieve("http://www.zenphoto.org/index.php?rss=news&withimages");
        if ($recents) {
            $opened = false;
            $recents = array_slice($recents, 1, 5);
            $shorten = getOption('zenphoto_news_length');
            foreach ($recents as $article) {
                $type = $article["type"];
                if ($type == 0) {
                    if ($opened) {
                        ?>
						</ul>
						<?php 
                        $opened = false;
                    }
                    ?>
					<b />
					<?php 
                } else {
                    if (!$opened) {
                        ?>
						<ul>
							<?php 
                        $opened = true;
                    }
                }
                $title = $article["title"];
                $date = zpFormattedDate(DATE_FORMAT, strtotime($article["pubDate"]));
                $link = $article["link"];
                if ($shorten) {
                    $description = shortenContent($article["description"], $shorten, '...');
                } else {
                    $description = false;
                }
                ?>
					<li><a href="<?php 
                echo $link;
                ?>
"><strong><?php 
                echo $title;
                ?>
</strong> (<?php 
                echo $date;
                ?>
)</a>
						<?php 
                if ($description != false) {
                    ?>
							<br />
							<?php 
                    echo $description;
                }
                ?>
					</li>
					<?php 
                if ($type == 0) {
                    ?>
						<br />
						<?php 
                }
            }
            if ($opened) {
                ?>
				</ul>
				<?php 
            }
        } else {
            ?>
			<ul>
				<li><?php 
            printf(gettext('Failed to retrieve link <em>%s</em>'), 'http://www.zenphoto.org/index.php?rss=news&withimages');
            ?>
</li>
			</ul>
			<?php 
        }
    } else {
        ?>
		<ul>
			<li><?php 
        echo gettext('A connection to <em>Zenphoto.org</em> could not be established.');
        ?>
			</li>
		</ul>
		<?php 
    }
    ?>
	</div>
	<?php 
}
Example #17
0
										<a href="<?php 
            echo html_encode(jqm_getLink());
            ?>
" title="<?php 
            printBareNewsTitle();
            ?>
">
									<?php 
            printNewsTitle();
            ?>
 <small>(<?php 
            printNewsDate();
            ?>
)</small>
											<div class="albumdesc"><?php 
            echo 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">
Example #18
0
    echo '&larr; ' . $linklabel . ': ' . shortenContent($albumnav->getTitle(), 30, '...');
    ?>
</a>
				<?php 
}
?>
			</div>
			<div id="navbar-next">
				<?php 
$albumnav = getNextAlbum();
if (!is_null($albumnav)) {
    ?>
				<a class="button" href="<?php 
    echo getNextAlbumURL();
    ?>
" title="<?php 
    echo html_encode($albumnav->getTitle());
    ?>
"><?php 
    echo $linklabel . ': ' . shortenContent($albumnav->getTitle(), 30, '...') . ' &rarr;';
    ?>
</a>
				<?php 
}
?>
			</div>
		</div>
	</div>			
			
<?php 
include "footer.php";
Example #19
0
							<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 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());
Example #20
0
    } else {
        echo gettext('No unpublished articles');
    }
    ?>
					</fieldset>
					<?php 
    $visible = $report == 'pages';
    $items = $_zp_CMS->getPages(false);
    $output = '';
    $c = 0;
    foreach ($items as $key => $item) {
        $itemobj = newPage($item['titlelink']);
        if (!$itemobj->getShow()) {
            $c++;
            $output .= '<li><label><input type="checkbox" name="' . $item['titlelink'] . '" value="' . $item['titlelink'] . '" class="catcheck" />' . $itemobj->getTitle() . '</label>';
            if ($desc = shortenContent($itemobj->getContent(), 50, '...')) {
                $output .= ' "' . strip_tags($desc) . '"';
            }
            $output .= ' <a href="' . html_encode($itemobj->getLink()) . '" title="' . html_encode($itemobj->getTitle()) . '">(' . gettext('View') . ')</a> <a href="' . WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/zenpage/admin-edit.php?newscategory&titlelink=' . html_encode($itemobj->getTitlelink()) . '" title="' . html_encode($itemobj->getTitle()) . '">(' . gettext('Edit') . ')</a></li>';
        }
    }
    ?>
					<br class="clearall" />
					<fieldset class="smallbox">
						<legend><?php 
    if ($c > 0) {
        reveal('pagebox', $visible);
    }
    echo gettext('Pages not published');
    ?>
</legend>
Example #21
0
 /**
  * Gets the feed item data in a Zenpage news feed
  *
  * @param array $item Titlelink a Zenpage article or filename of an image if a combined feed
  * @return array
  */
 protected function getitemPages($item, $len)
 {
     $obj = newPage($item['titlelink']);
     $feeditem['title'] = $feeditem['title'] = get_language_string($obj->getTitle('all'), $this->locale);
     $feeditem['link'] = $obj->getLink();
     $desc = $obj->getContent($this->locale);
     $desc = str_replace('//<![CDATA[', '', $desc);
     $desc = str_replace('//]]>', '', $desc);
     $feeditem['desc'] = shortenContent($desc, $len, '...');
     $feeditem['enclosure'] = '';
     $feeditem['category'] = '';
     $feeditem['media_content'] = '';
     $feeditem['media_thumbnail'] = '';
     $feeditem['pubdate'] = date("r", strtotime($obj->getPublishDate()));
     return $feeditem;
 }
Example #22
0
/**
 * Gets the title, url and name of a menu item
 *
 * @return array
 */
function getItemTitleAndURL($item)
{
    global $_zp_gallery;
    $themename = $_zp_gallery->getCurrentTheme();
    $array = array();
    $valid = true;
    $title = get_language_string($item['title']);
    switch ($item['type']) {
        case "galleryindex":
            $array = array("title" => get_language_string($item['title']), "url" => WEBPATH, "name" => WEBPATH, 'protected' => false, 'theme' => $themename);
            break;
        case "album":
            $folderFS = internalToFilesystem($item['link']);
            $localpath = ALBUM_FOLDER_SERVERPATH . $folderFS;
            $dynamic = hasDynamicAlbumSuffix($folderFS) && !is_dir($folderFS);
            $valid = file_exists($localpath) && ($dynamic || is_dir($localpath));
            if (!$valid || strpos($localpath, '..') !== false) {
                $valid = false;
                $url = '';
                $protected = 0;
            } else {
                $obj = newAlbum($item['link']);
                $url = $obj->getLink(0);
                $protected = $obj->isProtected();
                $title = $obj->getTitle();
            }
            $array = array("title" => $title, "url" => $url, "name" => $item['link'], 'protected' => $protected, 'theme' => $themename);
            break;
        case "page":
            $sql = 'SELECT * FROM ' . prefix('pages') . ' WHERE `titlelink`="' . $item['link'] . '"';
            $result = query_single_row($sql);
            if (is_array($result) && extensionEnabled('zenpage')) {
                $obj = newPage($item['link']);
                $url = $obj->getLink(0);
                $protected = $obj->isProtected();
                $title = $obj->getTitle();
            } else {
                $valid = false;
                $url = '';
                $protected = 0;
            }
            $array = array("title" => $title, "url" => $url, "name" => $item['link'], 'protected' => $protected);
            break;
        case "newsindex":
            if ($valid = extensionEnabled('zenpage')) {
                $url = getNewsIndexURL();
            } else {
                $url = '';
            }
            $array = array("title" => get_language_string($item['title']), "url" => $url, "name" => $url, 'protected' => false);
            break;
        case "category":
            $valid = extensionEnabled('zenpage');
            $sql = "SELECT title FROM " . prefix('news_categories') . " WHERE titlelink = '" . $item['link'] . "'";
            $obj = query_single_row($sql, false);
            if ($obj && $valid) {
                $obj = newCategory($item['link']);
                $title = $obj->getTitle();
                $protected = $obj->isProtected();
                $url = $obj->getLink(0);
            } else {
                $valid = false;
                $url = '';
                $protected = 0;
            }
            $array = array("title" => $title, "url" => $url, "name" => $item['link'], 'protected' => $protected);
            break;
        case "custompage":
            $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/';
            if (file_exists($root . $item['link'] . '.php')) {
                $url = zp_apply_filter('getLink', rewrite_path(_PAGE_ . '/' . $item['link'], "/index.php?p=" . $item['link']), $item['link'] . '.php', NULL);
            } else {
                $valid = false;
                $url = '';
            }
            $array = array("title" => $title, "url" => $url, "name" => $item['link'], 'protected' => false, 'theme' => $themename);
            break;
        case "customlink":
            $array = array("title" => get_language_string($item['title']), "url" => $item['link'], "name" => $item['link'], 'protected' => false, 'theme' => $themename);
            break;
        case 'menulabel':
            $array = array("title" => get_language_string($item['title']), "url" => NULL, 'name' => $item['title'], 'protected' => false, 'theme' => $themename);
            break;
        default:
            $array = array("title" => get_language_string($item['title']), "url" => $item['link'], "name" => $item['link'], 'protected' => false, 'theme' => $themename);
            break;
    }
    $limit = MENU_TRUNCATE_STRING;
    $array['valid'] = $valid;
    if ($limit) {
        $array['title'] = shortenContent($array['title'], $limit, MENU_TRUNCATE_INDICATOR);
    }
    return $array;
}
Example #23
0
">
					<?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 shortenContent(getAlbumDesc(), 175, '...');
        ?>
					<a href="<?php 
        echo htmlspecialchars(getAlbumURL());
        ?>
" title="<?php 
        echo gettext('View SubAlbum:');
        ?>
 <?php 
        echo getBareAlbumTitle();
        ?>
">&raquo;</a>
				</p>
			</li>
			<?php 
        $x = $x + 1;
Example #24
0
    ?>
					</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>
Example #25
0
        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 
}
?>
Example #26
0
        break;
    case 'register.php':
        $zpfocus_metatitle = gettext('Register') . ' | ' . getBareGalleryTitle();
        $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
        break;
    case 'password.php':
        $zpfocus_metatitle = gettext('Password Required') . ' | ' . getBareGalleryTitle();
        $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
        break;
    case '404.php':
        $zpfocus_metatitle = gettext('404 Not Found...') . ' | ' . getBareGalleryTitle();
        $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
        break;
    default:
        $zpfocus_metatitle = getBareGalleryTitle();
        $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
        break;
}
// Finish out header RSS links for inc-header.php
if (getOption('RSS_items')) {
    printRSSHeaderLink('Gallery', gettext('Latest Images')) . "\n";
}
if (getOption('RSS_items_albums')) {
    printRSSHeaderLink('AlbumsRSS', gettext('Latest Albums')) . "\n";
}
if ($zenpage) {
    if (getOption('RSS_zenpage_items')) {
        printRSSHeaderLink('News', '', gettext('Latest News')) . "\n";
    }
    if (function_exists('printCommentForm')) {
        printRSSHeaderLink('Comments', '', gettext('Latest Comments')) . "\n";
Example #27
0
" title="<?php 
    echo gettext('View album:');
    ?>
">
									<?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 shortenContent(getAlbumDesc(), 100, '(...)', false);
    ?>
</div>
									<small class="ui-li-aside ui-li-count"><?php 
    jqm_printImageAlbumCount();
    ?>
</small>
								</a>
							</li>
			<?php 
}
?>
		</ul>
		<div class="ui-grid-c">
			<?php 
$count = '';
Example #28
0
					<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());
Example #29
0
</small></h3>
							<ul class="searchresults">
								<?php 
        while (next_news()) {
            $c++;
            ?>
									<li<?php 
            printZDToggleClass('news', $c, $number_to_show);
            ?>
>
										<h4><?php 
            printNewsURL();
            ?>
</h4>
										<p class="zenpageexcerpt"><?php 
            echo shortenContent(getBare(getNewsContent()), 80, getOption("zenpage_textshorten_indicator"));
            ?>
</p>
									</li>
									<?php 
        }
        ?>
							</ul>
							<?php 
    }
}
?>
					<h3>
						<?php 
if (getOption('search_no_albums')) {
    if (!getOption('search_no_images') && $numpages + $numnews > 0) {
Example #30
0
										<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">