本文整理汇总了PHP中get_qt函数的典型用法代码示例。如果您正苦于以下问题:PHP get_qt函数的具体用法?PHP get_qt怎么用?PHP get_qt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_qt函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: plugin_redirect_convert
function plugin_redirect_convert()
{
global $vars, $script;
$qm = get_qm();
$qt = get_qt();
//キャッシュしない
$qt->enable_cache = false;
$page = isset($vars['page']) ? $vars['page'] : '';
$args = func_get_args();
$url = strip_autolink(array_shift($args));
$status = array_shift($args);
$status_codes = array('301' => 'HTTP/1.1 301 Moved Permanently');
if (isset($status_codes[$status])) {
$headers[] = $status_codes[$status];
}
if ($url == '') {
$url = $script . '?FrontPage';
} else {
$url = is_url($url) ? $url : $script . '?' . rawurlencode($url);
}
$editable = ss_admin_check();
//自分自身にリダイレクトして、ループする場合は警告する
if ($url === $script . '?' . rawurlencode($page)) {
return $qm->m['plg_redirect']['err_self_ref'];
}
if ($editable) {
return $qm->replace('plg_redirect.ntc_admin', $url);
} else {
$headers[] = 'Location: ' . $url;
foreach ($headers as $header) {
header($header);
}
exit;
}
}
开发者ID:big2men,项目名称:qhm,代码行数:35,代码来源:redirect.inc.php
示例2: plugin_commu_value_convert
function plugin_commu_value_convert()
{
if (func_num_args() != 1) {
return PLUGIN_COMMU_USAGE_CONV;
}
//キャッシュを無効に
if (QHM_VERSION < 4.6) {
global $enable_cache;
$enable_cache = false;
} else {
$qt = get_qt();
$qt->enable_cache = false;
}
list($name) = func_get_args();
// strip_autolink() is not needed for size plugin
//$body = strip_htmltag($body);
if ($name == '') {
return PLUGIN_COMMU_USAGE_CONV;
}
if (isset($_SESSION['commu_user'])) {
$userdata = $_SESSION['commu_user'];
if (isset($userdata[$name])) {
$buffer = $userdata[$name];
$buffer = mb_convert_encoding($buffer, "UTF-8", "UTF-8,EUC-JP");
if ($name == 'expiration' && $buffer != '') {
$buffer = date('Y年m月d日', $buffer);
}
return $buffer;
} else {
return PLUGIN_NOT_COMMU_FIELD;
}
} else {
return PLUGIN_NOT_COMMU_FIELD;
}
}
开发者ID:big2men,项目名称:qhm,代码行数:35,代码来源:commu_value.inc.php
示例3: plugin_canonical_show_info
function plugin_canonical_show_info()
{
global $vars, $style_name;
$qt = get_qt();
$page = $vars['page'];
if (edit_auth($page, FALSE, FALSE)) {
if (strpos($style_name, 'haik_') !== 0) {
return '
<div style="border:solid 1px #00e;background-color:#eef;max-width:80%;width:80%;text-align:left;padding:0 1.5em;margin:1em auto;">
<p>
<strong>このページは canonical URL が指定されています。</strong><br>
<a href="' . h($qt->getv('canonical_url')) . '" target="_blank">確認</a>
</p>
</div>';
} else {
return '
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<strong>このページは canonical URL が指定されています。</strong><br>
<a href="' . h($qt->getv('canonical_url')) . '" target="_blank" class="btn btn-info">確認</a>
</div>';
}
}
}
开发者ID:big2men,项目名称:qhm,代码行数:28,代码来源:canonical.inc.php
示例4: plugin_read_url_inline
function plugin_read_url_inline()
{
$qt = get_qt();
//---- キャッシュのための処理を登録 -----
if ($qt->create_cache) {
$args = func_get_args();
return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
}
//------------------------------------
global $vars;
$qm = get_qm();
$page = $vars['page'];
$args = func_get_args();
$num = func_num_args();
if ($num > 0) {
$url = $args[0];
}
$from_en = "auto";
if (isset($args[1]) && $args[1] != '') {
$from_en = h($args[1]);
}
if (is_url($url)) {
$_data = null;
if ($_http = fopen($url, "r")) {
while (!feof($_http)) {
$_data .= fgets($_http, 1024);
}
fclose($_http);
}
return mb_convert_encoding($_data, SOURCE_ENCODING, $from_en);
} else {
return "<p>" . $qm->replace('plg_read_url.err_invalid_url', $url) . "</p>";
}
}
开发者ID:big2men,项目名称:qhm,代码行数:34,代码来源:read_url.inc.php
示例5: plugin_uname_inline
function plugin_uname_inline()
{
$qt = get_qt();
//---- キャッシュのための処理を登録 -----
if ($qt->create_cache) {
$args = func_get_args();
return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
}
//------------------------------------
global $vars;
$name = isset($vars['uname']) ? $vars['uname'] : '';
//unameパラメータがセットされていない場合
if ($name == '') {
return 'あなた';
} else {
$name = htmlspecialchars(mb_convert_encoding($name, SOURCE_ENCODING, 'UTF8,EUC-JP,Shift_JIS'));
}
$args = func_get_args();
$num = count($args);
$ntitle = "さん";
if ($num > 1) {
strip_htmltag(array_pop($args), FALSE);
$tmpstr = strip_htmltag(array_pop($args), FALSE);
if ($tmpstr == "none") {
$ntitle = '';
} else {
$ntitle = $tmpstr;
}
}
return $name . $ntitle;
}
开发者ID:big2men,项目名称:qhm,代码行数:31,代码来源:uname.inc.php
示例6: plugin_qblog_archives_convert
/**
* QBlog Achives Plugin
* -------------------------------------------
* ./plugin/qblog_archives.inc.php
*
* Copyright (c) 2012 hokuken
* http://hokuken.com/
*
* created : 12/07/27
* modified :
*
* Description
*
*
* Usage :
*
*/
function plugin_qblog_archives_convert()
{
global $vars, $script, $qblog_close;
//閉鎖中は何も表示しない
if ($qblog_close && !ss_admin_check()) {
return '';
}
//---- キャッシュのための処理を登録 -----
$qt = get_qt();
if ($qt->create_cache) {
$args = func_get_args();
return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
}
//------------------------------------
$archives_file = CACHEQBLOG_DIR . 'qblog_archives.dat';
if (file_exists($archives_file)) {
$archives_list = file_get_contents($archives_file);
} else {
$archives_list = array();
}
$list = '';
$list .= '<ul class="qblog_archives">';
foreach (explode("\n", $archives_list) as $line) {
if (rtrim($line) != '') {
list($year, $month, $num) = explode(",", rtrim($line));
$archives_url = $script . '?QBlog&mode=archives&date=' . rawurlencode($year . $month);
$list .= '<li><a href="' . $archives_url . '">' . $year . '年' . $month . '月 (' . $num . ')' . '</a></li>';
}
}
$list .= '</ul>';
return $list;
}
开发者ID:big2men,项目名称:qhm,代码行数:49,代码来源:qblog_archives.inc.php
示例7: plugin_ga_link_inline
function plugin_ga_link_inline()
{
global $accesstag_moved;
global $accesstag;
global $vars;
$qm = get_qm();
$qt = get_qt();
$page = isset($vars['page']) ? $vars['page'] : '';
//parameter check
$args = func_get_args();
$num = func_num_args();
if ($num != 2) {
return $qm->replace('fmt_err_iln', 'ga_link', $qm->m['plg_ga_link']['err_usage']);
}
$text = strip_autolink(array_pop($args));
//テキストデータ
$url = array_pop($args);
if (!is_url($url)) {
$url = 'index.php?' . rawurlencode($url);
}
$acc_tag = '';
//初めて呼び出される場合、accesstag情報を表示する
if (!$accesstag_moved) {
$accesstag_moved = TRUE;
//accesstag_movedを設定
$editable = edit_auth($page, FALSE, FALSE);
if (!$editable) {
$qt->setv('toolkit_upper', $accesstag);
}
}
//Google Analytics用のjavascriptを先に読み込んでから、関数を呼び出す
$ret = '<a href="index.php?cmd=ga_link&url=' . rawurlencode($url) . '" onClick="javascript:pageTracker._link(this.href);return false;">' . $text . '</a>';
return $ret;
}
开发者ID:big2men,项目名称:qhm,代码行数:34,代码来源:ga_link.inc.php
示例8: plugin_fb_likebutton_body
function plugin_fb_likebutton_body($args)
{
global $script, $vars, $defaultpage;
$page = $vars['page'];
$r_page = rawurlencode($page);
$qm = get_qm();
$qt = get_qt();
$layouts = array('standard', 'button_count', 'box_count');
$actions = array('like', 'recommend');
// scaffold
$def_attrs = array('href' => '', 'layout' => array('standard', $layouts), 'show-faces' => 'true', 'width' => FALSE, 'colorscheme' => FALSE, 'action' => array('like', $actions), 'ref' => FALSE, 'share' => 'true', 'kid-directed-site' => FALSE);
$attrs = plugin_fb_root_parse_args($args, $def_attrs);
//default URL set
if ($attrs['href'] == '') {
if ($page === $defaultpage) {
$attrs['href'] = dirname($script . 'dummy');
} else {
$attrs['href'] = $script . '?' . $r_page;
}
}
plugin_fb_root_set_jsapi(TRUE);
$tag = plugin_fb_root_create_tag('fb-like', $attrs);
$body = $tag;
return $body;
}
开发者ID:big2men,项目名称:qhm,代码行数:25,代码来源:fb_likebutton.inc.php
示例9: plugin_commu_logout_inline
function plugin_commu_logout_inline()
{
//キャッシュを無効に
if (QHM_VERSION < 4.6) {
global $enable_cache;
$enable_cache = false;
} else {
$qt = get_qt();
$qt->enable_cache = false;
}
$args = func_get_args();
$text = strip_autolink(array_pop($args));
if ($text == "") {
$text = 'ログアウト';
}
$dirpath = '';
if ($handle = opendir('./commu')) {
$dirpath = "./commu/";
closedir($handle);
} else {
if ($handle = opendir('../commu')) {
$dirpath = "../commu/";
closedir($handle);
} else {
return PLUGIN_COMMU_INFO_NOCOMMU;
}
}
return '<a href="' . $dirpath . 'user_logout.php">' . $text . '</a>';
}
开发者ID:big2men,项目名称:qhm,代码行数:29,代码来源:commu_logout.inc.php
示例10: plugin_iframe_convert
function plugin_iframe_convert()
{
global $pkwk_dtd;
$qm = get_qm();
$qt = get_qt();
$qt->setv('jquery_include', true);
$args = func_get_args();
$args_cnt = count($args);
list($formurl, $height, $width, $align) = array_pad($args, 4, '');
if (strlen(trim($formurl)) == 0) {
return $qm->replace('fmt_err_cvt', 'iframe', $qm->m['plg_iframe']['err_usage']);
}
$fit = '';
if ($args_cnt < 3) {
//correct args
$height = '200';
$width = '100%';
$fit = ' class="autofit_iframe" ';
$qt->appendv_once('plugin_iframe', 'beforescript', PLUGIN_IFRAME_FIT_IFRAME_JS);
}
if ($args_cnt < 4) {
$align = 'center';
}
if (PLUGIN_IFRAME_ALLOW_CSS === TRUE || !isset($pkwk_dtd) || $pkwk_dtd == PKWK_DTD_XHTML_1_1) {
return '<div style="text-align:' . $align . '"><iframe src="' . $formurl . '" frameborder="0" height="' . $height . '" width="' . $width . '" style="margin:0px;text-align:' . $align . ';" ' . $fit . '><p>' . $qm->replace('plg_iframe.ntc', $formurl) . '</p></iframe></div>';
} else {
return 'Invalid argument';
}
}
开发者ID:big2men,项目名称:qhm,代码行数:29,代码来源:iframe.inc.php
示例11: plugin_newpage_action
function plugin_newpage_action()
{
global $vars;
$qm = get_qm();
if (PKWK_READONLY) {
die_message($qm->m['fmt_err_pkwk_readonly']);
}
if ($vars['page'] == '') {
$retvars['msg'] = $qm->m['plg_newpage']['label'];
$retvars['body'] = plugin_newpage_convert();
if (preg_match('/id="([^"]+)"/', $retvars['body'], $ms)) {
$domid = $ms[1];
//jquery ライブラリの読み込み
$qt = get_qt();
$qt->setv('jquery_include', true);
$addscript = <<<EOS
<script type="text/javascript">
jQuery(function(){
\tjQuery("#{$domid}").focus().select();
});
</script>
EOS;
$qt->appendv_once('plugin_select_fsize', 'beforescript', $addscript);
}
return $retvars;
} else {
$page = strip_bracket($vars['page']);
$r_page = rawurlencode(isset($vars['refer']) ? get_fullname($page, $vars['refer']) : $page);
$r_refer = rawurlencode($vars['refer']);
pkwk_headers_sent();
header('Location: ' . get_script_uri() . '?cmd=read&page=' . $r_page . '&refer=' . $r_refer);
exit;
}
}
开发者ID:big2men,项目名称:qhm,代码行数:34,代码来源:newpage.inc.php
示例12: plugin_fb_recommends_convert
function plugin_fb_recommends_convert()
{
if ($alt = plugin_fb_root_is_deprecated('recommends')) {
$args = func_get_args();
return call_user_func_array($alt, $args);
}
global $script, $vars;
$page = $vars['page'];
$r_page = rawurlencode($page);
$qm = get_qm();
$qt = get_qt();
$args = func_get_args();
// scaffold
$def_attrs = array('site' => '', 'width' => FALSE, 'height' => FALSE, 'header' => 'true', 'colorscheme' => 'light', 'ref' => FALSE, 'action' => 'og.likes', 'app-id' => FALSE, 'linktarget' => FALSE, 'max-age' => FALSE);
$attrs = plugin_fb_root_parse_args($args, $def_attrs);
//default site set
if ($attrs['site'] == '') {
$parsed = parse_url($script);
$host = $parsed['host'];
$attrs['site'] = $host;
}
plugin_fb_root_set_jsapi(TRUE);
$body = plugin_fb_root_create_tag('fb-recommendations', $attrs);
if (edit_auth($page, FALSE, FALSE)) {
$fb_pagebox_help = h(QHM_HOME . '?PageName');
$warning = <<<EOM
\t\t\t<div class="alert alert-warning">
\t\t\t\tFacebook Recommends は Graph API v2.3 より廃止されました。<br>
\t\t\t\t<strong>2015 年 6 月 23 日</strong>に完全に使えなくなります。
\t\t\t</div>
EOM;
$body = $warning . $body;
}
return $body;
}
开发者ID:big2men,项目名称:qhm,代码行数:35,代码来源:fb_recommends.inc.php
示例13: plugin_qcart_convert
function plugin_qcart_convert()
{
global $script;
$args = func_get_args();
$cnt = func_num_args();
$dir = 'qcart';
$position = 'right';
list($position, $dir) = array_pad($args, 2, '');
$dir = $dir == '' ? 'qcart' : htmlspecialchars($dir);
$position = $position == '' ? 'right' : htmlspecialchars($position);
$position = $position == 'right' || $position == 'left' ? $position : 'right';
if ($position == 'right') {
$position .= ';margin-left:1em;';
} else {
$position .= ';margin-right:1em;';
}
$addscript = <<<EOD
<script src="./{$dir}/shop/quickcart.js" type="text/javascript" language="javascript"></script>
EOD;
$qt = get_qt();
$qt->appendv_once('plugin_qcart', 'beforescript', $addscript);
$myurl = str_replace('index.php', '', $script);
return <<<EOD
<div style="width:200px;float:{$position};">
<script>cart('{$myurl}{$dir}/cgi-bin/')</script>
</div>
EOD;
}
开发者ID:big2men,项目名称:qhm,代码行数:28,代码来源:qcart.inc.php
示例14: plugin_fb_comments_convert
function plugin_fb_comments_convert()
{
global $script, $vars;
$page = $vars['page'];
$r_page = rawurlencode($page);
$qm = get_qm();
$qt = get_qt();
$args = func_get_args();
if (!exist_plugin("fb_root")) {
die('Fatal error: fb_root plugin not found');
}
$orders = array('social', 'reverse_time', 'time');
// scaffold
$def_attrs = array('href' => '', 'width' => FALSE, 'numposts' => '2', 'colorscheme' => 'light', 'mobile' => FALSE, 'order-by' => array(FALSE, $orders));
$attrs = plugin_fb_root_parse_args($args, $def_attrs);
//default URL set
if ($attrs['href'] == '') {
if ($page === $defaultpage) {
$attrs['href'] = dirname($script . 'dummy');
} else {
$attrs['href'] = $script . '?' . $r_page;
}
}
plugin_fb_root_set_jsapi(TRUE);
$tag = plugin_fb_root_create_tag('fb-comments', $attrs);
$body = $tag;
return $tag;
}
开发者ID:big2men,项目名称:qhm,代码行数:28,代码来源:fb_comments.inc.php
示例15: plugin_greybox_inline
function plugin_greybox_inline()
{
$qm = get_qm();
$addscript = '
<script type="text/javascript">
var GB_ROOT_DIR = "./plugin/greybox/";
</script>
<script type="text/javascript" src="./plugin/greybox/AJS.js"></script>
<script type="text/javascript" src="./plugin/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="./plugin/greybox/gb_scripts.js"></script>
<link href="./plugin/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
';
$qt = get_qt();
$qt->appendv_once('plugin_greybox', 'beforescript', $addscript);
$args = func_get_args();
$text = strip_autolink(array_pop($args));
// Already htmlspecialchars(text)
list($url, $title, $group) = array_pad($args, 3, '');
if ($url == '' && $group == '' || $text == '' || func_num_args() > 4) {
return $qm->replace('fmt_err_iln', 'greybox', $qm->m['plg_greybox']['err_usage']);
}
$url = htmlspecialchars($url);
$title = htmlspecialchars($title);
$group = htmlspecialchars($group);
$title = $title == '' ? '' : ' title="' . $title . '"';
//image grey box
if (preg_match("/.*(jpg|jpeg|png|gif)\$/i", $url)) {
$rel = $group == '' ? ' rel="gb_image[]"' : ' rel="gb_imageset[' . $group . ']"';
} else {
//web grey box
$rel = $group == '' ? ' rel="gb_page_fs[]"' : 'rel="gb_pageset[' . $group . ']"';
}
$ret = '<a href="' . $url . '" ' . $title . $rel . '>' . $text . '</a>';
return $ret;
}
开发者ID:big2men,项目名称:qhm,代码行数:35,代码来源:greybox.inc.php
示例16: plugin_close_convert
function plugin_close_convert()
{
global $vars, $script;
$qm = get_qm();
$qt = get_qt();
$page = isset($vars['page']) ? $vars['page'] : '';
//キャッシュ無効
$qt->enable_cache = false;
$title = $qm->m['plg_close']['title'];
$msg = $qm->m['plg_close']['ntc'];
//parse arguments
$args = func_get_args();
$num = count($args);
if ($num == 0) {
//do nothing
} else {
if ($num == 1) {
$title = array_pop($args);
} else {
list($title, $msg) = $args;
}
}
$editable = edit_auth($page, FALSE, FALSE);
if ($editable) {
return $qm->m['plg_close']['ntc_admin'];
} else {
force_output_message($title, '', $msg);
}
}
开发者ID:big2men,项目名称:qhm,代码行数:29,代码来源:close.inc.php
示例17: plugin_qblog_recent_convert
function plugin_qblog_recent_convert()
{
global $vars, $script, $qblog_page_re, $qblog_close;
//閉鎖中は何も表示しない
if ($qblog_close && !ss_admin_check()) {
return '';
}
//---- キャッシュのための処理を登録 -----
$qt = get_qt();
if ($qt->create_cache) {
$args = func_get_args();
return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
}
//------------------------------------
$display_num = PLUGIN_QBLOG_RECENT_DEFAULT_NUM;
if (func_num_args()) {
$args = func_get_args();
$display_num = $args[0];
}
$recent_file = CACHEQBLOG_DIR . 'qblog_recent.dat';
if (file_exists($recent_file)) {
$recent_list = explode("\n", file_get_contents($recent_file));
} else {
$recent_list = array();
}
//件数を抜く
$size = array_shift($recent_list);
$list = '';
$list .= '<ul class="qblog_recent">';
foreach ($recent_list as $i => $line) {
if ($i >= $display_num) {
break;
}
if (rtrim($line) != '') {
$pagename = rtrim($line);
$title = get_page_title($pagename);
if ($pagename == $title) {
if (preg_match($qblog_page_re, $pagename, $mts)) {
$blog_date = "{$mts[1]}年{$mts[2]}月{$mts[3]}日";
$title = " No.{$mts[4]}";
}
}
//! 表示方法 要検討
$list .= '<li><a href="' . $script . '?' . rawurldecode($pagename) . '">' . $blog_date . $title . '</a></li>';
}
}
$list .= '</ul>';
if (!is_bootstrap_skin()) {
$include_bs = '
<link rel="stylesheet" href="skin/bootstrap/css/bootstrap-custom.min.css" />
<script type="text/javascript" src="skin/bootstrap/js/bootstrap.min.js"></script>';
$qt->appendv_once('include_bootstrap_pub', 'beforescript', $include_bs);
}
//qblog.css を読み込む
$head = '
<link rel="stylesheet" href="plugin/qblog/qblog.css" />';
$qt->appendv_once('qblog_beforescript', 'beforescript', $head);
return $list;
}
开发者ID:big2men,项目名称:qhm,代码行数:59,代码来源:qblog_recent.inc.php
示例18: plugin_secret_convert
/**
* QHM Secret Plugin ver 0.9
* -------------------------------------------
* plugin/secret.inc.php
*
* Copyright (c) 2010 hokuken
* http://hokuken.com/
*
* created : 2007-09-11
* modified :
*
* 簡易パスワード認証ページを作るプラグイン
*
* Usage :
* &secret(パスワード(英数のみ));
*
*/
function plugin_secret_convert()
{
global $vars, $script;
$qm = get_qm();
$qt = get_qt();
//---- キャッシュのための処理を登録 -----
if ($qt->create_cache) {
$args = func_get_args();
return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
}
//------------------------------------
$page = isset($vars['page']) ? $vars['page'] : '';
$en_page = rawurlencode($page);
$secretplugin = isset($vars['secretplugin']) ? $vars['secretplugin'] : '';
$password = isset($vars['password']) ? $vars['password'] : '';
$auth_url = $script . "?plugin=secret&page=" . urlencode($page);
$args = func_get_args();
$masterpasswd = array_pop($args);
if ($masterpasswd == "") {
return $qm->replace('fmt_err_cvt', 'secret', 'パスワードを設定して下さい。');
}
$editable = edit_auth($page, FALSE, FALSE);
if ($editable) {
return "<div style=\"border:dashed 1px #f00;background-color:#fee;padding:1em;\"><p><strong>{$qm->m['plg_secret']['ntc_admin']}</strong></p></div>";
} else {
//session check
if (isset($_SESSION['secretplugin_' . $en_page]) && $_SESSION['secretplugin_' . $en_page] == $en_page) {
return '';
}
if ($secretplugin == "secretplugin") {
//passwd check
if ($password == $masterpasswd) {
$_SESSION['secretplugin_' . $en_page] = $en_page;
return "";
} else {
header("Location: {$auth_url}&errmsg=true");
exit;
}
}
//携帯アクセスのことを考えての処理(cookieをちぇっくして、処理を行う)
if (isset($vars['chkck'])) {
$cookie = $_COOKIE['QHMDUMMY'];
setcookie('QHMDUMMY', '', time() - 3600);
//del cookie
if ($cookie) {
header("Location: {$auth_url}");
exit;
} else {
header("Location: {$auth_url}&mobssid=yes");
exit;
}
} else {
//はじめてのアクセス
setcookie('QHMDUMMY', TRUE);
header('Location: ' . $script . '?cmd=read&page=' . $en_page . '&chkck');
exit;
}
}
}
开发者ID:big2men,项目名称:qhm,代码行数:76,代码来源:secret.inc.php
示例19: plugin_icon_set_font_awesome
function plugin_icon_set_font_awesome()
{
$qt = get_qt();
$addcss = '
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
';
$qt->appendv_once('plugin_icon_font_awesome', 'beforescript', $addcss);
}
开发者ID:big2men,项目名称:qhm,代码行数:8,代码来源:icon.inc.php
示例20: plugin_showrss_convert
function plugin_showrss_convert()
{
global $script;
$qm = get_qm();
$qt = get_qt();
if (func_num_args() == 0) {
// 引数がない場合はエラー
return $qm->replace('fmt_err_cvt', 'showrss', $qm->m['plg_showrss']['err_noparams']);
}
if (!extension_loaded('xml')) {
// xml 拡張機能が有効でない場合。
return $qm->replace('fmt_err_cvt', 'showrss', $qm->m['plg_showrss']['err_ex_xml_load']);
}
//---- キャッシュのための処理を登録 -----
if ($qt->create_cache) {
$args = func_get_args();
return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
}
//------------------------------------
$array = func_get_args();
$rssurl = $tmplname = $showline = $usecache = $usetimestamp = '';
switch (func_num_args()) {
case 5:
$usetimestamp = trim($array[4]);
case 4:
$usecache = $array[3];
case 3:
$showline = trim($array[2]);
case 2:
$tmplname = strtolower(trim($array[1]));
case 1:
$rssurl = trim($array[0]);
}
//自己参照を防止する
$p = parse_url($rssurl);
if (strpos($p['query'], 'cmd=blog_rss') === FALSE && strpos(dirname($rssurl) . '/index.php', $script) === 0) {
return '<strong style="color:red">Error</strong><br />#showrss: 自分自身のRSSは読み込めません。#recent をお使いください。';
}
// RSS パスの値チェック
if (!is_url($rssurl)) {
return $qm->replace('fmt_err_cvt', 'showrss', $qm->replace('plg_showrss.err_syntax', h($rssurl)));
}
$class = "ShowRSS_html_{$tmplname}";
if (!class_exists($class)) {
$class = 'ShowRSS_html';
}
list($rss, $time) = plugin_showrss_get_rss($rssurl, $usecache);
if ($rss === FALSE) {
return $qm->replace('fmt_err_cvt', 'showrss', $qm->m['plg_showrss.err_cannot_get']);
}
$obj = new $class($rss, $showline);
$timestamp = '';
if ($usetimestamp > 0) {
$time = get_date('Y/m/d H:i:s', $time);
$timestamp = "<p style=\"font-size:10px; font-weight:bold\">Last-Modified:{$time}</p>";
}
return $obj->toString($timestamp);
}
开发者ID:big2men,项目名称:qhm,代码行数:58,代码来源:showrss.inc.php
注:本文中的get_qt函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论