• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getBare函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getBare函数的典型用法代码示例。如果您正苦于以下问题:PHP getBare函数的具体用法?PHP getBare怎么用?PHP getBare使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getBare函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getOptionsSupported

 function getOptionsSupported()
 {
     global $personalities;
     if (!extensionEnabled('print_album_menu') && (($m = getOption('garland_menu')) == 'garland' || $m == 'zenpage' || $m == 'garland')) {
         $note = '<p class="notebox">' . sprintf(gettext('<strong>Note:</strong> The <em>%s</em> custom menu makes use of the <em>print_album_menu</em> plugin.'), $m) . '</p>';
     } else {
         $note = '';
     }
     $options = array(gettext('Theme personality') => array('key' => 'garland_personality', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $personalities, 'desc' => gettext('Select the theme personality')), gettext('Allow search') => array('key' => 'Allow_search', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable search form.')), gettext('Allow cloud') => array('key' => 'Allow_cloud', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable tag cloud for album page.')), gettext('Custom menu') => array('key' => 'garland_menu', 'type' => OPTION_TYPE_CUSTOM, 'desc' => gettext('Set this to the <em>menu_manager</em> menu you wish to use.') . $note));
     if (extensionEnabled('zenpage')) {
         global $_zp_CMS;
         $pages = $_zp_CMS->getPages(false);
         $list = array();
         foreach ($pages as $page) {
             $pageObj = newPage($page['titlelink']);
             if (!$pageObj->getShow()) {
                 $list[getBare(get_language_string($page['title']))] = $page['titlelink'];
             }
         }
         $options[gettext('Custom Homepage')] = array('key' => 'garland_customHome', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $list, 'null_selection' => gettext('none'), 'desc' => gettext('Select the <em>pages</em> titlelink for the home page. Only unpublished pages are offered for selection.'));
     }
     if (getOption('garland_personality') == 'image_gallery') {
         $options[gettext('Image gallery transition')] = array('key' => 'garland_transition', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('None') => '', gettext('Fade') => 'fade', gettext('Shrink/grow') => 'resize', gettext('Horizontal') => 'slide-hori', gettext('Vertical') => 'slide-vert'), 'order' => 10, 'desc' => gettext('Transition effect for Image gallery'));
         $options[gettext('Image gallery caption')] = array('key' => 'garland_caption_location', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('On image') => 'image', gettext('Separate') => 'separate', gettext('Omit') => 'none'), 'order' => 10.5, 'desc' => gettext('Location for Image gallery picture caption'));
     }
     return $options;
 }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:27,代码来源:themeoptions.php


示例2: gettext

                        $link = "<a href=\"" . $obj->getLink() . '#zp_comment_id_' . $id . '">' . gettext("[page]") . ' ' . $obj->getTitle() . "</a>";
                    }
                }
                break;
            default:
                // all the image types
                $obj = getItemByID('images', $comment['ownerid']);
                if ($obj) {
                    $link = "<a href=\"" . $obj->getLink() . '#zp_comment_id_' . $id . '">' . $obj->getTitle() . "</a>";
                }
                break;
        }
        $date = myts_date('%m/%d/%Y %I:%M %p', $comment['date']);
        $website = $comment['website'];
        $fullcomment = sanitize($comment['comment'], 2);
        $shortcomment = truncate_string(getBare($fullcomment), 123);
        $inmoderation = $comment['inmoderation'];
        $private = $comment['private'];
        $anon = $comment['anon'];
        ?>
				<tr class="newstr">
					<td><?php 
        echo $fulltext ? $fullcomment : $shortcomment;
        ?>
</td>
					<td><?php 
        echo date('Y-m-d H:i:s', strtotime($date));
        ?>
</td>
					<td>
						<?php 
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:admin-comments.php


