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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 主题列表后面的图片如何前移

[复制链接]
hew001 发表于 2014-6-8 13:22:40 | 显示全部楼层 |阅读模式
问题描述
适用版本: Discuz! X2.5
浏览器: IE6 IE7 IE8 IE9 IE10 360 
使用模板: 官方模板
BUG地址: http://www.tip-tongue.cn


求教:如何将discuz后面的"美图"与图片修改成这种汽车之家这样的,精 图 显示在前面,
希望大神能来解决这个问题,相信有很多新手都需要你们的帮助,谢谢

本帖子中包含更多资源

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

x
幽壑潜蛟 发表于 2014-6-9 17:16:43 | 显示全部楼层
将后面图片的判断语句放在前面去。图标去汽车之家扣。
回复

使用道具 举报

 楼主| hew001 发表于 2014-6-9 21:23:44 | 显示全部楼层
幽壑潜蛟 发表于 2014-6-9 17:16
将后面图片的判断语句放在前面去。图标去汽车之家扣。

能具体点吗?图片的判断语句在哪里?新手
回复

使用道具 举报

幽壑潜蛟 发表于 2014-6-10 10:09:15 | 显示全部楼层
这段是默认的主题前面的图标
  1. <?php //主题列表前缀图标?>
  2.                                                                         <td class="icn">
  3.                                                                                 <a href="forum.php?mod=viewthread&tid=$thread[icontid]&{if $_GET['archiveid']}archiveid={$_GET['archiveid']}&{/if}extra=$extra" title="{if $thread['displayorder'] == 1}{lang thread_type1} - {/if}
  4.                                                                                         {if $thread['displayorder'] == 2}{lang thread_type2} - {/if}
  5.                                                                                         {if $thread['displayorder'] == 3}{lang thread_type3} - {/if}
  6.                                                                                         {if $thread['displayorder'] == 4}{lang thread_type4} - {/if}
  7.                                                                                         {if $thread[folder] == 'lock'}{lang closed_thread} - {/if}
  8.                                                                                         {if $thread['special'] == 1}{lang thread_poll} - {/if}
  9.                                                                                         {if $thread['special'] == 2}{lang thread_trade} - {/if}
  10.                                                                                         {if $thread['special'] == 3}{lang thread_reward} - {/if}
  11.                                                                                         {if $thread['special'] == 4}{lang thread_activity} - {/if}
  12.                                                                                         {if $thread['special'] == 5}{lang thread_debate} - {/if}
  13.                                                                                         {if $thread[folder] == "new"}{lang have_newreplies} - {/if}
  14.                                                                                         {lang target_blank}" target="_blank">
  15.                                                                                 <!--{if $thread[folder] == 'lock'}-->
  16.                                                                                         <img src="{IMGDIR}/folder_lock.gif" />
  17.                                                                                 <!--{elseif $thread['special'] == 1}-->
  18.                                                                                         <img src="{IMGDIR}/pollsmall.gif" alt="{lang thread_poll}" />
  19.                                                                                 <!--{elseif $thread['special'] == 2}-->
  20.                                                                                         <img src="{IMGDIR}/tradesmall.gif" alt="{lang thread_trade}" />
  21.                                                                                 <!--{elseif $thread['special'] == 3}-->
  22.                                                                                         <img src="{IMGDIR}/rewardsmall.gif" alt="{lang thread_reward}" />
  23.                                                                                 <!--{elseif $thread['special'] == 4}-->
  24.                                                                                         <img src="{IMGDIR}/activitysmall.gif" alt="{lang thread_activity}" />
  25.                                                                                 <!--{elseif $thread['special'] == 5}-->
  26.                                                                                         <img src="{IMGDIR}/debatesmall.gif" alt="{lang thread_debate}" />
  27.                                                                                 <!--{elseif in_array($thread['displayorder'], array(1, 2, 3, 4))}-->
  28.                                                                                         <img src="{IMGDIR}/pin_$thread[displayorder].gif" alt="$_G[setting][threadsticky][3-$thread[displayorder]]" />
  29.                                                                                 <!--{else}-->
  30.                                                                                         <img src="{IMGDIR}/folder_$thread[folder].gif" />
  31.                                                                                 <!--{/if}-->
  32.                                                                                 </a>
  33.                                                                         </td>
