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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[素材] 【分享】特定版塊提示自己的主題 (X3.0 ~ X3.2 版本 繁和簡)

[复制链接]
dicky57 发表于 2017-3-14 17:15:12 | 显示全部楼层 |阅读模式
本帖最后由 dicky57 于 2017-3-14 17:18 编辑

大家好
當我們進入版塊時
如果主題一多在版塊帖子列表頁中
要很容易找到自己發表過的主題好像沒那麼容易

當然可以在版塊中搜索帖子
但這會另開一個搜索頁面
不能在版塊直接查看

也可以在版塊帖子列表頁中查看作者那個欄位
然後找到自己發表過的主題
但有時不是那麼明顯好找

今天想和站長們分享的
就是在帖子列表頁
主題名稱的後面會提示自己的帖子
只有自己的主題才有提示
這樣就比較方便查看了

分享給有需要的站長們
樓主樓層第二頁提供簡體版本
方便其他站長閱讀^^

打開

template/default/forum/forumdisplay_list.htm

查找

  1. <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>
复制代码


替換為

  1. <!--{if in_array($_G[fid], array(2,18))}-->
  2.                                            <!--{if $_G[uid] == $thread[authorid]}-->
  3.                                                 <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>&nbsp;<img src="http://i.imgur.com/18AEN8L.gif" title="{lang my_posts}" align="absmiddle"><!--{else}--><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>
  4.                                            <!--{/if}-->
  5.                                            <!--{else}-->
  6.                                                 <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>
  7.                                          <!--{/if}-->
复制代码


修改前請先備份
修改後記得更新緩存

代碼說明

($_G[fid], array(2,18))

這是特定版塊的 fid
218 改成您的特定版塊 fid 即可

如果您只有一個特定版塊的話
只填一個 fid 即可



($_G[fid], array(2))

如果不知道版塊的 fid
可以在後台查看即可



如果想要論壇所有版塊都能提示的話 (全局)
則替換為部分改為

  1. <!--{if $_G[fid]}-->
  2.                                            <!--{if $_G[uid] == $thread[authorid]}-->
  3.                                                 <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>&nbsp;<img src="http://i.imgur.com/18AEN8L.gif" title="{lang my_posts}" align="absmiddle"><!--{else}--><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>
  4.                                            <!--{/if}-->
  5.                                            <!--{else}-->
  6.                                                 <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>
  7.                                          <!--{/if}-->
复制代码

  1. http://i.imgur.com/18AEN8L.gif
复制代码


這是提示圖標的圖片完整網址
替換成您自己的即可

修改前
主題名稱後面沒有提示圖標



修改後
主題名稱後面有提示圖標
滑鼠移到提示圖標時
會顯示我的帖子提示





其它版本查找的代碼和行數有點差異
但修改的方法是一樣的
可以參考這個方法修改即可

圖標



本帖子中包含更多资源

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

x

评分

1

查看全部评分

楚轻狂 发表于 2017-3-24 15:35:06 | 显示全部楼层
支持美 女楼 主哦,都是技 术贴!
回复

使用道具 举报

 楼主| dicky57 发表于 2017-4-10 17:14:11 | 显示全部楼层
楚轻狂 发表于 2017-3-24 15:35
支持美 女楼 主哦,都是技 术贴!

嗯~
謝謝您的回覆支持喔
大家互相學習交流^^
回复

使用道具 举报

zzlogooooo 发表于 2017-5-1 18:40:45 | 显示全部楼层
你好 想问问你
打開

template/default/forum/discuz.htm 文件

查找

    <!--{eval $forumcolumns = $forumscount > 3 ? ($forumscount == 4 ? 4 : 5) : 1;}-->

复制代码


替換為

    <!--{eval $forumcolumns = $forumscount > 3 ? ($forumscount == 4 ? 3 : 3) : 1;}-->

复制代码


也就是將原本代碼中的

4 : 5 改成 3 : 3

如果要橫排二行的話
4 : 5 改成 2 : 2

修改前請先備份
修改後記得更新緩存
回复

使用道具 举报

zzlogooooo 发表于 2017-5-1 18:41:57 | 显示全部楼层
zzlogooooo 发表于 2017-5-1 18:40
你好 想问问你
打開

想问问您 这个设置 x 3.3  为什么不生效啊  
回复

使用道具 举报

 楼主| dicky57 发表于 2017-5-1 20:37:06 | 显示全部楼层
zzlogooooo 发表于 2017-5-1 18:41
想问问您 这个设置 x 3.3  为什么不生效啊

嗯~
您是指這篇主題嗎

【分享】收藏版塊橫排 (x2.5 ~ x3.2 版本 兩種方案 已更新 繁和簡)
https://discuz.dismall.com/thread-3582271-1-1.html

x3.3版本我沒測試過
不過我看您的回覆替換為的部分好像不對
https://discuz.dismall.com/forum. ... 73&pid=29755662

您的替換為
<!--{eval $forumcolumns = $forumscount > 3 ? ($forumscount == 4 ? 3 : 3) : 1;}-->

我的替換為
<!--{eval $forumcolumns = $forumscount = 1 ? ($forumscount == 4 ? 3 : 3) : 1;}-->

請再參考那篇主題的說明重新修改試試
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-17 14:00 , Processed in 0.123523 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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