PDA

View Full Version : Recent Threads is displaying something strange...


Warrior
09-22-2005, 04:33 AM
What is all this on top of the recent threads table? It looks like either a misalligned table tag or code that was meant to be deleted? I am assuming it is an error in recentthreads.php ... :ermm:

http://www.warriorfx.com/forums/cmps_index.php

BTW, this is vBadvanced 2 for 3.0.x

Can someone please tell me how to fix the latesttopics.php file to display everything in the table???

This is what it looks like now:


<?php
// ++================================================ =========================++
// || vBadvanced CMPS v2.0.0 (vB 3.0.x) - 18870
// || ? 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved
// || This file may not be redistributed in whole or significant part.
// || http://vbadvanced.com
// || Downloaded 20:45, Wed Sep 21st 2005
// ||
// ++ ================================================== ======================++

if ($mod_options['portal_threads_maxthreads'])
{
if ($mods['modcol'] == 1)
{
eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_latestthreads_head') . '";');

$mods['colspan'] = 4;

if ($mod_options['portal_threads_lastpost'])
{
$mods['colspan']++;
}

if ($mod_options['portal_threads_showforum'])
{
$mods['colspan']++;
}
}

$mod_options['portal_threadids'] = unserialize($mod_options['portal_threadids']);

if (!empty($mod_options['portal_threadids']))
{
$mods['threadids'] = 'AND thread.threadid IN(' . implode(',', array_keys($mod_options['portal_threadids'])) . ')';
}
else if ($mod_options['portal_threads_forumids'])
{
$mods['inforums'] = explode(',', $mod_options['portal_threads_forumids']);

if ($mod_options['portal_applypermissions'])
{
$mods['inforums'] = array_diff($mods['inforums'], $adv_forumperms);
}
if (empty($mods['inforums']))
{
$mods['nodisplay'] = true;
}
else
{
$mods['inforums'] = 'AND thread.forumid IN(' . implode(',', $mods['inforums']) . ')';
}
}

if (!$mods['inforums'] AND !empty($adv_forumperms) AND $mod_options['portal_applypermissions'])
{
$mods['exforums'] = 'AND thread.forumid NOT IN(' . implode(',', $adv_forumperms) . ')';
}

$show['lastpost'] = $mod_options['portal_threads_lastpost'];

if (!$mods['nodisplay'])
{
if ($mod_options['portal_threads_orderby'] == 'dateline')
{
$mod_options['portal_threads_orderby'] = 'thread.dateline';
}

if (!$mod_options['portal_threads_orderby'])
{
$mod_options['portal_threads_orderby'] = 'lastpost';
}
if (!$mod_options['portal_threads_direction'])
{
$mod_options['portal_threads_direction'] = 'DESC';
}

$threads = $DB_site->query("
SELECT
" . iif($mod_options['portal_threads_showrating'], 'IF(votenum >= ' . $vboptions['showvotes'] . ', votenum, 0) AS numbvote, IF(votenum >= ' . $vboptions['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg,') . "
thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid
" . iif($mod_options['portal_threads_showsubscribed'] AND $bbuserinfo['userid'], ', NOT ISNULL(subscribethread.subscribethreadid) AS subscribed') .
iif($mod_options['portal_threads_showicon'], ', thread.iconid AS threadiconid, iconpath AS threadiconpath') .
iif($mod_options['portal_threads_showforum'], ',thread.forumid, forum.title AS forumtitle') .
iif ($mod_options['portal_threads_showpreview'] AND $vboptions['threadpreview'], ', post.pagetext AS preview') . "
FROM " . TABLE_PREFIX . "thread as thread
" . iif($mod_options['portal_threads_showicon'], ' LEFT JOIN ' . TABLE_PREFIX . 'icon USING (iconid)') .
iif($mod_options['portal_threads_showforum'], ' LEFT JOIN ' . TABLE_PREFIX . 'forum AS forum ON (thread.forumid = forum.forumid)') .
iif($mod_options['portal_threads_showpreview'] AND $vboptions['threadpreview'], ' LEFT JOIN ' . TABLE_PREFIX . 'post AS post ON (post.postid = thread.firstpostid)') .
$deljoin .
iif ($mod_options['portal_threads_showsubscribed'] AND $bbuserinfo['userid'], ' LEFT JOIN ' . TABLE_PREFIX . 'subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = ' . $bbuserinfo['userid'] . ')') . "
WHERE open != 10 AND thread.visible = 1
$mods[threadids]
$mods[inforums]
$mods[exforums]
$notdeleted
ORDER BY $mod_options[portal_threads_orderby] $mod_options[portal_threads_direction]
LIMIT $mod_options[portal_threads_maxthreads]
");
$mods['threadcount'] = $DB_site->num_rows($threads);
while ($thread = $DB_site->fetch_array($threads))
{
$bgclass = exec_switch_bg();

if (strlen($thread['title']) > $mod_options['portal_threads_maxchars'] AND $mod_options['portal_threads_maxchars'])
{
$thread['title'] = fetch_trimmed_title($thread['title'], $mod_options['portal_threads_maxchars']);
}

if ($mod_options['portal_threads_maxwordchars'])
{
$thread['titlecheck'] = explode(' ', $thread['title']);

if (!empty($thread['titlecheck']))
{
foreach ($thread['titlecheck'] AS $key => $word)
{
if (strlen($word) > $mod_options['portal_threads_maxwordchars'])
{
$thread['title'] = fetch_trimmed_title($thread['title'], $mod_options['portal_threads_maxwordchars']);
$thread['titletrimmed'] = true;
}
}
}
}

$thread = process_thread_array($thread, '', $mod_options['portal_threads_showicon']);

// Rating
$thread['votenum'] = $thread['numbvote'];
if ($mod_options['portal_threads_showrating'])
{
$thread['rating'] = intval(round($thread['voteavg']));
}

eval('$home["$mods[modid]"][\'content\'] .= "' . fetch_template('adv_portal_latesttopicbits') . '";');
}
}

if (!$mods['threadcount'] OR $mods['nodisplay'])
{
if ($mods['modcol'] == 1)
{
$home["$mods[modid]"]['content'] .= '<tr><td colspan="' . $mods['colspan'] . '" class="' . $bgclass . '">' . construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']) . '</td></tr>';
}
else
{
$show['tablerow'] = true;
$home["$mods[modid]"]['content'] .= construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']);
}
}

$DB_site->free_result($threads);
unset($thread);

}

?>


bump

I discovered the problem while working on a support ticket earlier and updated the package here a few hours ago. If you'll download it again, upload the install file, and select the option to reinstall your templates then that should take care of the problem.
FYI - got it at vbadvanced.com