📄 infoviewlistthread.java
字号:
package com.redmoon.forum.plugin.info;
import com.redmoon.forum.plugin.base.IPluginViewListThread;
import com.redmoon.forum.plugin.base.UIListThread;
import javax.servlet.http.HttpServletRequest;
import cn.js.fan.util.StrUtil;
import java.util.Vector;
import java.util.Iterator;
public class InfoViewListThread implements IPluginViewListThread {
HttpServletRequest request;
public InfoViewListThread(HttpServletRequest request, String boardCode) {
this.request = request;
this.boardCode = boardCode;
}
public String render(int position) {
String str = "";
switch (position) {
case UIListThread.POS_RULE:
str += StrUtil.toHtml(StrUtil.ubb(request, getBoardRule(), true)) + getHelpLink() + getBoardNote();
break;
default:
break;
}
return str;
}
public String getHelpLink() {
return InfoSkin.LoadString(request, "helpLink");
}
public void setBoardCode(String boardCode) {
this.boardCode = boardCode;
}
public String getBoardCode() {
return boardCode;
}
public String getBoardRule() {
InfoBoardDb sb = new InfoBoardDb();
sb = (InfoBoardDb)sb.getObjectDb(boardCode);
return sb.getBoardRule();
}
public String getBoardNote() {
// 快速通道
String note = "";
InfoConfig ic = new InfoConfig();
Vector v = ic.getAllType();
Iterator ir = v.iterator();
while (ir.hasNext()) {
InfoType ift = (InfoType) ir.next();
note += "【<a target=_blank href='plugin/" + InfoUnit.code + "/list.jsp?code=" + StrUtil.UrlEncode(ift.getCode()) + "'>" + ift.getName() + "</a>】 ";
}
return note;
}
public boolean IsPluginBoard() {
InfoBoardDb sb = new InfoBoardDb();
return sb.isPluginBoard(boardCode);
}
private String boardCode;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -