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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[发布] discuz2.5最新瀑布流修改方法!

[复制链接]
戀傷 发表于 2013-4-16 22:40:31 | 显示全部楼层 |阅读模式
演示地址
http://www.zhcne.com/forum-40-1.html


修改步骤:
一、打开你使用的模板下common目录中的common.css或者extend_common.css,在最下面添加
  1. /* 瀑布流布局 by Pony 站帮网(<A >www.zhanhelp.com</A>)提供 */
  2. .waterfall { position: relative; margin-top: 15px; }
  3.         .waterfall li { margin: 0 10px 10px 0; padding: 0 0 3px; text-align: left; border-width: 1px 0 0; border-top: 1px solid #EAEAEA; background: url({STYLEIMGDIR}/bg_waterfall.png) no-repeat 100% 100%; }
  4.         .waterfall .c, .waterfall h3 { padding: 10px; border: solid #EAEAEA; border-width: 0 1px; background-color: #F8F8F8; }
  5.                 .waterfall .c { overflow: hidden; padding-bottom: 0; max-height: 800px; }
  6.                 .waterfall .c .nopic { display: block; background:{WRAPBG} url({IMGDIR}/nophototiny.png) no-repeat 50% 50%; cursor: pointer; }
  7.         .waterfall .auth { padding: 0 10px 10px; border-width: 0 1px 1px; border-style: solid; border-color: transparent #EAEAEA #B9B9B9; background: #F8F8F8; }
  8.                 .waterfall .auth img { display: inline-block; margin: 0 1px; }
复制代码
二、打开使用模板中的forum目录下的forumdisplay_list.htm文件,查找代码
  1. <ul class="ml mlt mtw cl">
  2.                                                         <!--{loop $$$$_G['forum_threadlist'] $$$$key $$$$thread}-->
  3.                                                         <!--{if !$$$$thread['forumstick'] && ($$$$thread['isgroup'] == 1 || $$$$thread['fid'] != $$$$_G['fid'])}-->
  4.                                                                 <!--{if $$$$thread['related_group'] == 0 && $$$$thread['closed'] > 1}-->
  5.                                                                         <!--{eval $$$$thread[tid]=$$$$thread[closed];}-->
  6.                                                                 <!--{/if}-->
  7.                                                         <!--{/if}-->
  8.                                                         <li style="width:{$$$$_G[setting][forumpicstyle][thumbwidth]}px;">
  9.                                                                 <!--{if !$$$$_GET['archiveid'] && $$$$_G['forum']['ismoderator']}-->
  10.                                                                         <div style="position: absolute;padding:2px;background:#FFF">
  11.                                                                         <!--{if $$$$thread['fid'] == $$$$_G[fid]}-->
  12.                                                                                 <!--{if $$$$thread['displayorder'] <= 3 || $$$$_G['adminid'] == 1}-->
  13.                                                                                         <input onclick="tmodclick(this)" type="checkbox" name="moderate[]" value="$$$$thread[tid]" />
  14.                                                                                 <!--{else}-->
  15.                                                                                         <input type="checkbox" disabled="disabled" />
  16.                                                                                 <!--{/if}-->
  17.                                                                         <!--{else}-->
  18.                                                                                 <input type="checkbox" disabled="disabled" />
  19.                                                                         <!--{/if}-->
  20.                                                                         </div>
  21.                                                                 <!--{/if}-->
  22.                                                                 <div class="c cl">
  23.                                                                         <a href="forum.php?mod=viewthread&tid=$$$$thread[tid]&{if $$$$_GET['archiveid']}archiveid={$$$$_GET['archiveid']}&{/if}extra=$$$$extra" {if $$$$thread['isgroup'] == 1 || $$$$thread['forumstick'] || CURMODULE == 'guide'} target="_blank"{else} onclick="atarget(this)"{/if} title="$$$$thread[subject]" class="z">
  24.                                                                                 <!--{if $$$$thread['cover']}-->
  25.                                                                                         <img src="$$$$thread[coverpath]" alt="$$$$thread[subject]" width="{$$$$_G[setting][forumpicstyle][thumbwidth]}" height="{$$$$_G[setting][forumpicstyle][thumbheight]}" />
  26.                                                                                 <!--{else}-->
  27.                                                                                         <span class="nopic" style="width:{$$$$_G[setting][forumpicstyle][thumbwidth]}px; height:{$$$$_G[setting][forumpicstyle][thumbheight]}px;"></span>
  28.                                                                                 <!--{/if}-->
  29.                                                                         </a>
  30.                                                                 </div>
  31.                                                                 <h3 class="ptn" style="width: {$$$$_G[setting][forumpicstyle][thumbwidth]}px;">
  32.                                                                         <!--{hook/forumdisplay_thread $$$$key}-->
  33.                                                                         <!--{if in_array($$$$thread['displayorder'], array(1, 2, 3, 4))}--><em class="sum pin">{lang thread_stick}</em> <!--{/if}--><!--{if in_array($$$$thread['digest'], array(1, 2, 3))}--><em class="sum digest">{lang thread_digest}</em> <!--{/if}--><a href="forum.php?mod=viewthread&tid=$$$$thread[tid]&{if $$$$_GET['archiveid']}archiveid={$$$$_GET['archiveid']}&{/if}extra=$$$$extra"$$$$thread[highlight]{if $$$$thread['isgroup'] == 1 || $$$$thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} title="$$$$thread[subject]">$$$$thread[subject]</a>
  34.                                                                 </h3>
  35.                                                                 <div class="cl">
  36.                                                                         <!--{hook/forumdisplay_author $$$$key}-->
  37.                                                                         <!--{if $$$$thread['cover']}--><em class="sum y xs0 xi1 xw1" title="$$$$thread[cover] {lang pics}">$$$$thread[cover]</em><!--{/if}-->
  38.                                                                         <!--{if $$$$thread['authorid'] && $$$$thread['author']}-->
  39.                                                                                 <a href="home.php?mod=space&uid=$$$$thread[authorid]">$$$$thread[author]</a><!--{if !empty($$$$verify[$$$$thread['authorid']])}--> $$$$verify[$$$$thread[authorid]]<!--{/if}-->
  40.                                                                         <!--{else}-->
  41.                                                                                 $$$$_G[setting][anonymoustext]
  42.                                                                         <!--{/if}-->
  43.                                                                 </div>
  44.                                                                 <div class="cl">
  45.                                                                         <em class="y xs0"><a href="forum.php?mod=viewthread&tid=$$$$thread[tid]&extra=$$$$extra" class="xi2" title="$$$$thread[replies] {lang reply}">$$$$thread[replies]</a> / <em title="{if $$$$thread['isgroup'] != 1}$$$$thread[views]{else}{$$$$groupnames[$$$$thread[tid]][views]}{/if} {lang show}"><!--{if $$$$thread['isgroup'] != 1}-->$$$$thread[views]<!--{else}-->{$$$$groupnames[$$$$thread[tid]][views]}<!--{/if}--></em></em>
  46.                                                                         <em class="xs0{if $$$$thread['istoday']} xi1{/if}">$$$$thread[dateline]</em>
  47.                                                                 </div>
  48.                                                         </li>
  49.                                                         <!--{/loop}-->
  50.                                                 </ul>
复制代码
复制代码修改代替为[code]
<P><ul id="waterfall" class="ml waterfall cl">
                                                        <!--{loop $$$$_G['forum_threadlist'] $$$$key $$$$thread}-->
                                                        <!--{if !$$$$thread['forumstick'] && ($$$$thread['isgroup'] == 1 || $$$$thread['fid'] != $$$$_G['fid'])}-->
                                                                <!--{if $$$$thread['related_group'] == 0 && $$$$thread['closed'] > 1}-->
                                                                        <!--{eval $$$$thread[tid]=$$$$thread[closed];}-->
                                                                <!--{/if}-->
                                                        <!--{/if}-->
                                                        <!--{eval $$$$waterfallwidth = $$$$_G[setting][forumpicstyle][thumbwidth] + 24; }-->
                                                        <li style="width:{$$$$waterfallwidth}px;">
                                                                <!--{if !$$$$_GET['archiveid'] && $$$$_G['forum']['ismoderator']}-->
                                                                        <div style="position:absolute;margin:1px;padding:2px;background:#FFF">
                                                                        <!--{if $$$$thread['fid'] == $$$$_G[fid]}-->
                                                                                <!--{if $$$$thread['displayorder'] <= 3 || $$$$_G['adminid'] == 1}-->
                                                                                        <input onclick="tmodclick(this)" type="checkbox" name="moderate[]" value="$$$$thread[tid]" />
                                                                                <!--{else}-->
                                                                                        <input type="checkbox" disabled="disabled" />
                                                                                <!--{/if}-->
                                                                        <!--{else}-->
                                                                                <input type="checkbox" disabled="disabled" />
                                                                        <!--{/if}-->
                                                                        </div>
                                                                <!--{/if}-->
                                                                <div class="c cl">
                                                                        <a href="forum.php?mod=viewthread&tid=$$$$thread[tid]&{if $$$$_GET['archiveid']}archiveid={$$$$_GET['archiveid']}&{/if}extra=$$$$extra" {if $$$$thread['isgroup'] == 1 || $$$$thread['forumstick'] || CURMODULE == 'guide'} target="_blank"{else} onclick="atarget(this)"{/if} title="$$$$thread[subject]" class="z">
                                                                                <!--{if $$$$thread['cover']}-->
                                                                                        <img src="$$$$thread[coverpath]" alt="$$$$thread[subject]" width="{$$$$_G[setting][forumpicstyle][thumbwidth]}" />
                                                                                <!--{else}-->
                                                                                        <span class="nopic" style="width:{$$$$_G[setting][forumpicstyle][thumbwidth]}px; height:{$$$$_G[setting][forumpicstyle][thumbwidth]}px;"></span>
                                                                                <!--{/if}-->
                                                                        </a>
                                                                </div>
                                                                <h3 class="xw0">
                                                                        <!--{hook/forumdisplay_thread $$$$key}-->
                                                                        <a href="forum.php?mod=viewthread&tid=$$$$thread[tid]&{if $$$$_GET['archiveid']}archiveid={$$$$_GET['archiveid']}&{/if}extra=$$$$extra"$$$$thread[highlight]{if $$$$thread['isgroup'] == 1 || $$$$thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} title="$$$$thread[subject]">$$$$thread[subject]</a>
                                                                </h3>
                                                                <div class="auth cl">
                                                                        <cite class="xg1 y">
                                                                                {echo '喜欢'}: <!--{if $$$$thread[recommends]}-->$$$$thread[recommends]<!--{else}-->0<!--{/if}-->
                                                                                   {lang reply}: <a href="forum.php?mod=viewthread&tid=$$$$thread[tid]&extra=$$$$extra" title="$$$$thread[replies] {lang reply}">$$$$thread[replies]</a>
                                                                        </cite>
                                                                        <!--{hook/forumdisplay_author $$$$key}-->
                                                                        <!--{if $$$$thread['authorid'] && $$$$thread['author']}-->
                                                                                <a href="home.php?mod=space&uid=$$$$thread[authorid]">$$$$thread[author]</a><!--{if !empty($$$$verify[$$$$thread['authorid']])}--> $$$$verify[$$$$thread[authorid]]<!--{/if}-->
                                                                        <!--{else}-->
                                                                                $$$$_G[setting][anonymoustext]
                                                                        <!--{/if}-->
                                                                </div>
                                                        </li>
                                                        <!--{/loop}-->
                                                </ul>
                                                <div id="tmppic" style="display: none;"></div>
                                                <script type="text/javascript" src="static/js/redef.js?{VERHASH}"></script>
                                                <script type="text/javascript" reload="1">
                                                var wf = {};</P>
<P>                                                _attachEvent(window, "load", function () {
                                                        if($$$$("waterfall")) {
                                                                wf = waterfall();
                                                        }</P>
<P>                                                        <!--{if $$$$page < $$$$_G['page_next'] && !$$$$subforumonly}-->
                                                                var page = $$$$page + 1,
                                                                        maxpage = $$$$page + 10,
                                                                        stopload = 0,
                                                                        scrolltimer = null,
                                                                        tmpelems = [],
                                                                        tmpimgs = [],
                                                                        markloaded = [],
                                                                        imgsloaded = 0,
                                                                        loadready = 0,
                                                                        showready = 1,
                                                                        nxtpgurl = 'forum.php?mod=forumdisplay&fid={$$$$_G[fid]}&filter={$$$$filter}&orderby={$$$$_GET[orderby]}{$$$$forumdisplayadd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
ilei365 发表于 2013-4-16 22:59:20 | 显示全部楼层
演示图不错。。。
回复

使用道具 举报

 楼主| 戀傷 发表于 2013-4-16 23:25:23 | 显示全部楼层
ilei365 发表于 2013-4-16 22:59
演示图不错。。。

不要胡思乱想= =
回复

使用道具 举报

可爱的轩轩 发表于 2013-4-17 06:32:36 | 显示全部楼层
等X3.0出来看看有默认瀑布没
回复

使用道具 举报

 楼主| 戀傷 发表于 2013-4-17 06:34:15 | 显示全部楼层
可爱的轩轩 发表于 2013-4-17 06:32
等X3.0出来看看有默认瀑布没

貌似应该可能也许没有吧!
回复

使用道具 举报

gclbbs 发表于 2013-5-1 18:21:06 | 显示全部楼层
我的也不好使啊  弓长岭信息港
回复

使用道具 举报

gclbbs 发表于 2013-5-1 18:21:42 | 显示全部楼层
我的也不好使弓长岭信息港
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-22 17:22 , Processed in 0.135177 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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