帖子内容页作者名称颜色循环

来自: Discuz 作者: 水煮鱼 时间: 2010-11-17 21:00 查看: 3784 回复: 0

变通一下也可以做其他方式的循环

转载:

⒈在 css_append.htm 加入
  1. .authorinfo a.posterlink1 { color: 你喜欢的颜色; font-weight: 800; }
  2. .authorinfo a.posterlink2 { color: 你喜欢的颜色; font-weight: 800; }
  3. .authorinfo a.posterlink3 { color: 你喜欢的颜色; font-weight: 800; }
  4. .authorinfo a.posterlink4 { color: 你喜欢的颜色; font-weight: 800; }
  5. .authorinfo a.posterlink5 { color: 你喜欢的颜色; font-weight: 800; }
  6. .authorinfo a.posterlink6 { color: 你喜欢的颜色; font-weight: 800; }
  7. .authorinfo a.posterlink7 { color: 你喜欢的颜色; font-weight: 800; }
  8. .authorinfo a.posterlink8 { color: 你喜欢的颜色; font-weight: 800; }
  9. .authorinfo a.posterlink9 { color: 你喜欢的颜色; font-weight: 800; }
  10. .authorinfo a.posterlink10 { color: 你喜欢的颜色; font-weight: 800; }
复制代码

⒉在 viewthread.htm 查找
  1. <!--{loop $postlist $post}-->
  2.         {subtemplate viewthread_node}
  3. <!--{/loop}-->
复制代码

⒊替换为
  1. <!--{eval $I=0;}-->
  2. <!--{loop $postlist $post}-->
  3. <!--{eval $I++;}-->
  4.         {subtemplate viewthread_node}
  5. <!--{/loop}-->
复制代码

⒋在 viewthread_node.htm 第一行加入
  1. <!--{if $post['number'] %10 ==9}--><!--{eval $I=9;}--><!--{/if}-->
  2. <!--{if $post['number'] %10 ==8}--><!--{eval $I=8;}--><!--{/if}-->
  3. <!--{if $post['number'] %10 ==7}--><!--{eval $I=7;}--><!--{/if}-->
  4. <!--{if $post['number'] %10 ==6}--><!--{eval $I=6;}--><!--{/if}-->
  5. <!--{if $post['number'] %10 ==5}--><!--{eval $I=5;}--><!--{/if}-->
  6. <!--{if $post['number'] %10 ==4}--><!--{eval $I=4;}--><!--{/if}-->
  7. <!--{if $post['number'] %10 ==3}--><!--{eval $I=3;}--><!--{/if}-->
  8. <!--{if $post['number'] %10 ==2}--><!--{eval $I=2;}--><!--{/if}-->
  9. <!--{if $post['number'] %10 ==1}--><!--{eval $I=1;}--><!--{/if}-->
  10. <!--{if $post['number'] %10 ==0}--><!--{eval $I=10;}--><!--{/if}-->
复制代码

⒌查找
  1. <a href="space.php?uid=$post[authorid]" class="posterlink" target="_blank">$post[author]</a>
复制代码

⒍替换为
  1. <a href="space.php?uid=$post[authorid]" class="posterlink$I" target="_blank">$post[author]</a>
复制代码

⒎更新缓存
快速回复
您需要登录后才可以回帖 登录 | 注册
Smilies Code
高级模式