| 本帖最后由 新物理 于 2010-4-5 23:31 编辑 
 由于supesite7.5资讯不能上传图片附件,首页和资讯页的右上角都会看到一片空白。目前还没有更好的插件。只能调用discuz里的图片附件。
 懒得动手的同志可以在本帖尾下载我修改好的,然后替换默认文件就行了。
 想学习修改方法的且看本帖介绍:
 
 
 一、用记事本打开"/templates/default/bbs_index.html.php"然后找到并复制如下代码:
 二.复制代码                        <!--图片附件-->
                        <!--{block name="bbsattachment" parameter="filetype/image/t_lastpost/2592000/order/t.replies DESC/limit/0,11/cachetime/49900/cachename/picthread/tpl/data"}-->
                        <!--{if !empty($_SBLOCK['picthread'])}-->
                        <!--{eval $picthread = @array_slice($_SBLOCK['picthread'], 0 , 5)}-->
                        <!--{/if}-->
                        <div id="focus_turn">
                                <!--{if !empty($picthread)}-->
                                <ul id="focus_pic">
                                        <!--{eval $j = 0}-->
                                        <!--{loop $picthread $pkey $pvalue}-->
                                        <!--{eval $pcurrent = ($j == 0 ? 'current' : 'normal');}-->
                                        <li class="$pcurrent"><a href="$pvalue[url]" target="_blank"><img src="$pvalue['attachment']" alt="" /></a></li>
                                        <!--{eval $j++}-->
                                        <!--{/loop}-->
                                </ul>
                                <ul id="focus_tx">
                                        <!--{eval $i = 0}-->
                                        <!--{loop $picthread $key $value}-->
                                        <!--{eval $current = ($i == 0 ? 'current' : 'normal');}-->
                                        <li class="$current"><a href="$value[url]">$value[subject]</a></li>
                                        <!--{eval $i++}-->
                                        <!--{/loop}-->
                                </ul>
                                <div id="focus_opacity"></div>
                                <!--{/if}-->
                        </div><!--focus_turn end-->
1.修改首页。
 用以上代码替换“/templates/default/index.html.php”中的如下代码:
 2.修改资讯页。复制代码                <!--{block name="spacenews" parameter="haveattach/2/order/i.dateline DESC/limit/0,4/cachetime/83400/subjectlen/40/subjectdot/0/cachename/hotnewspic"}-->
                <div id="focus_turn">
                        <!--{if !empty($_SBLOCK['hotnewspic'])}-->
                        <ul id="focus_pic">
                                <!--{eval $j = 0}-->
                                <!--{loop $_SBLOCK['hotnewspic'] $pkey $pvalue}-->
                                <!--{eval $pcurrent = ($j == 0 ? 'current' : 'normal');}-->
                                <li class="$pcurrent"><a href="$pvalue[url]"><img src="$pvalue['a_filepath']" alt="" /></a></li>
                                <!--{eval $j++}-->
                                <!--{/loop}-->
                        </ul>
                        <ul id="focus_tx">
                                <!--{eval $i = 0}-->
                                <!--{loop $_SBLOCK['hotnewspic'] $key $value}-->
                                <!--{eval $current = ($i == 0 ? 'current' : 'normal');}-->
                                <li class="$current"><a href="$value[url]" title="$value[subjectall]">$value[subject]</a></li>
                                <!--{eval $i++}-->
                                <!--{/loop}-->
                        </ul>
                        <div id="focus_opacity"></div>
                        <!--{/if}-->
                </div><!--focus_turn end-->
把第一步复制的代码替换“/templates/default/news_index.html.php”中的如下代码:
 点击下载修改好的文件:复制代码                        <div id="focus_turn">
                        <!--{if !empty($_SBLOCK['picnews'])}-->
                        <!--{eval $picnews = @array_slice($_SBLOCK['picnews'], 0, 5);}-->
                                <ul id="focus_pic">
                                        <!--{eval $j = 0}-->
                                        <!--{loop $picnews $pkey $pvalue}-->
                                        <!--{eval $pcurrent = ($j == 0 ? 'current' : 'normal');}-->
                                        <li class="$pcurrent"><a href="#action/viewnews/itemid/$pvalue[itemid]#"><img src="$pvalue['a_filepath']" alt="$pvalue[subject]" /></a></li>
                                        <!--{eval $j++}-->
                                        <!--{/loop}-->
                                </ul>
                                <ul id="focus_tx">
                                        <!--{eval $i = 0}-->
                                        <!--{loop $picnews $key $value}-->
                                        <!--{eval $current = ($i == 0 ? 'current' : 'normal');}-->
                                        <li class="$current"><a href="$value[url]">$value[subject]</a></li>
                                        <!--{eval $i++}-->
                                        <!--{/loop}-->
                                </ul>
                                <div id="focus_opacity"></div>
                        <!--{/if}-->
                        </div><!--focus_turn end-->
 supesite首页和资讯调用DZ图片附件插件.rar
(5.93 KB, 下载次数: 570) 
 
 插件演示网站:
 首页:http://www.xinwuli.cn
 资讯:http://www.xinwuli.cn/?action-news
 |