|
Register /
Login
|
Desktop view
|
TopicModel.selectHottestTopicsByLimit = SELECT t.*, p.user_id AS last_user_id, p.post_time, 0 AS attach \
FROM jforum_topics t, jforum_posts p \
WHERE p.post_id = t.topic_last_post_id \
AND p.need_moderate = 0 \
ORDER BY topic_views DESC \
LIMIT ?
rss.hottestTopics.0 =
# Hottest Topics
hottestTopics.list.0 =
hottestTopics.showTopicsByUser.1 = user_id
hottestTopics.showTopicsByUser.2 = start, user_id
hottest.list = hottest_thread.htm
hottest.usertopics.show = user_topics_show.htm
hottestTopics = net.jforum.view.forum.HottestTopicsAction
public static final String HOTTEST_LIST = "hottest.list";
public static final String HOTTEST_USER_TOPICS_SHOW = "hottest.usertopics.show";
public static final String HOTTEST_TOPICS = "topic.hottest";
private static final String HOTTEST = "hottest";
/**
* Get all cached hottest topics.
*
*/
public static List getHottestTopics()
{
List l = (List)cache.get(FQN, HOTTEST);
if (l == null || l.size() == 0
|| !SystemGlobals.getBoolValue(ConfigKeys.TOPIC_CACHE_ENABLED)) {
l = loadHottestTopics();
}
return new ArrayList(l);
}
/**
* Add hottest topics to the cache
*/
public static List loadHottestTopics()
{
TopicDAO tm = DataAccessDriver.getInstance().newTopicDAO();
int limit = SystemGlobals.getIntValue(ConfigKeys.HOTTEST_TOPICS);
List l = tm.selectHottestTopics(limit);
cache.add(FQN, HOTTEST, new LinkedList(l));
return l;
}
/**
* Selects hottest topics
*
* @param limit The number of topics to retrieve
* @return List
*/
public List selectHottestTopics (int limit) ;
/**
* @see net.jforum.dao.TopicDAO#selectHottestTopics(int)
*/
public List selectHottestTopics(int limit)
{
PreparedStatement p = null;
try {
p = JForumExecutionContext.getConnection().prepareStatement(
SystemGlobals.getSql("TopicModel.selectHottestTopicsByLimit"));
p.setInt(1, limit);
List list = this.fillTopicsData(p);
p = null;
return list;
}
catch (SQLException e) {
throw new DatabaseException(e);
}
finally {
DbUtils.close(p);
}
}
// Updates the Hottest Topics if it contains this topic
TopicRepository.loadHottestTopics();
TopicRepository.loadHottestTopics();
TopicRepository.loadHottestTopics();
topic.hottest = 50
ForumBase.hottestTopics = Hottest Topics
ForumBase.hottestTopics = 熱門主題
| Filename | GenericTopicDAO.java |
| Description | GenericTopicDAO.java |
| Filesize | 28 Kbytes |
| Downloaded | 54 time(s) |
|
|
|
| Filename | generic_queries.sql |
| Description | generic_queries.sql |
| Filesize | 40 Kbytes |
| Downloaded | 53 time(s) |
|
|
|
| Filename | ConfigKeys.java |
| Description | ConfigKeys.java |
| Filesize | 16 Kbytes |
| Downloaded | 55 time(s) |
|
|
|
| Filename | modulesMapping.properties |
| Description | modulesMapping.properties |
| Filesize | 1 Kbytes |
| Downloaded | 49 time(s) |
|
|
|
| Filename | TemplateKeys.java |
| Description | TemplateKeys.java |
| Filesize | 10 Kbytes |
| Downloaded | 56 time(s) |
|
|
|
| Filename | TopicDAO.java |
| Description | TopicDAO.java |
| Filesize | 9 Kbytes |
| Downloaded | 53 time(s) |
|
|
|
| Filename | HottestTopicsAction.java |
| Description | HottestTopicsAction.java |
| Filesize | 5 Kbytes |
| Downloaded | 54 time(s) |
|
|
|
| Filename | hottest_thread.htm |
| Description | hottest_thread.htm |
| Filesize | 4 Kbytes |
| Downloaded | 53 time(s) |
|
|
|
| Filename | templatesMapping.properties |
| Description | templatesMapping.properties |
| Filesize | 4 Kbytes |
| Downloaded | 53 time(s) |
|
|
|
| Filename | urlPattern.properties |
| Description | urlPattern.properties |
| Filesize | 4 Kbytes |
| Downloaded | 50 time(s) |
|
|
|
| Filename | TopicRepository.java |
| Description | TopicRepository.java |
| Filesize | 9 Kbytes |
| Downloaded | 57 time(s) |
|
|
|
| Filename | ModerationHelper.java |
| Description | ModerationHelper.java |
| Filesize | 9 Kbytes |
| Downloaded | 44 time(s) |
|
|
|
| Filename | TopicsCommon.java |
| Description | TopicsCommon.java |
| Filesize | 10 Kbytes |
| Downloaded | 48 time(s) |
|
|
|
| Filename | PostAction.java |
| Description | PostAction.java |
| Filesize | 46 Kbytes |
| Downloaded | 47 time(s) |
|
|
|