复制代码
这段代码包含主题的标题和后面的图标。
  1. <?php //主题标题?>
  2.                                                                         <th class="$thread[folder]">
  3.                                                                                 <?php //更多操作菜单?>
  4.                                                                                 <a href="javascript:;" id="content_$thread[tid]" class="showcontent y" title="{lang content_actions}" onclick="CONTENT_TID='$thread[tid]';CONTENT_ID='$thread[id]';showMenu({'ctrlid':this.id,'menuid':'content_menu'})"></a>
  5.                                                                                
  6.                                                                                 <?php //隐藏置顶主题按钮?>
  7.                                                                                 <!--{if in_array($thread['displayorder'], array(1, 2, 3, 4))}-->
  8.                                                                                         <a href="javascript:void(0);" onclick="hideStickThread('$thread[tid]')" class="showhide y" title="{lang hidedisplayorder}">{lang hidedisplayorder}</a></em>
  9.                                                                                 <!--{/if}-->
  10.                                                                                
  11.                                                                                 <?php //主题被屏蔽关闭提示??>
  12.                                                                                 <!--{if !$thread['forumstick'] && $thread['closed'] > 1 && ($thread['isgroup'] == 1 || $thread['fid'] != $_G['fid'])}-->
  13.                                                                                                 <!--{eval $thread[tid]=$thread[closed];}-->
  14.                                                                                 <!--{/if}-->
  15.                                                                                
  16.                                                                                 <?php //预览帖子按钮?>
  17.                                                                                 <!--{if !$_G['setting']['forumdisplaythreadpreview'] && !($thread['readperm'] && $thread['readperm'] > $_G['group']['readaccess'] && !$_G['forum']['ismoderator'] && $thread['authorid'] != $_G['uid'])}-->
  18.                                                                                         <!--{if !(!empty($_G['setting']['antitheft']['allow']) && empty($_G['setting']['antitheft']['disable']['thread']) && empty($_G['forum']['noantitheft']))}-->
  19.                                                                                                 <a class="tdpre y" href="javascript:void(0);" onclick="previewThread('{echo $thread['moved'] ? $thread[closed] : $thread[tid]}', '$thread[id]');">{lang preview}</a>
  20.                                                                                         <!--{/if}-->
  21.                                                                                 <!--{/if}-->
  22.                                                                                
  23.                                                                                 <?php //插件钩子?>
  24.                                                                                 <!--{hook/forumdisplay_thread $key}-->
  25.                                                                                
  26.                                                                                 <?php //thread[typehtml]代表主题分类名称,thread[sorthtml]代表分类信息名称,包含html代码,意思可以设置颜色等等信息 ?>
  27.                                                                                 $thread[typehtml] $thread[sorthtml]
  28.                                                                                 <?php //其他版块移动过来的主题?>
  29.                                                                                 <!--{if $thread['moved']}-->
  30.                                                                                         {lang thread_moved}:<!--{eval $thread[tid]=$thread[closed];}-->
  31.                                                                                 <!--{/if}-->
  32.                                                                                
  33.                                                                                 <?php //主题标题?>
  34.                                                                                 <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} class="s xst">$thread[subject]</a>
  35.                                                                                
  36.                                                                                 <?php //隐藏主题(管理员或作者可见的一种设置)?>
  37.                                                                                 <!--{if $_G['setting']['threadhidethreshold'] && $thread['hidden'] >= $_G['setting']['threadhidethreshold']}--><span class="xg1">{lang hidden}</span> <!--{/if}-->
  38.                                                                                
  39.                                                                                 <?php //?>
  40.                                                                                 <!--{if $thread[icon] >= 0}-->
  41.                                                                                         <img src="{STATICURL}image/stamp/{$_G[cache][stamps][$thread[icon]][url]}" alt="{$_G[cache][stamps][$thread[icon]][text]}" align="absmiddle" />
  42.                                                                                 <!--{/if}-->
  43.                                                                                 <?php //抢楼帖提示图标?>
  44.                                                                                 <!--{if $thread['rushreply']}-->
  45.                                                                                         <img src="{IMGDIR}/rushreply_s.png" alt="{lang rushreply}" align="absmiddle" />
  46.                                                                                         <!--{if $rushinfo[$thread[tid]]}-->
  47.                                                                                         <span id="rushtimer_$thread[tid]"> {lang havemore_special} <span id="rushtimer_body_$thread[tid]"></span> <script language="javascript">settimer($rushinfo[$thread[tid]]['timer'], 'rushtimer_body_$thread[tid]');</script>{if $rushinfo[$thread[tid]]['timertype'] == 'start'} {lang header_start} {else} {lang over} {/if} {lang right_special}</span>
  48.                                                                                         <!--{/if}-->
  49.                                                                                 <!--{/if}-->
  50.                                                                                
  51.                                                                                 <?php //调入分类信息后台设置的列表模板包含有html代码?>
  52.                                                                                 <!--{if $stemplate && $sortid}-->$stemplate[$sortid][$thread[tid]]<!--{/if}-->
  53.                                                                                
  54.                                                                                 <?php //阅读权限提示?>
  55.                                                                                 <!--{if $thread['readperm']}--> - [{lang readperm} <span class="xw1">$thread[readperm]</span>]<!--{/if}-->
  56.                                                                                
  57.                                                                                 <?php //主题售价相关判断?>
  58.                                                                                 <!--{if $thread['price'] > 0}-->
  59.                                                                                         <?php //如果主题售价大于零?>
  60.                                                                                         <!--{if $thread['special'] == '3'}-->
  61.                                                                                                 <?php //如果为悬赏主题(提示为悬赏)?>
  62.                                                                                                 - <a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=specialtype&specialtype=reward$forumdisplayadd[specialtype]{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}&rewardtype=1" title="{lang show_rewarding_only}"><span class="xi1">[{lang thread_reward} <span class="xw1">$thread[price]</span> {$_G[setting][extcredits][$_G['setting']['creditstransextra'][2]][unit]}{$_G[setting][extcredits][$_G['setting']['creditstransextra'][2]][title]}]</span></a>
  63.                                                                                         <!--{else}-->
  64.                                                                                                 <?php //普通有售价的主题(提示主题售价多少)?>
  65.                                                                                                 - [{lang price} <span class="xw1">$thread[price]</span> {$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][unit]}{$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][title]}]
  66.                                                                                         <!--{/if}-->
  67.                                                                                 <!--{elseif $thread['special'] == '3' && $thread['price'] < 0}-->
  68.                                                                                         <?php //如果为悬赏主题且主题售价小于零(提示悬赏已解决)?>
  69.                                                                                         - <a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=specialtype&specialtype=reward$forumdisplayadd[specialtype]{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}&rewardtype=2" title="{lang show_rewarded_only}">[{lang reward_solved}]</a>
  70.                                                                                 <!--{/if}-->
  71.                                                                                
  72.                                                                                 <?php //图标提示部分开始-------?>
  73.                                                                                 <!--{if $thread['attachment'] == 2}-->
  74.                                                                                         <?php //图片附件?>
  75.                                                                                         <img src="{STATICURL}image/filetype/image_s.gif" alt="attach_img" title="{lang attach_img}" align="absmiddle" />
  76.                                                                                 <!--{elseif $thread['attachment'] == 1}-->
  77.                                                                                         <?php //其他附件?>
  78.                                                                                         <img src="{STATICURL}image/filetype/common.gif" alt="attachment" title="{lang attachment}" align="absmiddle" />
  79.                                                                                 <!--{/if}-->
  80.                                                                                 <!--{if $thread['mobile']}-->
  81.                                                                                         <?php //手机发布?>
  82.                                                                                         <img src="{IMGDIR}/mobile-attach-$thread['mobile'].png" alt="{lang post_mobile}" align="absmiddle" />
  83.                                                                                 <!--{/if}-->
  84.                                                                                
  85.                                                                                 <!--{if $thread['digest'] > 0 && $filter != 'digest'}-->
  86.                                                                                         <?php //精华帖?>
  87.                                                                                         <img src="{IMGDIR}/digest_$thread[digest].gif" align="absmiddle" alt="digest" title="{lang thread_digest} $thread[digest]" />
  88.                                                                                 <!--{/if}-->
  89.                                                                                 <?php //普通显示帖子(非置顶、分类置顶、全局置顶及回收站中的帖子)?>
  90.                                                                                 <!--{if $thread['displayorder'] == 0}-->
  91.                                                                                         <!--{if $thread[recommendicon] && $filter != 'recommend'}-->
  92.                                                                                                 <?php //推荐指数?>
  93.                                                                                                 <img src="{IMGDIR}/recommend_$thread[recommendicon].gif" align="absmiddle" alt="recommend" title="{lang thread_recommend} $thread[recommends]" />
  94.                                                                                         <!--{/if}-->
  95.                                                                                         <!--{if $thread[heatlevel]}-->
  96.                                                                                                 <?php //火帖级别(一级火、二级火)?>
  97.                                                                                                 <img src="{IMGDIR}/hot_$thread[heatlevel].gif" align="absmiddle" alt="heatlevel" title="{lang heats}: {$thread[heats]}" />
  98.                                                                                         <!--{/if}-->
  99.                                                                                         <!--{if $thread['rate'] > 0}-->
  100.                                                                                                 <?php //帖子评分?>
  101.                                                                                                 <img src="{IMGDIR}/agree.gif" align="absmiddle" alt="agree" title="{lang rate_credit_add}" />
  102.                                                                                         <!--{elseif $thread['rate'] < 0}-->
  103.                                                                                                 <img src="{IMGDIR}/disagree.gif" align="absmiddle" alt="disagree" title="{lang posts_deducted}" />
  104.                                                                                         <!--{/if}-->
  105.                                                                                 <!--{/if}-->
  106.                                                                                 <?php //图标提示部分结束-------?>
  107.                                                                                 <!--{if $thread['replycredit'] > 0}-->
  108.                                                                                         <?php //回帖奖励积分主题记录积分值?>
  109.                                                                                         - <span class="xi1">[{lang replycredit} <strong> $thread['replycredit']</strong> ]</span>
  110.                                                                                 <!--{/if}-->
  111.                                                                                
  112.                                                                                 <?php //插件钩子?>
  113.                                                                                 <!--{hook/forumdisplay_thread_subject $key}-->
  114.                                                                                
  115.                                                                                 <!--{if $thread[multipage]}-->
  116.                                                                                         <?php //主题迷你分页?>
  117.                                                                                         <span class="tps">$thread[multipage]</span>
  118.                                                                                 <!--{/if}-->
  119.                                                                                
  120.                                                                                 <!--{if $thread['weeknew']}-->
  121.                                                                                         <?php //是否为本周新帖(1=是 0=否)?>
  122.                                                                                         <a href="forum.php?mod=redirect&tid=$thread[tid]&goto=lastpost#lastpost" class="xi1">New</a>
  123.                                                                                 <!--{/if}-->
  124.                                                                                 <?php //置顶帖的一些判断?>
  125.                                                                                 <!--{if !$thread['forumstick'] && ($thread['isgroup'] == 1 || $thread['fid'] != $_G['fid'])}-->
  126.                                                                                         <!--{if $thread['related_group'] == 0 && $thread['closed'] > 1}-->
  127.                                                                                                 <!--{eval $thread[tid]=$thread[closed];}-->
  128.                                                                                         <!--{/if}-->
  129.                                                                                         <!--{if $groupnames[$thread[tid]]}-->
  130.                                                                                                 <span class="fromg xg1"> [{lang from}: <a href="forum.php?mod=group&fid={$groupnames[$thread[tid]][fid]}" target="_blank" class="xg1">{$groupnames[$thread[tid]][name]}</a>]</span>
  131.                                                                                         <!--{/if}-->
  132.                                                                                 <!--{/if}-->
  133.                                                                         </th>
