Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Xthreads attachments on site.com/index.php
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #3
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

Code:
<div class="thead"><strong>{$lang->latest_threads}</strong></div>
<div>
{$threadlist}
</div>
<br />


portal_latestthreads_thread2

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<div class="custhovfordisplay" style="padding: 4px 0px 7px 0px;">
<a href="{$mybb->settings['bburl']}/{$thread['threadlink']}" title="{$thread['subject']}"><strong>{$thread['subject']}</strong></a></div>

<div class="sfondogrigio">

<div class="float_left">
<div align="center" style="height:80px;">
<a href="{$thread['threadlink']}">
<img src="{$GLOBALS['threadfields']['portalimg']['url']}/thumb80x80" width="{$GLOBALS['threadfields']['portalimg']['thumbs']['80x80']['w']}" height="{$GLOBALS['threadfields']['portalimg']['thumbs']['80x80']['h']}" alt="{$thread['subject']}" class="attachment" />
</a>
</div>
</div>

<div class="textright">
<ul>
<li><a href="{$thread['lastpostlink']}">Risposta di: </a>{$lastposterlink}</li>
<li>{$lastpostdate} alle {$lastposttime}</li>
</ul>
</div>

</div>


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
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Xthreads attachments on site.com/index.php - nier3 - 11-07-2013 07:10 PM

 Standard Tools
Forum Jump: