“Api.class.php”的版本间的差异
(创建页面,内容为“<?php →* * Created by PhpStorm. * User: yzg * Date: 2016/1/26 * Time: 15:15: if (!defined('IN_DISCUZ')) { exit('Access Denied'); } class xigua_re {...”) |
|||
第6行: | 第6行: | ||
* Time: 15:15 | * Time: 15:15 | ||
*/ | */ | ||
− | if (!defined('IN_DISCUZ')) { | + | if (!defined('IN_DISCUZ')) |
+ | { | ||
exit('Access Denied'); | exit('Access Denied'); | ||
} | } | ||
第69行: | 第70行: | ||
$imgs = $reilist = ''; | $imgs = $reilist = ''; | ||
− | + | // 取来_使用者计数_通过_放入用户 | |
$count = C::t('#xigua_re#xgre_order')->fetch_usercount_by_postid($postid); | $count = C::t('#xigua_re#xgre_order')->fetch_usercount_by_postid($postid); | ||
if($count){ | if($count){ | ||
− | + | // 取来_使用者_通过_放入id | |
$list = C::t('#xigua_re#xgre_order')->fetch_user_by_postid($postid); | $list = C::t('#xigua_re#xgre_order')->fetch_user_by_postid($postid); | ||
foreach ($list as $itm) { | foreach ($list as $itm) { | ||
− | + | // 风格 = 陈列:排成行-立方体;边缘: 竖的-排列:顶部 风格 宽度 高度 显示 立方体 边缘 站点 来源 | |
$imgs .= "<li style='display:inline-block;margin:0 6px 6px 0;vertical-align:top'><img style='width:28px;height:28px;display:block;margin:0' src=\"$itm\" onerror='this.error=null;this.src=\"{$_G['siteurl']}source/plugin/xigua_re/static/noavatar.gif\"' /> </li>"; | $imgs .= "<li style='display:inline-block;margin:0 6px 6px 0;vertical-align:top'><img style='width:28px;height:28px;display:block;margin:0' src=\"$itm\" onerror='this.error=null;this.src=\"{$_G['siteurl']}source/plugin/xigua_re/static/noavatar.gif\"' /> </li>"; | ||
} | } | ||
第100行: | 第101行: | ||
{ | { | ||
global $_G; | global $_G; | ||
− | $config = $_G['cache']['plugin'][' | + | $config = $_G['cache']['plugin']['xigua_ |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
2022年11月20日 (日) 10:41的版本
<?php /**
* Created by PhpStorm. * User: yzg * Date: 2016/1/26 * Time: 15:15 */
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
} class xigua_re {
public function viewthread_variables(& $params) { include_once DISCUZ_ROOT.'./source/plugin/xigua_re/common.php'; include_once DISCUZ_ROOT.'./source/plugin/xigua_re/hook.class.php'; global $_G; $config = $_G['cache']['plugin']['xigua_re']; $color = $config['linkcolor'] ? $config['linkcolor'] : '#D75847'; $ren = lang('plugin/xigua_re', 'ren');
//如果(没有创建数组($_G[id],序列化($config[关闭fid])
if(in_array($_G['fid'], unserialize($config['closefids']))){
//回来
return; }
//循环执行($params[放入列表])向$index 传入 $itme)
foreach ($params['postlist'] as $index => $item) {
//如果没有创建数值($项目[名单],序列化的($配置[打开组]))
if(!in_array($item['groupid'], unserialize($config['opengroups']))) {
//持续
continue; }
//如果($config[第一] !$item[第一])是一样的
if($config['first'] && !$item['first']) {
//持续执行
continue; }
//$user = 合并作用域t(#xigua_re#xgre_user)指向 取来_使用者($item[作者])
$user = C::t('#xigua_re#xgre_user')->fetch_user($item['authorid']);
//如果(!$user[打开id])
if(!$user['openid']){
//如果($config[需要开放id])
if($config['needopenid']) {
//持续执行
continue; } }
//如果$user[信息]
if(!$user['word']){
//$user[信息] = $config[之前信息]
$user['word'] = $config['preword']; }
//$subject = $params[线][主题]?网址编码($params[线][主题]):网址编码($item[最近的注释])
$subject = $params['thread']['subject'] ? urlencode($params['thread']['subject']) : urlencode($item['recentnote']);
//$subjest = 字符串_替换(创建数组(
$subject = str_replace(array(
// \ 回车 空格 跳格(移至下一列)
'\, "\n", "\r", "\t", " ", " " ), , $subject);
$postid = 'pid_'.$item['pid']; $tid = $item['tid'];
$imgs = $reilist = ;
// 取来_使用者计数_通过_放入用户
$count = C::t('#xigua_re#xgre_order')->fetch_usercount_by_postid($postid);
if($count){
// 取来_使用者_通过_放入id
$list = C::t('#xigua_re#xgre_order')->fetch_user_by_postid($postid); foreach ($list as $itm) {
// 风格 = 陈列:排成行-立方体;边缘: 竖的-排列:顶部 风格 宽度 高度 显示 立方体 边缘 站点 来源
$imgs .= "}
$count = "<a style='color:#627C97;font-size:16px' href=\"{$_G['siteurl']}plugin.php?id=xigua_re:list&uid={$item['authorid']}&tid=$tid&postid=$postid\">$count</a>"; $reilist = "
{$count}$ren$config[linkword]
- $imgs
";
}
$params['postlist'][ $index ]['message'] = $params['postlist'][ $index ]['message'].
//风格 = 字体大小 灰色 //风格 = 宽度:100%;填充:8px 0 25px;:水平_对齐:居中
<<<HTML
$reilist HTML;
} } function profile_extraInfo() { global $_G;$config = $_G['cache']['plugin']['xigua_