js代码在IE下不兼容 代码如下:<a href="javascript:void(0);" onclick="previewThread(\''.$result[tid].'\' , \'normalthread_'.$result[tid].'\');" class="getall">'.$_G['cache']['plugin']['geiih_getsum']['getall'].'</a>';截图: 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不好意思,忘了写明白了!就是在ie下点击:查看全文 无效 在火狐下一切正常!地址:www.wodishen.com previewThread 是怎么写的? <tbody id="normalthread_5"> 表格能整体替换吗? <?phpclass plugin_geiih_getsum { function plugin_geiih_getsum() { global $_G; return; } }class plugin_geiih_getsum_forum extends plugin_geiih_getsum{ function forumdisplay_threadtype_extra_output(){ global $_G; $openfumpr = (array)unserialize($_G['cache']['plugin']['geiih_getsum']['openfumpr']); $open=in_array('', $openfumpr) ? TRUE : (in_array($_G['fid'], $openfumpr) ? TRUE : FALSE); if($open){ $return='<link href="source/plugin/geiih_getsum/template/css/geiih_getsum.css" type="text/css" rel="stylesheet">'; if(!empty($_G['cache']['plugin']['geiih_getsum']['ghmystyle'])){ $return.='<style>'.$_G['cache']['plugin']['geiih_getsum']['ghmystyle'].'</style>'; } return $return; }}function forumdisplay_thread_subject_output(){ global $_G,$thread; $openfumpr = (array)unserialize($_G['cache']['plugin']['geiih_getsum']['openfumpr']); $open=in_array('', $openfumpr) ? TRUE : (in_array($_G['fid'], $openfumpr) ? TRUE : FALSE); if($open){ require_once libfile('function/post'); foreach($_G['forum_threadlist'] as $thread){ $tidarr[]=$thread[tid]; } if($_G['cache']['plugin']['geiih_getsum']['ghprnum'] !=0){ $ghprnumx = $_G['cache']['plugin']['geiih_getsum']['ghprnum']; } else { $ghprnumx = 300; } if($_G['cache']['plugin']['geiih_getsum']['ghimgwidth'] !=0){ $ghimgwd = $_G['cache']['plugin']['geiih_getsum']['ghimgwidth'].'px'; } else { $ghimgwd = '145px'; } if($_G['cache']['plugin']['geiih_getsum']['ghimgheight'] !=0){ $ghimght = $_G['cache']['plugin']['geiih_getsum']['ghimgheight'].'px'; } else { $ghimght = '145px'; } if($_G['cache']['plugin']['geiih_getsum']['openshare'] !=0){ $sharethis = '<div class="sharethis">'.$_G['cache']['plugin']['geiih_getsum']['sharecode'].'</div>'; } $query = DB::query("SELECT tid,message FROM ".DB::table("forum_post")." WHERE first=1 and tid in (".dimplode($tidarr).")"); while($result = DB::fetch($query)) { if(strlen($result['message'])> $ghprnumx){ $messagearr[$result[tid]]=messagecutstr($result['message'],$ghprnumx).'<a href="javascript:void(0);" onclick="previewThread(\''.$result[tid].'\' , \'normalthread_'.$result[tid].'\');" class="getall">'.$_G['cache']['plugin']['geiih_getsum']['getall'].'</a>'; } else { $messagearr[$result[tid]]=messagecutstr($result['message']); }}foreach($_G['forum_threadlist'] as $thread){ $ghimglistnum= $_G['cache']['plugin']['geiih_getsum']['ghprimgnum']; $ghimglist=''; if($_G['cache']['plugin']['geiih_getsum']['openlzhd'] != 0){ if($thread[authorid] !=0){ $lzhead = '<a target="_blank" c="1" href="home.php?mod=space&uid='.$thread[authorid].'">'.avatar($thread['authorid'], 'small').'<em>'.$thread[author].'</em></a>'; }else{ $lzhead = ''.avatar($post['authorid'], 'small').'<em>'.$_G['cache']['plugin']['geiih_getsum']['nouser'].'</em></a>'; } } if ($thread['attachment'] == 2){ $ghimglist='<div class="getsumyimg">'; $query = DB::query("SELECT aid, attachment from ".DB::table(getattachtablebytid($thread[tid]))." WHERE tid =".$thread[tid]." and width>0 and width<2000 limit $ghimglistnum"); while($tmp = DB::fetch($query)) { $attachmenturl=$tmp['attachment']; if(!file_exists("data/attachment/forum/".$tmp['attachment']."")) { //$tmp['attachment'] = $_G['setting']['attachurl'].'forum/'.$tmp['attachment']; thumb_images($tmp['attachment'],$tmp['aid']); } $ghimglist.='<div><a target="_blank" href="forum.php?mod=viewthread&tid='.$thread[tid].'"><img src="'.$_G['setting']['attachurl'].'forum/'.$tmp['attachment'].'" style="max-width:'.$ghimgwd.';max-height:'.$ghimght.';"></a></div>'; } $ghimglist.='</div>'; } if($_G['cache']['plugin']['geiih_getsum']['lastposter'] != 0){ if($thread[authorid] !=0){ $lastposters = '<em id="lastpostmore"><span title="'.$_G['cache']['plugin']['geiih_getsum']['lastpostname'].'">'.$thread[lastposter].'</span><span class="lasttime"><a target="_blank" style="color:#999" href="forum.php?mod=redirect&tid='.$thread['tid'].'&goto=lastpost#lastpost"><span title="">'.$thread[lastpost].'</a></span></em>'; }else{ $lastposters = '<em id="lastpostmore"><span title="'.$_G['cache']['plugin']['geiih_getsum']['lastpostname'].'">'.$_G['cache']['plugin']['geiih_getsum']['nouser'].'</span><span class="lasttime"><a target="_blank" style="color:#999" href="forum.php?mod=redirect&tid='.$thread['tid'].'&goto=lastpost#lastpost"><span title="">'.$thread[lastpost].'</a></span></em>'; } } if($_G['cache']['plugin']['geiih_getsum']['getsimple'] !=0){ $imgthreadlist[]='<div class="gh_getsumy cl">'.$sharethis.'<div class="cl mrt"><div class="simpleview z"><div class="getsumytext" style="color:'.$_G['cache']['plugin']['geiih_getsum']['prcolor'].'">'.$messagearr[$thread[tid]].'</div>'.$ghimglist.'</div><div class="cl getmore y"><div class="simhd">'.$lzhead.'</div><div class="tmadrp">'.$thread[dateline].' <a onclick="showWindow(\'reply\', \'forum.php?mod=post&action=reply&fid='.$thread[tid].'&tid='.$thread[tid].'\')" href="javascript:;" \>'.$_G['cache']['plugin']['geiih_getsum']['myreply'].'('.$thread[replies].')</a></div><div class="cl smiple">'.$lastposters.'</div></div></div></div>'; }else{ $imgthreadlist[]='<div class="gh_getsumy">'.$sharethis.'<div class="getsumytext" style="color:'.$_G['cache']['plugin']['geiih_getsum']['prcolor'].'">'.$messagearr[$thread[tid]].'</div>'.$ghimglist.'<div class="cl getmore"><div class="z">'.$lzhead.'</div><!-- Baidu Button BEGIN --><div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"><a class="bds_qzone"></a><a class="bds_tsina"></a><a class="bds_tqq"></a><a class="bds_renren"></a><a class="bds_t163"></a><span class="bds_more">更多</span><a class="shareCount"></a></div><script type="text/javascript" id="bdshare_js" data="type=tools&uid=464938" ></script><script type="text/javascript" id="bdshell_js"></script><script type="text/javascript">document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)</script><!-- Baidu Button END --><div class="y tmadrp">'.$thread[dateline].' <a onclick="showWindow(\'reply\', \'forum.php?mod=post&action=reply&fid='.$thread[tid].'&tid='.$thread[tid].'\')" href="javascript:;" \>'.$_G['cache']['plugin']['geiih_getsum']['myreply'].'('.$thread[replies].')</a>'.$lastposters.'</div></div></div>';}} return $imgthreadlist; } } }function thumb_images($source,$imgname){ global $_G; require_once DISCUZ_ROOT.'./source/class/class_image.php'; $image = new image();//showmessage(DISCUZ_ROOT.'./'.$_POST['typeoption']['baoliaoimg']['url']); $isthumb = $image->Thumb( $_G['setting']['attachurl'].'forum/'.$source, 'forum/'.$source.'.privew.jpg', 145, 145, 2); if(!$isthumb) { $thumbtarget = 'data/attachment/common/imgthreadlist/imgthreadlist_'.$imgname.'.jpg'; $isthumb = @copy($source, $thumbtarget); }}?> 你的 previewThread 不是 js 函数吗?贴 php 代码做什么? previewThread 应该不是js函数吧 我没发现js文件 不是很懂 <a href="javascript:void(0);" onclick="previewThread(\''.$result[tid].'\' , \'normalthread_'.$result[tid].'\');" class="getall">'.$_G['cache']['plugin']['geiih_getsum']['getall'].'</a>';这还能是 php 函数? 可是没有js文件嗯,就是那段php代码嗯 您qq多少啊 function previewThread你在你網站的所在目錄內搜索上邊的這一串內容,js不兼容和你的php代碼一點關係都沒有. 好像和js代码冲突了 但是我不会弄了PHP運行在遠程的服務器上,js運行在訪問者的電腦上,距離何其遠,如何衝突? 什么是PHP? 急聘PHP高级工程师 管理员手下留情 由于系统缓冲区空间不足或队列已满,不能执行套接字上的操作 一个简单shell,不按套路来,谁帮看一下 php如何读取xml文件标签中嵌套标签里的值 像起点女生网这样的网站后台数据库是怎么设计的 ecmall+uchome问题 函数赋参数问题 thinkphp的源代码 php curl post 获取接口token,在本地速度很快,为什么放到线上就非常慢,将近10 秒才返回数据。 网站经常爆FastCGI Error的错误?麻烦大牛进来看看 wordpress隐藏了一类文章如何让分页不计入
class plugin_geiih_getsum {
function plugin_geiih_getsum() {
global $_G;
return;
}
}class plugin_geiih_getsum_forum extends plugin_geiih_getsum{
function forumdisplay_threadtype_extra_output(){
global $_G;
$openfumpr = (array)unserialize($_G['cache']['plugin']['geiih_getsum']['openfumpr']);
$open=in_array('', $openfumpr) ? TRUE : (in_array($_G['fid'], $openfumpr) ? TRUE : FALSE);
if($open){
$return='<link href="source/plugin/geiih_getsum/template/css/geiih_getsum.css" type="text/css" rel="stylesheet">';
if(!empty($_G['cache']['plugin']['geiih_getsum']['ghmystyle'])){
$return.='<style>'.$_G['cache']['plugin']['geiih_getsum']['ghmystyle'].'</style>';
}
return $return;
}
}
function forumdisplay_thread_subject_output(){
global $_G,$thread;
$openfumpr = (array)unserialize($_G['cache']['plugin']['geiih_getsum']['openfumpr']);
$open=in_array('', $openfumpr) ? TRUE : (in_array($_G['fid'], $openfumpr) ? TRUE : FALSE);
if($open){
require_once libfile('function/post');
foreach($_G['forum_threadlist'] as $thread){
$tidarr[]=$thread[tid];
}
if($_G['cache']['plugin']['geiih_getsum']['ghprnum'] !=0){
$ghprnumx = $_G['cache']['plugin']['geiih_getsum']['ghprnum'];
}
else
{
$ghprnumx = 300;
}
if($_G['cache']['plugin']['geiih_getsum']['ghimgwidth'] !=0){
$ghimgwd = $_G['cache']['plugin']['geiih_getsum']['ghimgwidth'].'px';
}
else
{
$ghimgwd = '145px';
}
if($_G['cache']['plugin']['geiih_getsum']['ghimgheight'] !=0){
$ghimght = $_G['cache']['plugin']['geiih_getsum']['ghimgheight'].'px';
}
else
{
$ghimght = '145px';
}
if($_G['cache']['plugin']['geiih_getsum']['openshare'] !=0){
$sharethis = '<div class="sharethis">'.$_G['cache']['plugin']['geiih_getsum']['sharecode'].'</div>';
}
$query = DB::query("SELECT tid,message FROM ".DB::table("forum_post")." WHERE first=1 and tid in (".dimplode($tidarr).")");
while($result = DB::fetch($query)) {
if(strlen($result['message'])> $ghprnumx){
$messagearr[$result[tid]]=messagecutstr($result['message'],$ghprnumx).'<a href="javascript:void(0);" onclick="previewThread(\''.$result[tid].'\' , \'normalthread_'.$result[tid].'\');" class="getall">'.$_G['cache']['plugin']['geiih_getsum']['getall'].'</a>';
}
else {
$messagearr[$result[tid]]=messagecutstr($result['message']);
}
}foreach($_G['forum_threadlist'] as $thread){ $ghimglistnum= $_G['cache']['plugin']['geiih_getsum']['ghprimgnum'];
$ghimglist='';
if($_G['cache']['plugin']['geiih_getsum']['openlzhd'] != 0){
if($thread[authorid] !=0){
$lzhead = '<a target="_blank" c="1" href="home.php?mod=space&uid='.$thread[authorid].'">'.avatar($thread['authorid'], 'small').'<em>'.$thread[author].'</em></a>';
}else{
$lzhead = ''.avatar($post['authorid'], 'small').'<em>'.$_G['cache']['plugin']['geiih_getsum']['nouser'].'</em></a>';
}
}
if ($thread['attachment'] == 2){
$ghimglist='<div class="getsumyimg">';
$query = DB::query("SELECT aid, attachment from ".DB::table(getattachtablebytid($thread[tid]))." WHERE tid =".$thread[tid]." and width>0 and width<2000 limit $ghimglistnum");
while($tmp = DB::fetch($query)) {
$attachmenturl=$tmp['attachment'];
if(!file_exists("data/attachment/forum/".$tmp['attachment']."")) {
//$tmp['attachment'] = $_G['setting']['attachurl'].'forum/'.$tmp['attachment'];
thumb_images($tmp['attachment'],$tmp['aid']);
}
$ghimglist.='<div><a target="_blank" href="forum.php?mod=viewthread&tid='.$thread[tid].'"><img src="'.$_G['setting']['attachurl'].'forum/'.$tmp['attachment'].'" style="max-width:'.$ghimgwd.';max-height:'.$ghimght.';"></a></div>';
}
$ghimglist.='</div>';
}
if($_G['cache']['plugin']['geiih_getsum']['lastposter'] != 0){
if($thread[authorid] !=0){
$lastposters = '<em id="lastpostmore"><span title="'.$_G['cache']['plugin']['geiih_getsum']['lastpostname'].'">'.$thread[lastposter].'</span><span class="lasttime"><a target="_blank" style="color:#999" href="forum.php?mod=redirect&tid='.$thread['tid'].'&goto=lastpost#lastpost"><span title="">'.$thread[lastpost].'</a></span></em>';
}else{
$lastposters = '<em id="lastpostmore"><span title="'.$_G['cache']['plugin']['geiih_getsum']['lastpostname'].'">'.$_G['cache']['plugin']['geiih_getsum']['nouser'].'</span><span class="lasttime"><a target="_blank" style="color:#999" href="forum.php?mod=redirect&tid='.$thread['tid'].'&goto=lastpost#lastpost"><span title="">'.$thread[lastpost].'</a></span></em>';
}
}
if($_G['cache']['plugin']['geiih_getsum']['getsimple'] !=0){
$imgthreadlist[]='<div class="gh_getsumy cl">'.$sharethis.'<div class="cl mrt"><div class="simpleview z"><div class="getsumytext" style="color:'.$_G['cache']['plugin']['geiih_getsum']['prcolor'].'">'.$messagearr[$thread[tid]].'</div>'.$ghimglist.'</div><div class="cl getmore y"><div class="simhd">'.$lzhead.'</div><div class="tmadrp">'.$thread[dateline].' <a onclick="showWindow(\'reply\', \'forum.php?mod=post&action=reply&fid='.$thread[tid].'&tid='.$thread[tid].'\')" href="javascript:;" \>'.$_G['cache']['plugin']['geiih_getsum']['myreply'].'('.$thread[replies].')</a></div><div class="cl smiple">'.$lastposters.'</div></div></div></div>';
}else{
$imgthreadlist[]='<div class="gh_getsumy">'.$sharethis.'<div class="getsumytext" style="color:'.$_G['cache']['plugin']['geiih_getsum']['prcolor'].'">'.$messagearr[$thread[tid]].'</div>'.$ghimglist.'<div class="cl getmore"><div class="z">'.$lzhead.'</div><!-- Baidu Button BEGIN -->
<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
<a class="bds_qzone"></a>
<a class="bds_tsina"></a>
<a class="bds_tqq"></a>
<a class="bds_renren"></a>
<a class="bds_t163"></a>
<span class="bds_more">更多</span>
<a class="shareCount"></a>
</div>
<script type="text/javascript" id="bdshare_js" data="type=tools&uid=464938" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<!-- Baidu Button END --><div class="y tmadrp">'.$thread[dateline].' <a onclick="showWindow(\'reply\', \'forum.php?mod=post&action=reply&fid='.$thread[tid].'&tid='.$thread[tid].'\')" href="javascript:;" \>'.$_G['cache']['plugin']['geiih_getsum']['myreply'].'('.$thread[replies].')</a>'.$lastposters.'</div></div></div>';}
}
return $imgthreadlist;
}
}
}
function thumb_images($source,$imgname){
global $_G;
require_once DISCUZ_ROOT.'./source/class/class_image.php';
$image = new image();//showmessage(DISCUZ_ROOT.'./'.$_POST['typeoption']['baoliaoimg']['url']);
$isthumb = $image->Thumb( $_G['setting']['attachurl'].'forum/'.$source, 'forum/'.$source.'.privew.jpg', 145, 145, 2);
if(!$isthumb) {
$thumbtarget = 'data/attachment/common/imgthreadlist/imgthreadlist_'.$imgname.'.jpg';
$isthumb = @copy($source, $thumbtarget);
}
}
?>
这还能是 php 函数?
你在你網站的所在目錄內搜索上邊的這一串內容,js不兼容和你的php代碼一點關係都沒有.
PHP運行在遠程的服務器上,js運行在訪問者的電腦上,距離何其遠,如何衝突?