本文整理汇总了PHP中xoops_utf8_encode函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_utf8_encode函数的具体用法?PHP xoops_utf8_encode怎么用?PHP xoops_utf8_encode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_utf8_encode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: newbb_trackback_response
/**
* Function to respond to a trackback
*/
function newbb_trackback_response($error = 0, $error_message = '')
{
require_once XOOPS_ROOT_PATH . "/modules/newbb/include/functions.config.php";
$moduleConfig = newbb_loadConfig();
if (!empty($moduleConfig["rss_utf8"])) {
$charset = "utf-8";
$error_message = xoops_utf8_encode($error_message);
} else {
$charset = _CHARSET;
}
header('Content-Type: text/xml; charset="' . $charset . '"');
if ($error) {
echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
echo "<response>\n";
echo "<error>1</error>\n";
echo "<message>{$error_message}</message>\n";
echo "</response>";
die;
} else {
echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
echo "<response>\n";
echo "<error>0</error>\n";
echo "</response>";
}
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:28,代码来源:functions.rpc.php
示例2: xoops_utf8_encode
$tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', checkEmail($xoopsConfig['adminmail'], true));
// Fed up with spam
$tpl->assign('channel_editor', checkEmail($xoopsConfig['adminmail'], true));
// Fed up with spam
$tpl->assign('channel_category', 'News');
$tpl->assign('channel_generator', 'XOOPS');
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/images/logo.gif');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.gif');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$count = $sarray;
foreach ($sarray as $story) {
//$tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), 'link' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'guid' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode($myts->undoHtmlSpecialChars($story->hometext(), ENT_QUOTES))));
$tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), 'link' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'guid' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($story->hometext(), ENT_QUOTES))));
}
}
}
$tpl->display('db:system_rss.html');
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:backendt.php
示例3: xoops_utf8_encode
if (is_array($sarray)) {
$tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
$tpl->assign('channel_link', XOOPS_URL . '/');
$tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
$tpl->assign('channel_editor', $xoopsConfig['adminmail']);
$tpl->assign('channel_category', 'News');
$tpl->assign('channel_generator', 'SmartSection');
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/images/logo.gif');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.gif');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$count = $sarray;
foreach ($sarray as $item) {
$tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($item->title(), ENT_QUOTES)), 'link' => $item->getItemUrl(), 'guid' => $item->getItemUrl(), 'pubdate' => formatTimestamp($item->getVar('datesub'), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($item->summary(), ENT_QUOTES))));
}
}
}
$tpl->display('db:system_rss.html');
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:backend.php
示例4: xoops_convert_encoding
/**
* Converts text to UTF-8 encoded text
* @see xoops_utf8_encode
* @todo Move to a static class method - String
*/
function xoops_convert_encoding(&$text)
{
return xoops_utf8_encode($text);
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:9,代码来源:functions.php
示例5: art_trackback_response
/**
* Function to respond to a trackback
*/
function art_trackback_response($error = 0, $error_message = '')
{
$moduleConfig = art_load_config();
if (!empty($moduleConfig["do_trackbackutf8"])) {
$charset = "utf-8";
$error_message = xoops_utf8_encode($error_message);
} else {
$charset = _CHARSET;
}
header('Content-Type: text/xml; charset="' . $charset . '"');
if ($error) {
echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
echo "<response>\n";
echo "<error>1</error>\n";
echo "<message>{$error_message}</message>\n";
echo "</response>";
die;
} else {
echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
echo "<response>\n";
echo "<error>0</error>\n";
echo "</response>";
}
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:27,代码来源:functions.rpc.php
示例6: xoops_utf8_encode
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Refresh" content="<?echo $refresh; ?>" />
<link rel="stylesheet" type="text/css" charset="EUC-JP" media="all" href="<?php
echo XOOPS_URL;
?>
/modules/cubeUtils/images/igoogle.css" />
<base target="__blank" />
</head>
<body><div class="xoops-content">
<?php
echo $content;
?>
</div></body></html>
<?php
} else {
$site = xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
header('Content-type: text/xml; charset=UTF-8', true);
echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>
<Module>
<ModulePrefs
title="__UP_title__"
title_url="<?php
echo XOOPS_URL;
?>
"
height="200" >
<Require feature="dynamic-height" />
</ModulePrefs>
<UserPref name="title" default_value="<?echo $site ?> Block" />
<UserPref name="height" display_name="Height" default_value="200" />
开发者ID:nunoluciano,项目名称:uxcl,代码行数:31,代码来源:igoogle.php
示例7: formatTimestamp
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', checkEmail($xoopsConfig['adminmail'], true));
// Fed up with spam
$tpl->assign('channel_editor', checkEmail($xoopsConfig['adminmail'], true));
// Fed up with spam
$tpl->assign('channel_category', htmlspecialchars($xt->topic_title(), ENT_QUOTES));
$tpl->assign('channel_generator', 'XOOPS');
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/images/logo.gif');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.gif');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$count = $sarray;
foreach ($sarray as $story) {
$storytitle = htmlspecialchars($story->title(), ENT_QUOTES);
$description = htmlspecialchars($story->hometext(), ENT_QUOTES);
$tpl->append('items', array('title' => xoops_utf8_encode($storytitle), 'link' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'guid' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode($description)));
}
}
}
$tpl->display('db:news_rss.html', $topicid);
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:backendt.php
示例8: news_utf8_encode
function news_utf8_encode($text)
{
return xoops_utf8_encode($text);
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:4,代码来源:index.php
示例9: xoops_utf8_encode
$tpl->assign('channel_link', XOOPS_URL . '/');
$tpl->assign('channel_desc', xoops_utf8_encode($slogan));
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', xoops_utf8_encode($email));
$tpl->assign('channel_editor', xoops_utf8_encode($email));
$tpl->assign('channel_category', xoops_utf8_encode($categoryTitle));
$tpl->assign('channel_generator', xoops_utf8_encode(oledrion_utils::getModuleName()));
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/images/logo.png');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.png');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$products = $h_oledrion_products->getRecentProducts(new oledrion_parameters(array('start' => 0, 'limit' => $limit, 'category' => $cat_cid)));
foreach ($products as $item) {
$title = htmlspecialchars($item->getVar('product_title'), ENT_QUOTES);
$description = htmlspecialchars(strip_tags($item->getVar('product_summary')), ENT_QUOTES);
$link = $item->getLink();
$tpl->append('items', array('title' => xoops_utf8_encode($title), 'link' => $link, 'guid' => $link, 'pubdate' => formatTimestamp($item->getVar('product_submitted'), 'rss'), 'description' => xoops_utf8_encode($description)));
}
}
$tpl->display('db:oledrion_rss.tpl', $cat_cid);
开发者ID:osw17,项目名称:oledrion,代码行数:31,代码来源:rss.php
示例10: executeViewIndex
function executeViewIndex(&$controller, &$xoopsUser, &$render)
{
$xoopsConfig = $controller->mRoot->mContext->mXoopsConfig;
//
// Set up the render buffer.
//
$renderSystem =& $controller->mRoot->getRenderSystem('Legacy_RenderSystem');
$renderTarget =& $renderSystem->createRenderTarget('main');
$renderTarget->setTemplateName("legacy_rss.html");
$renderTarget->setAttribute('channel_title', $xoopsConfig['sitename']);
$renderTarget->setAttribute('channel_link', XOOPS_URL . '/');
$renderTarget->setAttribute('channel_desc', $xoopsConfig['slogan']);
$renderTarget->setAttribute('channel_lastbuild', formatTimestamp(time(), 'rss'));
$renderTarget->setAttribute('channel_webmaster', $xoopsConfig['adminmail']);
$renderTarget->setAttribute('channel_editor', $xoopsConfig['adminmail']);
$renderTarget->setAttribute('channel_category', 'News');
$renderTarget->setAttribute('channel_generator', 'XOOPS Cube');
$renderTarget->setAttribute('image_url', XOOPS_URL . '/images/logo.gif');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.gif');
$width = 0;
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
$height = 0;
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$renderTarget->setAttribute('image_width', $width);
$renderTarget->setAttribute('image_height', $height);
$renderTarget->setAttribute('items', $this->mItems);
//
// Rendering
//
$renderSystem->render($renderTarget);
if (function_exists('mb_http_output')) {
mb_http_output('pass');
}
header('Content-Type:text/xml; charset=utf-8');
print xoops_utf8_encode($renderTarget->getResult());
exit(0);
}
开发者ID:hiro1173,项目名称:legacy,代码行数:45,代码来源:BackendAction.class.php
示例11: foreach
/**
* @desc Genera la información para mostrar la Sindicación
* @param int Limite de resultados
* @return Array
*/
function &mywords_rssshow($limit)
{
global $util, $mc;
$db = XoopsDatabaseFactory::getDatabaseConnection();
include_once XOOPS_ROOT_PATH . '/modules/mywords/class/mwcategory.class.php';
include_once XOOPS_ROOT_PATH . '/modules/mywords/class/mwpost.class.php';
foreach ($_GET as $k => $v) {
${$k} = $v;
}
$feed = array();
// Información General
$ret = array();
$mc =& $util->moduleConfig('mywords');
if ($show == 'all') {
$feed['title'] = htmlspecialchars(_MI_MW_RSSNAME);
$feed['link'] = XOOPS_URL . '/modules/mywords';
$feed['description'] = htmlspecialchars($util->filterTags($mc['rssdesc']));
$sql = "SELECT * FROM " . $db->prefix("mw_posts") . " WHERE aprovado='1' AND estado>'0' ORDER BY modificado DESC LIMIT 0,{$limit}";
} else {
if ($id == '') {
return;
}
$cat = new MWCategory($id);
if ($cat->isNew()) {
return;
}
$feed['title'] = sprintf(_MI_MW_RSSNAMECAT, $cat->getName());
$feed['link'] = $cat->getLink();
$feed['description'] = $cat->getDescription();
$sql = "SELECT b.* FROM " . $db->prefix("mw_catpost") . " a," . $db->prefix("mw_posts") . " b WHERE a.cat='" . $cat->getID() . "' AND b.id_post=a.post AND b.aprovado='1' AND b.estado>'0' ORDER BY b.modificado DESC LIMIT 0,{$limit}";
}
// Generamos los elementos
$result = $db->query($sql);
$posts = array();
while ($row = $db->fetchArray($result)) {
$post = new MWPost();
$post->assignVars($row);
$rtn = array();
$rtn['title'] = $post->getTitle();
$rtn['link'] = $post->getPermaLink();
$rtn['description'] = xoops_utf8_encode(htmlspecialchars($post->getHomeText(), ENT_QUOTES));
$rtn['pubDate'] = formatTimestamp($post->getDate());
$posts[] = $rtn;
}
$ret = array('feed' => $feed, 'items' => $posts);
return $ret;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:52,代码来源:rss.php
示例12: xoops_utf8_encode
function &xoops_convert_encoding(&$text, $to = 'utf-8', $from = '')
{
if (is_callable(array("XoopsLocal", "convert_encoding"))) {
return XoopsLocal::convert_encoding($text, $to, $from);
}
if (strtolower($to) != "utf-8") {
return $text;
}
return xoops_utf8_encode($text);
}
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:10,代码来源:functions.php
示例13: XoopsZipDownloader
if (!empty($_POST['as_dw_extension_zip'])) {
require_once XOOPS_ROOT_PATH . '/class/zipdownloader.php';
$downloader = new XoopsZipDownloader();
$do_download = true;
} else {
if (!empty($_POST['as_dw_extension_tgz'])) {
require_once XOOPS_ROOT_PATH . '/class/tardownloader.php';
$downloader = new XoopsTarDownloader();
$do_download = true;
}
}
if (!empty($do_download)) {
// make files for each tplsvars
foreach ($tplsvarsinfo_total as $key => $val) {
$name = substr($key, 1);
$description = htmlspecialchars(xoops_utf8_encode(xoops_substr($val, 0, 256)), ENT_QUOTES);
$snippet_body = sprintf($snippet_format, $name, $description);
$file_name = strtr($key, '.', '_') . '.csn';
$downloader->addFileData($snippet_body, $dw_snippets_dirname . '/' . $file_name);
}
// make a mxi file per module
foreach ($tplsvarsinfo_mod_tpl as $mod_name => $tplsvarsinfo_tpl) {
$file_entries = '';
foreach ($tplsvarsinfo_tpl as $tpl_name => $tplsvarsinfo) {
foreach ($tplsvarsinfo as $key => $val) {
$name = substr($key, 1);
$file_name = strtr($key, '.', '_') . '.csn';
$file_entries .= "\t\t" . '<file name="' . $dw_snippets_dirname . '/' . $file_name . '" destination="$Dreamweaver/Configuration/Snippets/XOOPS-' . $site_name . '/' . $tpl_name . '" />' . "\n";
}
}
$mxi_body = get_mxi_body($mod_name, $file_entries);
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:31,代码来源:get_tplsvarsinfo.php
示例14: xoops_utf8_encode
$xml .= '
<Placemark>
<name>' . $title . '</name>
<description>
' . $desc . '
</description>
<lid>' . $lid . '</lid><icd>' . $icon . '</icd>
<coordinates>' . $lng . ',' . $lat . ',' . $zoom . '</coordinates>
</Placemark>';
} else {
$xml .= '
<Placemark>
<name>' . $title . '</name>
<description>
<![CDATA[
' . $desc . '
]]>
</description>' . $iconstyle . '
<Point>
<coordinates>' . $lng . ',' . $lat . ',0</coordinates>
</Point>
</Placemark>';
}
}
$xml .= '
</Document>';
if ($mtype == G_KML) {
$xml .= '</kml>';
}
print xoops_utf8_encode($xml);
exit(0);
开发者ID:nouphet,项目名称:rata,代码行数:31,代码来源:kml.php
示例15: intval
} else {
$cat = intval($_GET['cat']);
}
if (function_exists('mb_http_output')) {
mb_http_output('pass');
}
header('Content-Type:text/xml; charset=utf-8');
$tpl = new XoopsTpl();
$tpl->xoops_setCaching(0);
$tpl->xoops_setCacheTime($xoopsModuleConfig['rss_cache_time'] * 60);
if (!$tpl->is_cached('db:extcal_rss.html', $cat)) {
$events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat);
if (is_array($events)) {
$tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
$tpl->assign('channel_link', XOOPS_URL . '/');
$tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
$tpl->assign('channel_editor', $xoopsConfig['adminmail']);
$tpl->assign('channel_category', 'Event');
$tpl->assign('channel_generator', 'XOOPS');
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/modules/extcal/images/extcal_logo.png');
$tpl->assign('image_width', 92);
$tpl->assign('image_height', 52);
foreach ($events as $event) {
$tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)), 'link' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), 'guid' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), 'pubdate' => formatTimestamp($event->getVar('event_submitdate'), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES))));
}
}
}
$tpl->display('db:extcal_rss.html', $cat);
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:rss.php
注:本文中的xoops_utf8_encode函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论