示例3: explode

    $feeds = explode(';', $feeds);
    if (count($feeds) < 0) {
        exitZP();
    }
    // set the header type
    header("Content-type: text/xml");
    // set an arbitrary feed date
    $RSS_date = date("r", mktime(10, 0, 0, 9, 8, 2010));
    if (isset($_GET['lang'])) {
        $locale = sanitize($_GET['lang']);
    } else {
        $locale = getOption('locale');
    }
    $gallery = new Gallery();
    // Create new MergedRSS object with desired parameters
    $MergedRSS = new MergedRSS($feeds, getBare(get_language_string($gallery->getTitle(), $locale)), FULLWEBPATH, getBare(get_language_string($gallery->getDesc(), $locale)), $RSS_date);
    //Export the first 10 items to screen
    $mergedrss_feeditems = getOption('mergedrss_items');
    if (empty($mergedrss_feeditems)) {
        $mergedrss_feeditems = 10;
    }
    $MergedRSS->export(false, true, $mergedrss_feeditems);
    //getOption('RSS_items')
    exitZP();
}
class MergedRSSOptions
{
    function __construct()
    {
        if (OFFSET_PATH == 2) {
            setOptionDefault('mergedrss_items', 10);
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:mergedRSS.php


示例4: while

</small></h3>
							<ul data-role="listview" data-inset="true" data-theme="c" class="ui-listview ui-group-theme-a">
								<?php 
        while (next_news()) {
            $c++;
            ?>
									<li<?php 
            printZDToggleClass('news', $c, $number_to_show);
            ?>
>
										<h4><?php 
            printNewsURL();
            ?>
</h4>
										<p class="zenpageexcerpt"><?php 
            echo html_encodeTagged(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) {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:search.php


示例5: printSlideShowLink


//.........这里部分代码省略.........
								transition: '<?php 
                    echo getOption('slideshow_colorbox_transition');
                    ?>
',
								slideshowSpeed: <?php 
                    echo getOption('slideshow_speed');
                    ?>
,
								slideshowStart: '<?php 
                    echo gettext("start slideshow");
                    ?>
',
								slideshowStop: '<?php 
                    echo gettext("stop slideshow");
                    ?>
',
								previous: '<?php 
                    echo gettext("prev");
                    ?>
',
								next: '<?php 
                    echo gettext("next");
                    ?>
',
								close: '<?php 
                    echo gettext("close");
                    ?>
',
								current: '<?php 
                    printf(gettext('image %1$s of %2$s'), '{current}', '{total}');
                    ?>
',
								maxWidth: '98%',
								maxHeight: '98%',
								photo: true
							});
						});
					</script>
					<?php 
                    foreach ($images as $image) {
                        if (is_array($image)) {
                            $suffix = getSuffix($image['filename']);
                        } else {
                            $suffix = getSuffix($image);
                        }
                        $suffixes = array('jpg', 'jpeg', 'gif', 'png');
                        if (in_array($suffix, $suffixes)) {
                            $count++;
                            if (is_array($image)) {
                                $albobj = newAlbum($image['folder']);
                                $imgobj = newImage($albobj, $image['filename']);
                            } else {
                                $imgobj = newImage($_zp_current_album, $image);
                            }
                            if (in_context(ZP_SEARCH_LINKED) || $_zp_gallery_page != 'image.php') {
                                if ($count == 1) {
                                    $style = '';
                                } else {
                                    $style = ' style="display:none"';
                                }
                            } else {
                                if ($_zp_current_image->filename == $image) {
                                    $style = '';
                                } else {
                                    $style = ' style="display:none"';
                                }
                            }
                            switch (getOption('slideshow_colorbox_imagetype')) {
                                case 'fullimage':
                                    $imagelink = getFullImageURL($imgobj);
                                    break;
                                case 'sizedimage':
                                    $imagelink = $imgobj->getCustomImage(getOption("slideshow_width"), NULL, NULL, NULL, NULL, NULL, NULL, false, NULL);
                                    break;
                            }
                            $imagetitle = '';
                            if (getOption('slideshow_colorbox_imagetitle')) {
                                $imagetitle = html_encode(getBare($imgobj->getTitle()));
                            }
                            ?>
							<a href="<?php 
                            echo html_encode(pathurlencode($imagelink));
                            ?>
" rel="slideshow"<?php 
                            echo $style;
                            ?>
 title="<?php 
                            echo $imagetitle;
                            ?>
"><?php 
                            echo $linktext;
                            ?>
</a>
							<?php 
                        }
                    }
                }
                break;
        }
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:slideshow.php


