Quote:
Originally Posted by SnakeV
How can i move it to other location?
For example i want to put it below the Similar Threads.
Thanks
|
I Also Had the Same Question.
Thank You
ry215 for Sharing this Great Mod. :up:
(Nominated, Of Course).
Perhaps You Can Include the Possibility to Choose to Locate the Code of the "showthread_lxt" Template in the Postbit (as it is by Default), and also in a Location on the "ShowThread" Template, using a Replacing Code like "$similarthreads".
Now, to Place it Under "Similar Threads", (Code $similarthreads in the ShowThread Template):
1.
Disable Plugin "
LXT - Postbit Complete".
2.
On Template "
showthread_lxt", Delete the First "
<br />" at the Beginning of the Code. (That "<br />" adds an Extra Space that is Not Necessary).
3.
Create and Activate a New Plugin:
Name: LXT - Postbit Complete - Under Similar Threads - ShowThread_Complete
Hook: showthread_complete
Code:
Code:
global $vbulletin, $db;
if ($vbulletin->options['lxt_enable']) {
$lxt_limit = $vbulletin->options['lxt_limit_number'];
$trimthreadtitle = $vbulletin->options['lxt_trimthreadtitles'];
$excludedforums = '';
if ($vbulletin->options['lxt_exclude_forums'] !== '') {
$excludedforums = ',' . $vbulletin->options['lxt_exclude_forums'];
}
$excludedforums = substr($excludedforums, 1);
if ($excludedforums != "") {
$excludedforums = "AND thread.forumid NOT IN ($excludedforums)";
}
$get_lxts = $db->query_read_slave("
SELECT
thread.threadid, thread.title, thread.lastpost, thread.forumid,
thread.replycount, thread.lastposter, thread.dateline, thread.prefixid,
IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views,
thread.visible, user.username, user.userid, user.usergroupid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
forum.title_clean as forum_title, post.pagetext AS preview, post.allowsmilie, post.postid
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.username = thread.lastposter)
LEFT JOIN " . TABLE_PREFIX . "forum as forum ON (thread.forumid = forum.forumid)
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)
WHERE thread.visible = '1' AND post.visible = '1' AND thread.open!='10'
AND thread.postuserid IN (".$thread['postuserid'].")
$excludedforums
ORDER BY thread.dateline DESC
LIMIT $lxt_limit");
if ($db->num_rows($get_lxts))
{
while ($get_lxt = $db->fetch_array($get_lxts)) {
$fperms = fetch_permissions($get_lxt['forumid']);
if (($fperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND
(($fperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) OR ($vbulletin->userinfo['userid'] != 0 AND $simthread['postuserid'] == $vbulletin->userinfo['userid']))
)
{
if (isset($get_lxt['preview']) AND $vbulletin->options['ltx_threadpreview'] > 0)
{
$get_lxt['preview'] = strip_quotes($get_lxt['preview']);
$get_lxt['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($get_lxt['preview'], false, true), $vbulletin->options['ltx_threadpreview']));
}
if ($get_lxt['prefixid'])
{
$get_lxt['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_$get_lxt[prefixid]_title_plain"]);
$get_lxt['prefix_rich'] = $vbphrase["prefix_$get_lxt[prefixid]_title_rich"];
}
else
{
$get_lxt['prefix_plain_html'] = '';
$get_lxt['prefix_rich'] = '';
}
$get_lxt[fullthreadtitle] = strip_tags($get_lxt[title]);
$get_lxt[musername] = fetch_musername($get_lxt);
if ($trimthreadtitle > 0) {
$get_lxt[titletrimmed] = fetch_trimmed_title($get_lxt[fullthreadtitle], $trimthreadtitle);
}
else {
$get_lxt[titletrimmed] = $get_lxt[fullthreadtitle];
}
$get_lxt[newpost] = ($get_lxt[lastpost] > $vbulletin->userinfo['lastvisit'])? 'new' : 'old';
$get_lxt_forumtitle = strip_tags($vbulletin->forumcache["$get_lxt[forumid]"]['title_clean']);
$get_lxt_startdate = vbdate($vbulletin->options['dateformat'], $get_lxt[dateline]);
$get_lxt_time = vbdate($vbulletin->options['timeformat'], $get_lxt[dateline]);
eval('$lxt_bits .= "' . $vbulletin->templatecache['showthread_lxt_bits'] . '";');
}
}
$threadstart = $thread['postusername'];
eval('$similarthreads .= "' . fetch_template('showthread_lxt') . '";');
}
$db->free_result($get_lxts);
}
4.
That's it, the Location is Adjusted by the Following Line in the Code:
Code:
eval('$similarthreads .= "' . fetch_template('showthread_lxt') . '";');
Notice the $similarthreads in the Code.
My Best Regards.