Top 10 topics on index page with thread images?
Download the gallery plugin
Open the file and find this query:
$query = $db->query("
SELECT a.updatetime, a.md5hash, a.uploadtime, a.aid, a.attachname, a.filename, a.thumbs, a.field, 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.closed NOT LIKE 'moved|%' AND t.fid IN ('".implode("','", $fishhattatgal_tid_array)."')
GROUP BY t.tid
ORDER BY a.aid DESC
and change ORDER BY a.aid DESC to ORDER BY t.views DESC
and it should work.
That sort of works - the area does display at the top of the index page - but all it shows are the thread titles, not the images.
Also, how would it display only the threads with the most replies?
Apologies, it does pull the threads with the most replies.
What would I do to the area if I want the plugin to just show the image, the number of replies, and the title?
Is this index page in your forum? Or is it in a higher level page? If it is then you need to fix the urls set up in the custom threadfields. If it isn't then that is another issue and it should work. Bear in mind that the thumbnail size is hardcoded to 160x120. If that image size isn't in your setup then you can open the plugin file and find this line:
$fishhatt_att_thumb = xthreads_get_xta_url($fishhatt).'/thumb160x120';
and change the thumb??x??? to a size you have. Example:
$fishhatt_att_thumb = xthreads_get_xta_url($fishhatt).'/thumb320x240';
I actually want the images to show at full size so I can control them myself with css, and they're doing that now.
It's an excellent plugin as it'll only show the threads with an image, so that eliminates the worry about the area showing gaps where images should be.
Still need to put the replies number and the title in the area. Also, how would I go about adding a restriction to the timeframe? In other words, it currently just pulls them from all time, but how about if it was to only show top replies for that day, week, or month?
Thanks Lee, I really do appreciate your help, it's a massive relief. If I have to pay you for it then please just let me know.
If not, then created time would probably be better than nothing, as otherwise the homepage would always just show the threads most replied to for all time.
Its doable - everything is - its just whether it is wise to do so.
The views in a time frame are recorded nowhere in MyBB. There is a plugin (not free) that actually creates a new table and tracks the trending in a fixed timeframe. If you had that plugin (and its table) then I could adjust the query of the gallery plugin to pull the data.
You can get it by subscribing to Pavemen's forum here: http://www.communityplugins.com/forum/my...own&did=17 COST: 7.50.