示例6: debugLogVar

/**
 * Records a Var to the debug log
 *
 * @param string $message message to insert in log [optional]
 * @param mixed $var the variable to record
 * @param string $log alternative log file
 */
function debugLogVar($message)
{
    $args = func_get_args();
    if (count($args) == 1) {
        $var = $message;
        $message = '';
    } else {
        $message .= ' ';
        $var = $args[1];
    }
    if (count($args) == 3) {
        $log = $args[2];
    } else {
        $log = 'debug';
    }
    ob_start();
    var_dump($var);
    $str = ob_get_contents();
    ob_end_clean();
    debugLog(trim($message) . "\r" . html_decode(getBare($str)), false, $log);
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:28,代码来源:functions-common.php


示例7: __construct

 /**
  * Creates a feed object from the URL parameters fetched only
  *
  */
 function __construct($options = NULL)
 {
     global $_zp_gallery, $_zp_current_admin_obj, $_zp_loggedin;
     if (empty($options)) {
         self::feed404();
     }
     $this->feedtype = $options['external'];
     $this->key = @$options['accesskey'];
     parent::__construct($options);
     if ($this->key) {
         $result = query_single_row('SELECT * FROM ' . prefix('plugin_storage') . ' WHERE `type`="externalFeed" AND `data`=' . db_quote($this->key));
         if (!$result) {
             $this->key = NULL;
         }
     }
     if (!$this->key && $this->feedtype != 'site_closed') {
         self::feed404();
     }
     // general feed setup
     $channeltitlemode = getOption('externalFeed_title');
     $this->host = html_encode($_SERVER["HTTP_HOST"]);
     //channeltitle general
     switch ($channeltitlemode) {
         case 'gallery':
             $this->channel_title = $_zp_gallery->getBareTitle($this->locale);
             break;
         case 'website':
             $this->channel_title = getBare($_zp_gallery->getWebsiteTitle($this->locale));
             break;
         case 'both':
             $website_title = $_zp_gallery->getWebsiteTitle($this->locale);
             $this->channel_title = $_zp_gallery->getBareTitle($this->locale);
             if (!empty($website_title)) {
                 $this->channel_title = $website_title . ' - ' . $this->channel_title;
             }
             break;
     }
     // individual feedtype setup
     switch ($this->feedtype) {
         case 'gallery':
             if (!getOption('externalFeed_album_image')) {
                 self::feed404();
             }
             $albumname = $this->getChannelTitleExtra();
             if ($this->albumfolder) {
                 $alb = newAlbum($this->albumfolder, true, true);
                 if ($alb->exists) {
                     $albumtitle = $alb->getTitle();
                     if ($this->mode == 'albums' || $this->collection) {
                         $albumname = ' - ' . html_encode($albumtitle) . $this->getChannelTitleExtra();
                     }
                 } else {
                     self::feed404();
                 }
             } else {
                 $albumtitle = '';
             }
             $albumname = $this->getChannelTitleExtra();
             $this->channel_title = html_encode($this->channel_title . ' ' . getBare($albumname));
             $this->imagesize = $this->getImageSize();
             require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
             break;
         case 'news':
             //Zenpage News
             if (!getOption('externalFeed_articles')) {
                 self::feed404();
             }
             $titleappendix = gettext(' (Latest news)');
             switch ($this->sortorder) {
                 case 'popular':
                     $titleappendix = gettext(' (Most popular news)');
                     break;
                 case 'mostrated':
                     $titleappendix = gettext(' (Most rated news)');
                     break;
                 case 'toprated':
                     $titleappendix = gettext(' (Top rated news)');
                     break;
                 case 'random':
                     $titleappendix = gettext(' (Random news)');
                     break;
             }
             $this->channel_title = html_encode($this->channel_title . $this->cattitle . $titleappendix);
             $this->imagesize = $this->getImageSize();
             $this->itemnumber = getOption("externalFeed_zenpage_items");
             // # of Items displayed on the feed
             require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
             require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-template-functions.php';
             break;
         case 'pages':
             //Zenpage News
             if (!getOption('externalFeed_pages')) {
                 self::feed404();
             }
             switch ($this->sortorder) {
                 case 'popular':
//.........这里部分代码省略.........
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:101,代码来源:externalFeed.php


示例8: html_encode

										<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">
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:news.php


示例9: getHTMLMetaData

 /**
  * Prints html meta data to be used in the <head> section of a page
  *
  */
 static function getHTMLMetaData()
 {
     global $_zp_gallery, $_zp_page, $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_current_article, $_zp_current_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites;
     $host = sanitize("http://" . $_SERVER['HTTP_HOST']);
     $url = $host . getRequestURI();
     // Convert locale shorttag to allowed html meta format
     $locale_ = getUserLocale();
     $locale = zpFunctions::getLanguageText($locale_, '-');
     $canonicalurl = '';
     // generate page title, get date
     $pagetitle = "";
     // for gallery index setup below switch
     $date = strftime(DATE_FORMAT);
     // if we don't have a item date use current date
     $desc = getBareGalleryDesc();
     $thumb = '';
     if (getOption('htmlmeta_sitelogo')) {
         $thumb = getOption('htmlmeta_sitelogo');
     }
     if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
         $ogimage_width = getOption('htmlmeta_ogimage_width');
         $ogimage_height = getOption('htmlmeta_ogimage_height');
         if (empty($ogimage_width)) {
             $ogimage_width = 1280;
         }
         if (empty($ogimage_height)) {
             $ogimage_height = 900;
         }
         $twittercard_type = 'summary';
     }
     $type = 'article';
     switch ($_zp_gallery_page) {
         case 'index.php':
             $desc = getBareGalleryDesc();
             $canonicalurl = $host . $_zp_gallery->getLink($_zp_page);
             $type = 'website';
             break;
         case 'album.php':
         case 'favorites.php':
             $pagetitle = getBareAlbumTitle() . " - ";
             $date = getAlbumDate();
             $desc = getBareAlbumDesc();
             $canonicalurl = $host . $_zp_current_album->getLink($_zp_page);
             if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                 $thumbimg = $_zp_current_album->getAlbumThumbImage();
                 getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false);
                 $thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL)));
                 $twittercard_type = 'summary_large_image';
             }
             break;
         case 'image.php':
             $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
             $date = getImageDate();
             $desc = getBareImageDesc();
             $canonicalurl = $host . $_zp_current_image->getLink();
             if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                 $thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height)));
                 $twittercard_type = 'summary_large_image';
             }
             break;
         case 'news.php':
             if (function_exists("is_NewsArticle")) {
                 if (is_NewsArticle()) {
                     $pagetitle = getBareNewsTitle() . " - ";
                     $date = getNewsDate();
                     $desc = trim(getBare(getNewsContent()));
                     $canonicalurl = $host . $_zp_current_article->getLink();
                 } else {
                     if (is_NewsCategory()) {
                         $pagetitle = $_zp_current_category->getTitlelink() . " - ";
                         $date = strftime(DATE_FORMAT);
                         $desc = trim(getBare($_zp_current_category->getDesc()));
                         $canonicalurl = $host . $_zp_current_category->getLink($_zp_page);
                         $type = 'category';
                     } else {
                         $pagetitle = gettext('News') . " - ";
                         $desc = '';
                         $canonicalurl = $host . getNewsPathNav($_zp_page);
                         $type = 'website';
                     }
                 }
             }
             break;
         case 'pages.php':
             $pagetitle = getBarePageTitle() . " - ";
             $date = getPageDate();
             $desc = trim(getBare(getPageContent()));
             $canonicalurl = $host . $_zp_current_page->getLink();
             break;
         default:
             // for all other possible static custom pages
             $custompage = stripSuffix($_zp_gallery_page);
             $standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
             if (is_object($_myFavorites)) {
                 $standard['favorites'] = gettext('My favorites');
             }
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:html_meta_tags.php


