Multi-column popular threads?
#11 02-06-2014 
No, that's running just the one variant of the gallery plugin. Did you mean posts or threads? There are almost 20,000 posts on the forum, close to 600 threads. 1300 members.

Probably best if I finish how I want the design to look first, then worry about this later and see what I can do to make it quicker.

Back to the zip file you sent yesterday - are you saying that I can copy that file, change the names, and use them all at the same time to produce the layout I'd like?

#12 02-06-2014 
I mean posts as we are querying the posts table to get the number of replies.

Yes, you can make a copy of the original (edit it like I said) and reuse it. Have 5 plugins running. As long as each one is using a different query to run it will work, so you have myplugin.php, myplugin_2.php, myplugin_3.php etc in your plugins folder.

#13 03-06-2014 
What's the tag for showing views? I tried using {$fishhatt_recentviews} and {$fishhatt_views} but it just shows '0'.

Ah, no worries, I've sorted it.
(This post was last modified: 03-06-2014 03:00 PM by thredder.)

#14 05-06-2014 
Hi Lee,

Got all 5 galleries working now, all great. I'm trying to get the 'gotounread' icon working on them, so it's obvious when there's been new posts, and it doesn't seem to want to appear. Am I missing something? Is it supposed to work automatically or do I need to alter something in the template?

Thanks!

#15 05-06-2014 
gotounread? Not in the query - that is a forumdisplay thing.

#16 05-06-2014 
Ah right. Is there no way then?

#17 05-06-2014 
not for that no. Sorry.

#18 05-06-2014 
Booooo!!

#19 07-06-2014 
Hi Lee,

Another question for you, sorry. Is it possible to pull the first comment from a thread and display it underneath the image? Kind of like a preview of what's in the thread which I can truncate to 150 characters or something like that.

#20 07-06-2014 
yes it is to an extent. There is a plugin called thread tooltip by Zingaburga - it adds a field to the thread table called postpreview and caches it. It is very effective. If you have that plugin then you can edit the query to call the postpreview and add a variable to output it to the template.

something like this:

Code:
$query = $db->query("SELECT a.*, f.name, th.closed, th.username, th.tid, th.fid, th.replies, th.postpreview, th.subject, p.visible, count( p.pid ) AS replies
                            FROM ".TABLE_PREFIX."threads th
                            INNER JOIN ".TABLE_PREFIX."posts p ON th.tid = p.tid
                            INNER JOIN ".TABLE_PREFIX."forums f ON th.fid=f.fid
                            INNER JOIN ".TABLE_PREFIX."xtattachments a ON th.tid=a.tid
                            WHERE p.dateline >= {$cutoff} {$fidnot} AND p.pid!=th.firstpost AND p.visible=1 AND th.replies>0 AND a.thumbs!=' ' AND th.closed NOT LIKE 'moved|%' AND th.fid IN ('".implode("','", $fishhattatgal_tid_array)."')
                            GROUP BY p.tid
                            ORDER BY replies DESC
                            LIMIT $fishhattatgal_num
                            ");
                            
        while($fishhatt = $db->fetch_array($query))
        {
            $fishhatt_username = htmlspecialchars_uni($fishhatt['username']);
            $fishhatt_preview = htmlspecialchars_uni($fishhatt['postpreview']);
            $fishhatt_views = number_format($fishhatt['recentviews']);
            $fishhatt_replies = number_format($fishhatt['replies']);
            $fishhatt_forumname = htmlspecialchars_uni($fishhatt['name']);
            $fishhatt_title = htmlspecialchars_uni($fishhatt['subject']);
            $fishhatt_postlink = get_thread_link(intval($fishhatt['tid']));
            $fishhatt_forumlink = get_forum_link(intval($fishhatt['fid']));
            $fishhatt_datetime = my_date($mybb->settings['dateformat'], $fishhatt['uploadtime']).' '.my_date($mybb->settings['timeformat'], $fishhatt['uploadtime']);
            $fishhatt_att_thumb = xthreads_get_xta_url($fishhatt).'/thumbindexthumb';
            eval("\$fishhatt_gallery_gallery .= \"".$templates->get("fishhatt_gallery_gallery")."\";");
        }
        eval("\$fishhattachment_gallery = \"".$templates->get("fishhatt_gallery")."\";");



Sorry, that is a members only option