<?xml version="1.0" encoding="utf-8"?>
<module>
<module_name>RecentThreads2</module_name>
<module_cache>now</module_cache>
<module_settings>
<cutoff desc="Recent Thread Cutoff?" format="">5</cutoff>
<forum desc="Recent Thread Forum?" format="forums">110</forum>
<RecentThreads2_limit desc="Recent Thread Limit?" format="">3</RecentThreads2_limit>
</module_settings>
<module_template><![CDATA[<xen:require css="discussion_list.css" />
<xen:if is="{$position} == 'left' OR {$position} == 'right'">
<div class="section avatarList">
<div class="secondaryContent" id="statusUpdates">
<h3>Recently Active Threads</h3>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads" value="$thread">
<li id="thread-{$thread.thread_id}" class="{$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
<xen:avatar user="$thread" size="s" img="true" />
<div class="title">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> @
<a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</li>
</xen:foreach>
</ol>
</div>
</div>
<xen:else />
<xen:require css="inline_mod.css" />
<xen:require js="js/xenforo/discussion_list.js" />
<form action="{xen:link inline-mod/thread/switch}" method="post"
class="DiscussionList InlineModForm"
data-cookieName="threads"
data-controls="#InlineModControls"
data-imodOptions="#ModerationSelect option">
<div class="discussionList section sectionMain" id="recentThreads">
<dl class="sectionHeaders">
<dt class="posterAvatar"></dt>
<dd class="main">
<a class="title"><span>Recently Active Threads</span></a>
<a class="postDate"><span>{xen:phrase start_date}</span></a>
</dd>
<dd class="stats">
<a class="major"><span>{xen:phrase replies}</span></a>
<a class="minor"><span>{xen:phrase views}</span></a>
</dd>
<dd class="lastPost"><a><span>{xen:phrase last_message}</span></a></dd>
</dl>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads" value="$thread">
<xen:include template="thread_list_item">
<xen:map from="$thread.showForumLink" to="$showForumLink" />
</xen:include>
</xen:foreach>
</ol>
</div>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:include template="preview_tooltip" />]]></module_template>
</module>
Server Error
String could not be parsed as XML
<?xml version="1.0" encoding="utf-8"?>
<module>
<module_name>RecentNews</module_name>
<module_cache>+1 hours</module_cache>
<module_settings>
<recentnews_forum desc="Recent News Forum?" format="forums">78</recentnews_forum>
<recentnews_limit desc="Recent News Limit?" format="">4</recentnews_limit>
<recentnews_truncate desc="Recent News Truncate?" format="">10000</recentnews_truncate>
<recentnews_pagenav desc="Show Page Navigation?" format="check">1</recentnews_pagenav>
</module_settings>
<module_template><![CDATA[<xen:require css="message_user_info.css" />
<xen:require css="bb_code.css" />
<?xml version="1.0" encoding="utf-8"?>
<module>
<module_name>RecentNewsBot</module_name>
<module_cache>+1 hours</module_cache>
<module_settings>
<recentnewsbot_forum desc="Recent News Forum?" format="forums">78</recentnewsbot_forum>
<recentnewsbot_limit desc="Recent News Limit?" format="">5</recentnewsbot_limit>
<recentnewsbot_truncate desc="Recent News Truncate?" format="">1500</recentnewsbot_truncate>
</module_settings>
<module_template><![CDATA[<xen:require css="message_user_info.css" />
<xen:require css="bb_code.css" />
<xen:require css="message_user_info.css" />
<xen:require css="bb_code.css" />
<div class="sectionMain">
<xen:foreach loop="$RecentNewsBot" value="$news">
<article>
<?xml version="1.0" encoding="utf-8"?>
<module>
<module_name>RecentThreads</module_name>
<module_cache>now</module_cache>
<module_settings>
<cutoff desc="Recent Thread Cutoff?" format="">1</cutoff>
<forum desc="Recent Thread Forum?" format="forums">0</forum>
<limit desc="Recent Thread Limit?" format="">3</limit>
</module_settings>
<module_template><![CDATA[<xen:require css="discussion_list.css" />
<xen:if is="{$position} == 'left' OR {$position} == 'right'">
<div class="section avatarList">
<div class="secondaryContent" id="statusUpdates">
<h3>Recently Active Threads</h3>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads" value="$thread">
<li id="thread-{$thread.thread_id}" class="{$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
<xen:avatar user="$thread" size="s" img="true" />
<div class="title">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> @
<a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</li>
</xen:foreach>
</ol>
</div>
</div>
<xen:else />
<xen:require css="inline_mod.css" />
<xen:require js="js/xenforo/discussion_list.js" />
<form action="{xen:link inline-mod/thread/switch}" method="post"
class="DiscussionList InlineModForm"
data-cookieName="threads"
data-controls="#InlineModControls"
data-imodOptions="#ModerationSelect option">
<div class="discussionList section sectionMain" id="recentThreads">
<dl class="sectionHeaders">
<dt class="posterAvatar"></dt>
<dd class="main">
<a class="title"><span>Recently Active Threads</span></a>
<a class="postDate"><span>{xen:phrase start_date}</span></a>
</dd>
<dd class="stats">
<a class="major"><span>{xen:phrase replies}</span></a>
<a class="minor"><span>{xen:phrase views}</span></a>
</dd>
<dd class="lastPost"><a><span>{xen:phrase last_message}</span></a></dd>
</dl>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads" value="$thread">
<xen:include template="thread_list_item">
<xen:map from="$thread.showForumLink" to="$showForumLink" />
</xen:include>
</xen:foreach>
</ol>
</div>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:include template="preview_tooltip" />]]></module_template>
</module>
<?php
class EWRporta_Block_RecentThreads extends XenForo_Model
{
public function getBypass($params)
{
$visitor = XenForo_Visitor::getInstance();
$conditions = array(
'last_post_date' => array('>', XenForo_Application::$time - 86400 * $params['option']['cutoff']),
'deleted' => false,
'moderated' => false
);
if ($params['option']['forum'])
{
$conditions['forum_ids'] = explode(',', $params['option']['forum']);
}
$fetchOptions = array(
'join' => XenForo_Model_Thread::FETCH_FORUM | XenForo_Model_Thread::FETCH_USER,
'permissionCombinationId' => $visitor['permission_combination_id'],
'readUserId' => $visitor['user_id'],
'watchUserId' => $visitor['user_id'],
'postCountUserId' => $visitor['user_id'],
'order' => 'last_post_date',
'orderDirection' => 'desc',
'limit' => $params['option']['limit'],
);
$threads = $this->getThreads($conditions, $fetchOptions);
foreach ($threads AS $threadID => &$thread)
{
if ($this->getModelFromCache('XenForo_Model_Thread')->canViewThreadAndContainer($thread, $thread))
{
$thread = $this->getModelFromCache('XenForo_Model_Thread')->prepareThread($thread, $thread);
$thread['canInlineMod'] = false;
$thread['showForumLink'] = true;
}
else
{
unset($threads[$threadID]);
}
}
return $threads;
}
public function getThreads(array $conditions, array $fetchOptions = array())
{
$whereConditions = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadConditions($conditions, $fetchOptions);
$sqlClauses = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadFetchOptions($fetchOptions);
$limitOptions = $this->getModelFromCache('XenForo_Model_Thread')->prepareLimitFetchOptions($fetchOptions);
if (!empty($conditions['forum_ids']))
{
$whereConditions .= ' AND thread.node_id IN ('.$this->_getDb()->quote($conditions['forum_ids']).')';
}
return $this->fetchAllKeyed($this->limitQueryResults('
SELECT thread.*
' . $sqlClauses['selectFields'] . '
FROM xf_thread AS thread
' . $sqlClauses['joinTables'] . '
WHERE ' . $whereConditions . '
' . $sqlClauses['orderClause'] . '
', $limitOptions['limit'], $limitOptions['offset']
), 'thread_id');
}
}
<?xml version="1.0" encoding="utf-8"?>
<module>
<module_name>RecentThreads2</module_name>
<module_cache>now</module_cache>
<module_settings>
<cutoff desc="Recent Thread Cutoff?" format="">1</cutoff>
<forum desc="Recent Thread Forum?" format="forums">0</forum>
<limit desc="Recent Thread Limit?" format="">3</limit>
</module_settings>
<module_template><![CDATA[<xen:require css="discussion_list.css" />
<xen:if is="{$position} == 'left' OR {$position} == 'right'">
<div class="section avatarList">
<div class="secondaryContent" id="statusUpdates">
<h3>Recently Active Threads</h3>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<li id="thread-{$thread.thread_id}" class="{$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
<xen:avatar user="$thread" size="s" img="true" />
<div class="title">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> @
<a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</li>
</xen:foreach>
</ol>
</div>
</div>
<xen:else />
<xen:require css="inline_mod.css" />
<xen:require js="js/xenforo/discussion_list.js" />
<form action="{xen:link inline-mod/thread/switch}" method="post"
class="DiscussionList InlineModForm"
data-cookieName="threads"
data-controls="#InlineModControls"
data-imodOptions="#ModerationSelect option">
<div class="discussionList section sectionMain" id="RecentThreads2">
<dl class="sectionHeaders">
<dt class="posterAvatar"></dt>
<dd class="main">
<a class="title"><span>Recently Active Threads</span></a>
<a class="postDate"><span>{xen:phrase start_date}</span></a>
</dd>
<dd class="stats">
<a class="major"><span>{xen:phrase replies}</span></a>
<a class="minor"><span>{xen:phrase views}</span></a>
</dd>
<dd class="lastPost"><a><span>{xen:phrase last_message}</span></a></dd>
</dl>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<xen:include template="thread_list_item">
<xen:map from="$thread.showForumLink" to="$showForumLink" />
</xen:include>
</xen:foreach>
</ol>
</div>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:include template="preview_tooltip" />]]></module_template>
</module>
<xen:require css="discussion_list.css" />
<xen:if is="{$position} == 'left' OR {$position} == 'right'">
<div class="section avatarList">
<div class="secondaryContent" id="statusUpdates">
<h3>Recently Active Threads</h3>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<li id="thread-{$thread.thread_id}" class="{$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
<xen:avatar user="$thread" size="s" img="true" />
<div class="title">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> @
<a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</li>
</xen:foreach>
</ol>
</div>
</div>
<xen:else />
<xen:require css="inline_mod.css" />
<xen:require js="js/xenforo/discussion_list.js" />
<form action="{xen:link inline-mod/thread/switch}" method="post"
class="DiscussionList InlineModForm"
data-cookieName="threads"
data-controls="#InlineModControls"
data-imodOptions="#ModerationSelect option">
<div class="discussionList section sectionMain" id="RecentThreads2">
<dl class="sectionHeaders">
<dt class="posterAvatar"></dt>
<dd class="main">
<a class="title"><span>Recently Active Threads</span></a>
<a class="postDate"><span>{xen:phrase start_date}</span></a>
</dd>
<dd class="stats">
<a class="major"><span>{xen:phrase replies}</span></a>
<a class="minor"><span>{xen:phrase views}</span></a>
</dd>
<dd class="lastPost"><a><span>{xen:phrase last_message}</span></a></dd>
</dl>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<xen:include template="thread_list_item">
<xen:map from="$thread.showForumLink" to="$showForumLink" />
</xen:include>
</xen:foreach>
</ol>
</div>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:include template="preview_tooltip" />
<?php
class EWRporta_Block_RecentThreads2 extends XenForo_Model
{
public function getBypass($params)
{
$visitor = XenForo_Visitor::getInstance();
$conditions = array(
'last_post_date' => array('>', XenForo_Application::$time - 86400 * $params['option']['cutoff']),
'deleted' => false,
'moderated' => false
);
if ($params['option']['forum'])
{
$conditions['forum_ids'] = explode(',', $params['option']['forum']);
}
$fetchOptions = array(
'join' => XenForo_Model_Thread::FETCH_FORUM | XenForo_Model_Thread::FETCH_USER,
'permissionCombinationId' => $visitor['permission_combination_id'],
'readUserId' => $visitor['user_id'],
'watchUserId' => $visitor['user_id'],
'postCountUserId' => $visitor['user_id'],
'order' => 'last_post_date',
'orderDirection' => 'desc',
'limit' => $params['option']['limit'],
);
$threads = $this->getThreads($conditions, $fetchOptions);
foreach ($threads AS $threadID => &$thread)
{
if ($this->getModelFromCache('XenForo_Model_Thread')->canViewThreadAndContainer($thread, $thread))
{
$thread = $this->getModelFromCache('XenForo_Model_Thread')->prepareThread($thread, $thread);
$thread['canInlineMod'] = false;
$thread['showForumLink'] = true;
}
else
{
unset($threads[$threadID]);
}
}
return $threads;
}
public function getThreads(array $conditions, array $fetchOptions = array())
{
$whereConditions = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadConditions($conditions, $fetchOptions);
$sqlClauses = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadFetchOptions($fetchOptions);
$limitOptions = $this->getModelFromCache('XenForo_Model_Thread')->prepareLimitFetchOptions($fetchOptions);
if (!empty($conditions['forum_ids']))
{
$whereConditions .= ' AND thread.node_id IN ('.$this->_getDb()->quote($conditions['forum_ids']).')';
}
return $this->fetchAllKeyed($this->limitQueryResults('
SELECT thread.*
' . $sqlClauses['selectFields'] . '
FROM xf_thread AS thread
' . $sqlClauses['joinTables'] . '
WHERE ' . $whereConditions . '
' . $sqlClauses['orderClause'] . '
', $limitOptions['limit'], $limitOptions['offset']
), 'thread_id');
}
}
<?xml version="1.0" encoding="utf-8"?>
<module>
<module_name>recentthreads2</module_name>
<module_cache>now</module_cache>
<module_settings>
<cutoff desc="Recent Thread Cutoff?" format="">1</cutoff>
<forum desc="Recent Thread Forum?" format="forums">0</forum>
<limit desc="Recent Thread Limit?" format="">3</limit>
</module_settings>
<module_template><![CDATA[<xen:require css="discussion_list.css" />
<xen:if is="{$position} == 'left' OR {$position} == 'right'">
<div class="section avatarList">
<div class="secondaryContent" id="statusUpdates">
<h3>Recently Active Threads</h3>
<ol class="discussionListItems">
<xen:foreach loop="$recentthreads2" value="$thread">
<li id="thread-{$thread.thread_id}" class="{$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
<xen:avatar user="$thread" size="s" img="true" />
<div class="title">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> @
<a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</li>
</xen:foreach>
</ol>
</div>
</div>
<xen:else />
<xen:require css="inline_mod.css" />
<xen:require js="js/xenforo/discussion_list.js" />
<form action="{xen:link inline-mod/thread/switch}" method="post"
class="DiscussionList InlineModForm"
data-cookieName="threads"
data-controls="#InlineModControls"
data-imodOptions="#ModerationSelect option">
<div class="discussionList section sectionMain" id="recentthreads2">
<dl class="sectionHeaders">
<dt class="posterAvatar"></dt>
<dd class="main">
<a class="title"><span>Recently Active Threads</span></a>
<a class="postDate"><span>{xen:phrase start_date}</span></a>
</dd>
<dd class="stats">
<a class="major"><span>{xen:phrase replies}</span></a>
<a class="minor"><span>{xen:phrase views}</span></a>
</dd>
<dd class="lastPost"><a><span>{xen:phrase last_message}</span></a></dd>
</dl>
<ol class="discussionListItems">
<xen:foreach loop="$recentthreads2" value="$thread">
<xen:include template="thread_list_item">
<xen:map from="$thread.showForumLink" to="$showForumLink" />
</xen:include>
</xen:foreach>
</ol>
</div>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:include template="preview_tooltip" />]]></module_template>
</module>
<xen:require css="discussion_list.css" />
<xen:if is="{$position} == 'left' OR {$position} == 'right'">
<div class="section avatarList">
<div class="secondaryContent" id="statusUpdates">
<h3>Recently Active Threads</h3>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<li id="thread-{$thread.thread_id}" class="{$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
<xen:avatar user="$thread" size="s" img="true" />
<div class="title">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> @
<a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</li>
</xen:foreach>
</ol>
</div>
</div>
<xen:else />
<xen:require css="inline_mod.css" />
<xen:require js="js/xenforo/discussion_list.js" />
<form action="{xen:link inline-mod/thread/switch}" method="post"
class="DiscussionList InlineModForm"
data-cookieName="threads"
data-controls="#InlineModControls"
data-imodOptions="#ModerationSelect option">
<div class="discussionList section sectionMain" id="RecentThreads2">
<dl class="sectionHeaders">
<dt class="posterAvatar"></dt>
<dd class="main">
<a class="title"><span>Recently Active Threads</span></a>
<a class="postDate"><span>{xen:phrase start_date}</span></a>
</dd>
<dd class="stats">
<a class="major"><span>{xen:phrase replies}</span></a>
<a class="minor"><span>{xen:phrase views}</span></a>
</dd>
<dd class="lastPost"><a><span>{xen:phrase last_message}</span></a></dd>
</dl>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<xen:include template="thread_list_item">
<xen:map from="$thread.showForumLink" to="$showForumLink" />
</xen:include>
</xen:foreach>
</ol>
</div>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:include template="preview_tooltip" />
<?php
class EWRporta_Block_RecentThreads2 extends XenForo_Model
{
public function getBypass($params)
{
$visitor = XenForo_Visitor::getInstance();
$conditions = array(
'last_post_date' => array('>', XenForo_Application::$time - 86400 * $params['option']['recentthreads2_cutoff']),
'deleted' => false,
'moderated' => false
);
if ($params['option']['recentthreads2_forum'])
{
$conditions['forum_ids'] = explode(',', $params['option']['recentthreads2_forum']);
}
$fetchOptions = array(
'join' => XenForo_Model_Thread::FETCH_FORUM | XenForo_Model_Thread::FETCH_USER,
'permissionCombinationId' => $visitor['permission_combination_id'],
'readUserId' => $visitor['user_id'],
'watchUserId' => $visitor['user_id'],
'postCountUserId' => $visitor['user_id'],
'order' => 'last_post_date',
'orderDirection' => 'desc',
'limit' => $params['option']['recentthreads2_limit'],
);
$threads = $this->getThreads($conditions, $fetchOptions);
foreach ($threads AS $threadID => &$thread)
{
if ($this->getModelFromCache('XenForo_Model_Thread')->canViewThreadAndContainer($thread, $thread))
{
$thread = $this->getModelFromCache('XenForo_Model_Thread')->prepareThread($thread, $thread);
$thread['canInlineMod'] = false;
$thread['showForumLink'] = true;
}
else
{
unset($threads[$threadID]);
}
}
return $threads;
}
public function getThreads(array $conditions, array $fetchOptions = array())
{
$whereConditions = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadConditions($conditions, $fetchOptions);
$sqlClauses = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadFetchOptions($fetchOptions);
$limitOptions = $this->getModelFromCache('XenForo_Model_Thread')->prepareLimitFetchOptions($fetchOptions);
if (!empty($conditions['forum_ids']))
{
$whereConditions .= ' AND thread.node_id IN ('.$this->_getDb()->quote($conditions['forum_ids']).')';
}
return $this->fetchAllKeyed($this->limitQueryResults('
SELECT thread.*
' . $sqlClauses['selectFields'] . '
FROM xf_thread AS thread
' . $sqlClauses['joinTables'] . '
WHERE ' . $whereConditions . '
' . $sqlClauses['orderClause'] . '
', $limitOptions['limit'], $limitOptions['offset']
), 'thread_id');
}
}
your forums value = 0 so even if everything is set up perfectly, it wouldn't show anything
You may wish to consider hiring Jaxel or another developer to visit your site to set this up.
I tried changing the value but still nothing. I'll see if me and jaxel can come to some sort of agreement. Thanks for the help Ryan.
<?xml version="1.0" encoding="utf-8"?>
<module>
<module_name>RecentThreads2</module_name>
<module_cache>now</module_cache>
<module_settings>
<cutoff desc="Recent Thread Cutoff?" format="">1</cutoff>
<forum desc="Recent Thread Forum?" format="forums">0</forum>
<limit desc="Recent Thread Limit?" format="">3</limit>
</module_settings>
<module_template><![CDATA[<xen:require css="discussion_list.css" />
<xen:if is="{$position} == 'left' OR {$position} == 'right'">
<div class="section avatarList">
<div class="secondaryContent" id="statusUpdates">
<h3>Recently Active Threads</h3>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<li id="thread-{$thread.thread_id}" class="{$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'}" data-author="{$thread.username}">
<xen:avatar user="$thread" size="s" img="true" />
<div class="title">
<a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
class="{xen:if $thread.hasPreview, PreviewTooltip}"
data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
</div>
<div class="muted">
<a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> @
<a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
</div>
</li>
</xen:foreach>
</ol>
</div>
</div>
<xen:else />
<xen:require css="inline_mod.css" />
<xen:require js="js/xenforo/discussion_list.js" />
<form action="{xen:link inline-mod/thread/switch}" method="post"
class="DiscussionList InlineModForm"
data-cookieName="threads"
data-controls="#InlineModControls"
data-imodOptions="#ModerationSelect option">
<div class="discussionList section sectionMain" id="recentThreads2">
<dl class="sectionHeaders">
<dt class="posterAvatar"></dt>
<dd class="main">
<a class="title"><span>Recently Active Threads</span></a>
<a class="postDate"><span>{xen:phrase start_date}</span></a>
</dd>
<dd class="stats">
<a class="major"><span>{xen:phrase replies}</span></a>
<a class="minor"><span>{xen:phrase views}</span></a>
</dd>
<dd class="lastPost"><a><span>{xen:phrase last_message}</span></a></dd>
</dl>
<ol class="discussionListItems">
<xen:foreach loop="$RecentThreads2" value="$thread">
<xen:include template="thread_list_item">
<xen:map from="$thread.showForumLink" to="$showForumLink" />
</xen:include>
</xen:foreach>
</ol>
</div>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:include template="preview_tooltip" />]]></module_template>
</module>
<?php
class EWRporta_Block_RecentThreads2 extends XenForo_Model
{
public function getBypass($params)
{
$visitor = XenForo_Visitor::getInstance();
$conditions = array(
'last_post_date' => array('>', XenForo_Application::$time - 86400 * $params['option']['cutoff']),
'deleted' => false,
'moderated' => false
);
if ($params['option']['forum'])
{
$conditions['forum_ids'] = explode(',', $params['option']['forum']);
}
$fetchOptions = array(
'join' => XenForo_Model_Thread::FETCH_FORUM | XenForo_Model_Thread::FETCH_USER,
'permissionCombinationId' => $visitor['permission_combination_id'],
'readUserId' => $visitor['user_id'],
'watchUserId' => $visitor['user_id'],
'postCountUserId' => $visitor['user_id'],
'order' => 'last_post_date',
'orderDirection' => 'desc',
'limit' => $params['option']['limit'],
);
$threads = $this->getThreads($conditions, $fetchOptions);
foreach ($threads AS $threadID => &$thread)
{
if ($this->getModelFromCache('XenForo_Model_Thread')->canViewThreadAndContainer($thread, $thread))
{
$thread = $this->getModelFromCache('XenForo_Model_Thread')->prepareThread($thread, $thread);
$thread['canInlineMod'] = false;
$thread['showForumLink'] = true;
}
else
{
unset($threads[$threadID]);
}
}
return $threads;
}
public function getThreads(array $conditions, array $fetchOptions = array())
{
$whereConditions = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadConditions($conditions, $fetchOptions);
$sqlClauses = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadFetchOptions($fetchOptions);
$limitOptions = $this->getModelFromCache('XenForo_Model_Thread')->prepareLimitFetchOptions($fetchOptions);
if (!empty($conditions['forum_ids']))
{
$whereConditions .= ' AND thread.node_id IN ('.$this->_getDb()->quote($conditions['forum_ids']).')';
}
return $this->fetchAllKeyed($this->limitQueryResults('
SELECT thread.*
' . $sqlClauses['selectFields'] . '
FROM xf_thread AS thread
' . $sqlClauses['joinTables'] . '
WHERE ' . $whereConditions . '
' . $sqlClauses['orderClause'] . '
', $limitOptions['limit'], $limitOptions['offset']
), 'thread_id');
}
}
<xen:require css="message_user_info.css" />
<xen:require css="bb_code.css" />
<div id="recentNews2">
<xen:foreach loop="$RecentNews2" value="$news">
<div class="section sectionMain recentNews2" id="{$news.thread_id}">
<div class="primaryContent">
<div class="subHeading">
<div style="float: right; white-space: nowrap;">
<a href="{xen:link threads, $news}"><xen:datetime time="$news.promote_date" /></a>
<xen:if is="{$visitor.permissions.EWRporta.canPromote}">
(<a href="{xen:link 'threads/edit', $news}" class="OverlayTrigger">{xen:phrase edit}</a>)
</xen:if>
</div>
<a href="{xen:link threads, $news}">{$news.title}</a>
</div>
<div class="messageUserBlock">
<div class="avatarHolder">
<xen:if is="{$news.attach}">
<a href="{xen:link threads, $news}"><img src="{$news.attach.thumbnailUrl}" alt="{$news.attach.filename}" /></a>
<xen:elseif is="{$news.medio}" />
<div style="background: url('data/media/{$news.medio.media_id}.jpg') no-repeat;">
<a href="{xen:link 'full:media/popout', $news.medio}" class="OverlayTrigger"><img src="js/8wayrun/EWRmedio_play.png" width="160" height="90" /></a>
</div>
<xen:elseif is="{$news.image}" />
<a href="{xen:link threads, $news}"><img src="{$news.image}" alt="{$news.image}" style="max-height: 150px; max-width: 150px;" /></a>
<xen:else />
<xen:avatar user="$news" size="m" itemprop="photo" />
</xen:if>
</div>
</div>
<div class="messageContent baseHtml">
{xen:raw $news.messageHtml}
<div style="text-align: right;">
<a href="{xen:link threads, $news}" style="background: transparent url('@imagePath/xenforo/icons/redirect.png') no-repeat left bottom; padding-left: 20px;">
{xen:phrase continue_reading}
</a>
</div>
<div style="clear: right;"></div>
</div>
<div class="sectionFooter">
<div style="float: right; white-space: nowrap;">
<a href="{xen:link threads, $news}">{xen:phrase replies}: {xen:number $news.reply_count}</a>
</div>
{xen:phrase discussion_in_x_started_by_y_date_z, 'forum=<a href="{xen:link forums, $news}">{$news.node_title}</a>', 'name=<a href="{xen:link members, $news}" class="username">{$news.username}</a>', 'date=<a href="{xen:link threads, $news}">{xen:datetime $news.post_date, html}</a>'}
</div>
</div>
</div>
</xen:foreach>
<xen:if hascontent="true">
<div class="section sectionMain">
<xen:contentcheck>
<xen:if is="{$xenOptions.EWRporta_breakout}">
<div style="margin: -5px 0px; {xen:if '{$option.pagenav} && {$option.count} > {$option.limit}', 'float: right;'}">
<xen:include template="EWRporta_Footer" />
</div>
</xen:if>
<xen:if is="{$option.pagenav} && {$option.count} > {$option.limit}">
<div style="margin-left: 5px;">
<xen:pagenav link="portal" page="{$page}" perpage="{$option.limit}" total="{$option.count}" />
</div>
</xen:if>
</xen:contentcheck>
</div>
</xen:if>
</div>
We use essential cookies to make this site work, and optional cookies to enhance your experience.