示例10: substr

                        if (false !== ($i = stripos($option, chr(0)))) {
                            $option = substr($option, 0, $i);
                        }
                        if ($option) {
                            ?>
															<li><code><?php 
                            echo $option;
                            ?>
</code></li>
															<?php 
                        }
                    }
                }
            }
            foreach ($notes as $note) {
                $n = getBare($note['desc']);
                if (!empty($n)) {
                    ?>
													<li><code><?php 
                    echo $note['desc'];
                    ?>
</li>
													<?php 
                }
            }
            ?>
										</ul>
									</p>
									<?php 
        }
        if (!empty($buttonlist) || !empty($albumbuttons) || !empty($imagebuttons)) {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:pluginDoc.php


示例11: checkForEmptyTitle

/**
 * Checks if no title has been provide for items on new item creation
 * @param string $titlefield The title field
 * @param string $type 'page', 'news' or 'category'
 * @return string
 */
function checkForEmptyTitle($titlefield, $type, $truncate = true)
{
    switch ($type) {
        case "page":
            $text = gettext("Untitled page");
            break;
        case "news":
            $text = gettext("Untitled article");
            break;
        case "category":
            $text = gettext("Untitled category");
            break;
    }
    $title = getBare($titlefield);
    if ($title) {
        if ($truncate) {
            $title = truncate_string($title, 40);
        }
    } else {
        $title = "<span style='color:red; font-weight: bold'>" . $text . "</span>";
    }
    echo $title;
}
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:29,代码来源:zenpage-admin-functions.php


示例12: getLinkHTML

/**
 * @param string $url The link URL
 * @param string $text The text to go with the link
 * @param string $title Text for the title tag
 * @param string $class optional class
 * @param string $id optional id
 */
function getLinkHTML($url, $text, $title = NULL, $class = NULL, $id = NULL)
{
    return "<a href=\"" . html_encode($url) . "\"" . ($title ? " title=\"" . html_encode(getBare($title)) . "\"" : "") . ($class ? " class=\"{$class}\"" : "") . ($id ? " id=\"{$id}\"" : "") . ">" . html_encode($text) . "</a>";
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:11,代码来源:functions.php


示例13: getBareTitle

 /**
  * Returns a tag stripped title
  * @param string $locale
  * @return string
  */
 function getBareTitle($locale = NULL)
 {
     return getBare($this->getTitle($locale));
 }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:9,代码来源:class-gallery.php


示例14: composeStatus

 /**
  * Composes the tweet at 140 characters or less
  * @param string $link
  * @param string $title
  * @param string $text
  *
  * @return string
  */
 private static function composeStatus($link, $title, $text)
 {
     $text = trim(html_decode(getBare($text)));
     if ($title) {
         $title = trim(html_decode(getBare($title))) . ': ';
     }
     if (strlen($title . $text . ' ' . $link) > 140) {
         $c = 140 - strlen($link);
         if (mb_strlen($title) >= $c - 25) {
             //	not much point in the body if shorter than 25
             $text = truncate_string($title, $c - 4, '... ') . $link;
             //	allow for ellipsis
         } else {
             $c = $c - mb_strlen($title) - 5;
             $text = $title . truncate_string($text, $c, '... ') . $link;
         }
     } else {
         $text = $title . $text . ' ' . $link;
     }
     $error = self::sendTweet($text);
     if ($error) {
         $error = sprintf(gettext('Error tweeting <code>%1$s</code>: %2$s'), $text, $error);
     }
     return $error;
 }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:33,代码来源:tweet_news.php


示例15: printThumbs

 /**
  * Prints the thumbnails
  *
  */
 function printThumbs()
 {
     global $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_gallery;
     echo "<div id='pagedthumbsimages'>";
     $thumbs = $this->getThumbs();
     //$thcount = count($thumbs); echo "thcount:".$thcount;
     $number = 0;
     foreach ($thumbs as $image) {
         if ($image->getID() == $_zp_current_image->getID()) {
             $css = " id='pagedthumbsnav-active' ";
         } else {
             $css = "";
         }
         echo "<a {$css} href=\"" . html_encode($image->getLink()) . "\" title=\"" . html_encode(getBare($image->getTitle())) . "\">";
         if ($this->crop) {
             $html = "<img src='" . html_encode(pathurlencode($image->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true))) . "' alt=\"" . html_encode(getBare($image->getTitle())) . "\" width='" . $this->width . "' height='" . $this->height . "' />";
         } else {
             $maxwidth = $this->width;
             // needed because otherwise getMaxSpaceContainer will use the values of the first image for all others, too
             $maxheight = $this->height;
             getMaxSpaceContainer($maxwidth, $maxheight, $image, true);
             $html = "<img src=\"" . html_encode(pathurlencode($image->getCustomImage(NULL, $maxwidth, $maxheight, NULL, NULL, NULL, NULL, true))) . "\" alt=\"" . html_encode(getBare($image->getTitle())) . "\" />";
         }
         echo zp_apply_filter('custom_image_html', $html, true);
         echo "</a>\n";
         $number++;
     }
     if ($this->placeholders) {
         if ($number != $this->imagesperpage) {
             $placeholdernr = $this->imagesperpage - $number;
             for ($nr2 = 1; $nr2 <= $placeholdernr; $nr2++) {
                 echo "<span class=\"placeholder\" style=\"width:" . $this->width . "px;height:" . $this->height . "px\"></span>";
             }
         }
     }
     echo "</div>";
 }
开发者ID:andrewfandrew,项目名称:ferdinand-miranda,代码行数:41,代码来源:paged_thumbs_nav.php


示例16: getBareImageDesc

/**
 * Returns a text-only description of the current image.
 *
 * @return string
 */
function getBareImageDesc()
{
    return getBare(getImageDesc());
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:9,代码来源:template-functions.php


示例17: debug404

/**
 * produce debugging information on 404 errors
 * @param string $album
 * @param string $image
 * @param string $theme
 */
function debug404($album, $image, $theme)
{
    if (DEBUG_404) {
        $list = explode('/', $album);
        if (array_shift($list) == 'cache') {
            return;
        }
        $ignore = array('/favicon.ico', '/zp-data/tést.jpg');
        $target = getRequestURI();
        foreach ($ignore as $uri) {
            if ($target == $uri) {
                return;
            }
        }
        $server = array();
        foreach (array('REQUEST_URI', 'HTTP_REFERER', 'REMOTE_ADDR', 'REDIRECT_STATUS') as $key) {
            $server[$key] = @$_SERVER[$key];
        }
        $request = $_REQUEST;
        $request['theme'] = $theme;
        if (!empty($image)) {
            $request['image'] = $image;
        }
        trigger_error(sprintf(gettext('Zenphoto processed a 404 error on %s. See the debug log for details.'), $target), E_USER_NOTICE);
        ob_start();
        var_dump($server);
        $server = preg_replace('~array\\s*\\(.*\\)\\s*~', '', html_decode(getBare(ob_get_contents())));
        ob_end_clean();
        ob_start();
        var_dump($request);
        $request['theme'] = $theme;
        if (!empty($image)) {
            $request['image'] = $image;
        }
        $request = preg_replace('~array\\s*\\(.*\\)\\s*~', '', html_decode(getBare(ob_get_contents())));
        ob_end_clean();
        debugLog("404 error details\n" . $server . $request);
    }
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:45,代码来源:functions.php


示例18: printAllNestedList

/**
 * Prints all available pages or categories in Zenpage
 *
 * @return string
 */
function printAllNestedList()
{
    global $_zp_zenpage, $host;
    if (isset($_GET['zenpage']) && ($_GET['zenpage'] == "pages" || $_GET['zenpage'] == "categories")) {
        $mode = sanitize($_GET['zenpage']);
        switch ($mode) {
            case 'pages':
                $items = $_zp_zenpage->getPages(false);
                $listtitle = gettext('Pages');
                break;
            case 'categories':
                $items = $_zp_zenpage->getAllCategories(false);
                $listtitle = gettext('Categories');
                break;
        }
        echo "<h3>Zenpage: <em>" . html_encode($listtitle) . "</em> <small> " . gettext("(Click on article title to include a link)") . "</small></h3>";
        echo "<ul class='tinynesteditems'>";
        $indent = 1;
        $open = array(1 => 0);
        $rslt = false;
        foreach ($items as $key => $item) {
            switch ($mode) {
                case 'pages':
                    $obj = new ZenpagePage($item['titlelink']);
                    $itemcontent = truncate_string(getBare($obj->getContent()), 300);
                    $zenpagepage = _PAGES_ . '/' . $item['titlelink'];
                    $unpublished = unpublishedZenpageItemCheck($obj);
                    $counter = '';
                    break;
                case 'categories':
                    $obj = new ZenpageCategory($item['titlelink']);
                    $itemcontent = $obj->getTitle();
                    $zenpagepage = "news/category/" . $item['titlelink'];
                    $unpublished = unpublishedZenpageItemCheck($obj);
                    $counter = ' (' . count($obj->getArticles()) . ') ';
                    break;
            }
            $itemsortorder = $obj->getSortOrder();
            $itemtitlelink = $obj->getTitlelink();
            $itemtitle = $obj->getTitle();
            $itemid = $obj->getID();
            $order = explode('-', $itemsortorder);
            $level = max(1, count($order));
            if ($toodeep = $level > 1 && $order[$level - 1] === '') {
                $rslt = true;
            }
            if ($level > $indent) {
                echo "\n" . str_pad("\t", $indent, "\t") . "<ul>\n";
                $indent++;
                $open[$indent] = 0;
            } else {
                if ($level < $indent) {
                    while ($indent > $level) {
                        $open[$indent]--;
                        $indent--;
                        echo "</li>\n" . str_pad("\t", $indent, "\t") . "</ul>\n";
                    }
                } else {
                    // indent == level
                    if ($open[$indent]) {
                        echo str_pad("\t", $indent, "\t") . "</li>\n";
                        $open[$indent]--;
                    } else {
                        echo "\n";
                    }
                }
            }
            if ($open[$indent]) {
                echo str_pad("\t", $indent, "\t") . "</li>\n";
                $open[$indent]--;
            }
            echo "<li id='" . $itemid . "' class='itemborder'>";
            echo "<a href=\"javascript:ZenpageDialog.insert('','" . $zenpagepage . "','','','" . $itemtitlelink . "','" . js_encode($itemtitle) . "','','','" . $mode . "','','','','');\" title='" . html_encode($itemcontent) . "'>" . html_encode($itemtitle) . $unpublished . $counter . "</a> <small><em>" . $obj->getDatetime() . "</em></small>";
            if ($mode == 'pages') {
                echo " <a href='zoom.php?pages=" . urlencode($itemtitlelink) . "' title='Zoom' class='colorbox' style='outline: none;'><img src='img/magnify.png' alt='' style='border: 0' /></a>";
            }
            $open[$indent]++;
        }
        while ($indent > 1) {
            echo "</li>\n";
            $open[$indent]--;
            $indent--;
            echo str_pad("\t", $indent, "\t") . "</ul>";
        }
        if ($open[$indent]) {
            echo "</li>\n";
        } else {
            echo "\n";
        }
        echo "</ul>\n";
    }
}
开发者ID:rb26,项目名称:zenphoto,代码行数:97,代码来源:tinyzenpage-functions.php


示例19: exerpt

function exerpt($content, $length)
{
    return shortenContent(getBare($content), $length, getOption("zenpage_textshorten_indicator"));
}
开发者ID:rb26,项目名称:zenphoto,代码行数:4,代码来源:functions.php


示例20: gettext

            $title = gettext('<em>news article</em>: %s');
            $token = gettext('title with link to news article');
        }
        if (isset($args['pages'])) {
            $obj = newPage($args['pages']);
            $title = gettext('<em>page</em>: %s');
            $token = gettext('title with link to page');
        }
        if (isset($args['news_categories'])) {
            $obj = newCategory($args['news_categories']);
            $title = gettext('<em>category</em>: %s');
            $token = gettext('title with link to category');
        }
    }
    $link = $obj->getLink();
    $title1 = getBare($obj->getTitle());
    if ($image && $obj->table == 'images') {
        $link2 = $obj->album->getLink();
    } else {
        $link2 = $alt2 = $title2 = false;
    }
    ?>
			<script type="text/javascript">
				// <!-- <![CDATA[
				var link = '<?php 
    echo $link;
    ?>
';
				var link2 = '<?php 
    echo $link2;
    ?>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:pasteobj.php



注:本文中的getBare函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getBareAlbumTitle函数代码示例发布时间:2022-05-15
下一篇:
PHP getBadgerTranslation2函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap