本文整理汇总了PHP中html_encodeTagged函数的典型用法代码示例。如果您正苦于以下问题:PHP html_encodeTagged函数的具体用法?PHP html_encodeTagged怎么用?PHP html_encodeTagged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_encodeTagged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSlide
/**
* 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;
}
示例2: printCustomField
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);
}
}
示例3: html_encode
<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());
示例4: zpArdoise_printImageStatistic
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";
}
示例5: printPageContent
/**
* 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));
}
示例6: printRelatedItems
//.........这里部分代码省略.........
$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
}
}
}
示例7: printf
?>
<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';
示例8: printCommentForm
//.........这里部分代码省略.........
}
?>
<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;
}
示例9: printUserLogin_out
/**
* 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;
?>
//.........这里部分代码省略.........
示例10: printField
/**
* @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;
}
示例11: html_encode
?>
<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
}
?>
示例12: getNextNewsURL
<?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';
示例13: html_encode
<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">
示例14: printImageData
/**
* 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);
}
}
示例15: gettext
<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');
?>