- UID
- 1
- 主题
管理员
- CN币
- 币
- 威望
- 值
- 报料奖
- 元
- 贡献
- 值
- 回复
- 帖
- 日志
- 好友
- 帖子
- 主题
- 听众
- 收听
- 性别
- 保密
|
看见官方区很多同学都问其他模板里面可以使用Discuz官方图片区瀑布流吗?答案是可以的,下载我们分享下X2.5修改和实现的方法。
一、打开你使用的模板下common目录中的common.css或者extend_common.css,在最下面添加
- <P> /* 瀑布流布局 by Pony <SPAN class=STYLE1>常宁论坛</SPAN>(bbs.downzz.com)提供 */
- .waterfall { position: relative; margin-top: 15px; }
- .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%; }
- .waterfall .c, .waterfall h3 { padding: 10px; border: solid #EAEAEA; border-width: 0 1px; background-color: #F8F8F8; }
- .waterfall .c { overflow: hidden; padding-bottom: 0; max-height: 800px; }
- .waterfall .c .nopic { display: block; background:{WRAPBG} url({IMGDIR}/nophototiny.png) no-repeat 50% 50%; cursor: pointer; }
- .waterfall .auth { padding: 0 10px 10px; border-width: 0 1px 1px; border-style: solid; border-color: transparent #EAEAEA #B9B9B9; background: #F8F8F8; }
- .waterfall .auth img { display: inline-block; margin: 0 1px; }</P>
复制代码 二、打开使用模板中的forum目录下的forumdisplay_list.htm文件,查找代码
- </BLOCKQUOTE><ul class="ml mlt mtw 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}-->
- <li style="width:{$_G[setting][forumpicstyle][thumbwidth]}px;">
- <!--{if !$_GET['archiveid'] && $_G['forum']['ismoderator']}-->
- <div style="position: absolute;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]}" height="{$_G[setting][forumpicstyle][thumbheight]}" />
- <!--{else}-->
- <span class="nopic" style="width:{$_G[setting][forumpicstyle][thumbwidth]}px; height:{$_G[setting][forumpicstyle][thumbheight]}px;"></span>
- <!--{/if}-->
- </a>
- </div>
- <h3 class="ptn" style="width: {$_G[setting][forumpicstyle][thumbwidth]}px;">
- <!--{hook/forumdisplay_thread $key}-->
- <!--{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>
- </h3>
- <div class="cl">
- <!--{hook/forumdisplay_author $key}-->
- <!--{if $thread['cover']}--><em class="sum y xs0 xi1 xw1" title="$thread[cover] {lang pics}">$thread[cover]</em><!--{/if}-->
- <!--{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>
- <div class="cl">
- <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>
- <em class="xs0{if $thread['istoday']} xi1{/if}">$thread[dateline]</em>
- </div>
- </li>
- <!--{/loop}-->
- </ul></DIV>
- <P>修改替换为:</P>
- <DIV class=blockcode>
- <BLOCKQUOTE>
复制代码
|
|