复制代码
将标题后面关于图标提示的部分放在前面主题图标部分去。想怎么放要看自己的逻辑来。
比如在有图的情况下放有图的图标。精华帖放精华帖的图标。有一个判断在里面。自己写
  1. <!--{if xxx}-->
  2. 有图图标……
  3. <!--{elseif xxx}-->
  4. 精华图标……
  5. <!--{else}-->
  6. 默认图标……
  7. <!--{/if}-->
复制代码





回复

使用道具 举报

 楼主| hew001 发表于 2014-6-10 18:39:58 | 显示全部楼层
幽壑潜蛟 发表于 2014-6-10 10:09
这段是默认的主题前面的图标
这段代码包含主题的标题和后面的图标。
将标题后面关于图标提示的部分放在前 ...

太感谢了,雪中送炭
回复

使用道具 举报

 楼主| hew001 发表于 2014-6-10 19:26:32 | 显示全部楼层
幽壑潜蛟 发表于 2014-6-10 10:09
这段是默认的主题前面的图标
这段代码包含主题的标题和后面的图标。
将标题后面关于图标提示的部分放在前 ...

还有个问题,帖子图片与图片之间如何自动拉开距离,discuz默认的是零距离,谢谢大神
回复

使用道具 举报

幽壑潜蛟 发表于 2014-6-10 21:18:27 | 显示全部楼层
hew001 发表于 2014-6-10 19:26
还有个问题,帖子图片与图片之间如何自动拉开距离,discuz默认的是零距离,谢谢大神

