nier3
Member
Posts: 125
Joined: Jul 2012
|
RE: Xthreads attachments on site.com/index.php
(11-07-2013 11:46 AM)ZiNgA BuRgA Wrote: You haven't posted all your edits.
You mean global templates?
portal_latestthreads2
portal_latestthreads_thread2
index.php
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
// Latest forum discussions2
if($mybb->settings['portal_showdiscussions'] != 0 && $mybb->settings['portal_showdiscussionsnum'])
{
$altbg = alt_trow();
$threadlist = '';
$piccount=4;
$query = $db->query("
SELECT a.updatetime, a.uploadtime, a.attachname, a.filename, a.thumbs, t.*
FROM ".TABLE_PREFIX."xtattachments a
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=a.tid)
WHERE t.visible=1 AND a.thumbs!=' ' AND t.showinportal='1' AND t.closed NOT LIKE 'moved|%' AND t.fid IN ('128')
GROUP BY a.tid
ORDER BY t.dateline DESC
LIMIT 0, $piccount
");
while($thread = $db->fetch_array($query))
{
$forumpermissions[$thread['fid']] = forum_permissions($thread['fid']);
// Make sure we can view this thread
if($forumpermissions[$thread['fid']]['canview'] == 0 || $forumpermissions[$thread['fid']]['canviewthreads'] == 0 || $forumpermissions[$thread['fid']]['canonlyviewownthreads'] == 1 && $thread['uid'] != $mybb->user['uid'])
{
continue;
}
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $thread['lastposter'];
}
else
{
$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);
}
if(my_strlen($thread['subject']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";
}
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
eval("\$threadlist .= \"".$templates->get("portal_latestthreads_thread2")."\";");
$altbg = alt_trow();
}
if($threadlist)
{
// Show the table only if there are threads
eval("\$latestthreads2 = \"".$templates->get("portal_latestthreads")."\";");
}
}
|
Sorry and thank you
(This post was last modified: 11-11-2013 03:49 AM by nier3.)
|
|
11-07-2013 07:10 PM |
|