Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

首页n格的问题整理与解决[最后更新:2007.11.05 JS调用附件]

[复制链接]
hong5305 发表于 2007-11-17 20:44:07 | 显示全部楼层
新問題~
我發貼,然後選擇了高亮顯示,可是首頁四格上並沒有高亮顯示
Q是別人的首頁四格

Q2是我的首頁四格,紅框划起來的就是我有高亮的主題,可是在首頁四個沒有出現

Q:


Q2:


網址:
http://forum.lb662927.com

希望能解決~謝謝大大
回复

使用道具 举报

习明 发表于 2007-11-18 13:15:21 | 显示全部楼层

回复 553# 的帖子

和你所装的四格有关 有些版本有高亮的显示 有些没有
回复

使用道具 举报

youways.com 发表于 2007-11-18 20:34:58 | 显示全部楼层
如果修改了图片的默认存储路径,即使用js调用图片显示,似乎还是有点问题。
回复

使用道具 举报

习明 发表于 2007-11-19 23:37:51 | 显示全部楼层

回复 555# 的帖子

应该需要同时修改图片调用的地址
回复

使用道具 举报

yuehong 发表于 2007-11-20 21:53:27 | 显示全部楼层
https://discuz.dismall.com/viewth ... p;extra=&page=2
习明兄,我使用这个多格后,首页图片调用不正常,只显示原来的几张图片。后来发的图都不会在首页上显示。麻烦你指点一下。谢谢!

这是图片调用代码:
<?php
//---设置---start
$shownums = 5;                                                //演示个数,超过6则无法使用导航条.
$searchnums = 30;                                        //搜索总数.
$cachelife = 1800;                                //按照自己的实际情况设置,默认为1800秒.
$orderby = 'dateline';                //搜索顺序.按照日期搜索输入dateline.按照浏览次数输入downloads.随机搜索请输入rand.
$cachename = 'showpic';                //缓存名.若与其他插件冲突请修改,只要不冲突不会影响使用.
$searchfid = '';                                        //搜索范围.不限制留空.请用逗号相隔,如'1,2,3'.
//---设置---end

require_once ('../include/common.inc.php');
include_once (DISCUZ_ROOT . 'forumdata/cache/cache_' . $cachename . '.php');
if((@!include(DISCUZ_ROOT . 'forumdata/cache/cache_'.$cachename . '.php')) || $expiration < time() || $cacheshownums != $shownums || $cachesearchnums != $searchnums || $cachecachelife != $cachelife || $cacheorderby != $orderby || $cachecachename != $cachename || $cachesearchfid != $searchfid){
        $orderbytmp = $orderby != 'rand' ? 'attach.'.$orderby : 'rand()';
        $fids = $searchfid ? 'AND '."t.fid IN ($searchfid)" : '';
        $data = array();
        $query = $db->query("SELECT attach.aid, attach.attachment, t.tid, t.fid, t.subject FROM {$tablepre}attachments attach LEFT JOIN {$tablepre}threads t ON t.displayorder>=0 AND t.tid=attach.tid WHERE attach.readperm='0' AND displayorder>='0' AND filetype='image/pjpeg' $fids GROUP BY attach.tid ORDER BY $orderbytmp DESC LIMIT $searchnums");
        $num = 0;
        while ($pic = $db->fetch_array($query)) {
                $data['pic'][$num]['showpicpics'] = $attachurl.'/'.$pic['attachment'];
                $data['pic'][$num]['showpiclinks'] = "viewthread.php?tid=$pic[tid]";
                $data['pic'][$num]['showpictexts'] = str_replace('\'', '&nbsp;',$pic['subject']);
                $num++;
        }
        $data['expiration'] = $cachelife + time();
        $data['cacheshownums'] = $shownums;
        $data['cachesearchnums'] = $searchnums;
        $data['cachecachelife'] = $cachelife;
        $data['cacheorderby'] = $orderby;
        $data['cachecachename'] = $cachename;
        $data['cachesearchfid'] = $searchfid;
        require_once (DISCUZ_ROOT . 'include/cache.func.php');
        writetocache($cachename, '', getcachevars($data));
        include(DISCUZ_ROOT . 'forumdata/cache/cache_' . $cachename . '.php');
}

shuffle($pic);
$i = 0;
$j = 0;
while ($j < $shownums && isset($pic[$i])) {
        if(is_readable('../' . $pic[$i]['showpicpics'])) {
                $showpicpics .= $comma.$pic[$i]['showpicpics'];
                $showpiclinks .= $comma.$pic[$i]['showpiclinks'];
                $showpictexts .= $comma.$pic[$i]['showpictexts'];
                $comma = '|';
                $j++;
        }
        $i++;
}
?>
var swf_width=240
var swf_height=175
var files = '<?=$showpicpics?>';
var links = '<?=$showpiclinks?>';
var texts = '<?=$showpictexts?>';
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="toplist/images/focus.swf"><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'">');
document.write('<embed src="toplist/images/focus.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
回复

使用道具 举报

kunlun 发表于 2007-11-20 22:28:30 | 显示全部楼层

求助:我用的首页六格,想把今日发帖改为本周发贴,应该如何改

$tomonth=date(n);
$todate=date(j);
$toyear=date(Y);
$time=mktime(0,7,0,$tomonth,$todate,$toyear);
$query=$db->query("select count(pid) as num,authorid,author from $tablepre"."posts where dateline>=$time group by authorid order by num desc limit 0,15");
while($result=$db->fetch_array($query)){
        $poststar.="<div style=\"overflow: hidden;height: 20px;width: 100%;\"><a href=space.php?uid=".$result[authorid].">".cutstr($result[author],8)."</a><font color=red>[".$result[num]."]</font></div>";
}

怎么把今天的数据改成最近一个星期的啊,因为论坛访问量小,所以说当天数据太小,请指教
回复

使用道具 举报

kunlun 发表于 2007-11-20 22:31:36 | 显示全部楼层

$time=mktime(0,7,0,$tomonth,$todate,$toyear);应该是

$time=mktime(0,0,0,$tomonth,$todate,$toyear);
回复

使用道具 举报

暗黑ぷ魔龙 发表于 2007-11-21 00:46:26 | 显示全部楼层
直接上传后,访问提示
Parse error: parse error, unexpected '}' in e:\hosting\wwwroot\xpcbbs_cn\htdocs\forumdata\templates\1_discuz.tpl.php on line 285
请解决,谢谢
回复

使用道具 举报

习明 发表于 2007-11-21 01:06:52 | 显示全部楼层

回复 557# 的帖子

你使用的是缓存版 应该不会立刻更新 等一段时间或者后台更新缓存试试
回复

使用道具 举报

习明 发表于 2007-11-21 01:08:13 | 显示全部楼层
  1. $tomonth=date(n);
  2. $todate=date(j);
  3. $toyear=date(Y);
  4. $time=mktime(0,7,0,$tomonth,$todate,$toyear);
复制代码
改成
  1. $time = $timestamp - 7*24*3600;
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-23 00:37 , Processed in 0.100775 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表