你说的是帖子内容页?那个添加的图片不知道怎么解决。可以在module.css中帖子内容专用模块样式中写一个img的下边距。但是这样恐怕表情都会有影响。一般都是通过回车换行系统会自动添加br标签来控制间隔的距离。
回复

使用道具 举报

 楼主| hew001 发表于 2014-6-11 12:53:02 | 显示全部楼层
幽壑潜蛟 发表于 2014-6-10 21:18
你说的是帖子内容页?那个添加的图片不知道怎么解决。可以在module.css中帖子内容专用模块样式中写一个im ...

谢谢,谢谢。太感谢了,激动的都说不话话来了
回复

使用道具 举报

 楼主| hew001 发表于 2014-6-12 18:31:18 | 显示全部楼层
幽壑潜蛟 发表于 2014-6-10 21:18
你说的是帖子内容页?那个添加的图片不知道怎么解决。可以在module.css中帖子内容专用模块样式中写一个im ...

大神,我又有问题了,上面的进入论坛 登录错位,怎么整啊,找原因找一下午没找到

本帖子中包含更多资源

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

x
回复

使用道具 举报

幽壑潜蛟 发表于 2014-6-13 09:41:39 | 显示全部楼层
hew001 发表于 2014-6-12 18:31
大神,我又有问题了,上面的进入论坛 登录错位,怎么整啊,找原因找一下午没找到

你这个是第三方模板可能我说的不准确。从图上看你那个应该是左右浮动的问题。应该你在左边还有一块。而且没有浮动或者宽度达到了100%。导致你进入论坛那块。虽然向右浮动但是也会处在左边区块的下方。可以在模板中把左边区块添加一个左浮动的类‘z’。同时交换左右浮动的位置。即把右浮动放在左浮动的前面。可以兼容IE6
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-28 05:55 , Processed in 0.121424 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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