MyBB Community Forums
[For 1.8] Recent Threads On Index [Updated 02-12-19] - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Releases (https://community.mybb.com/forum-102.html)
+---- Thread: [For 1.8] Recent Threads On Index [Updated 02-12-19] (/thread-159857.html)

Pages: 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


RE: Recent Threads On Index - dragonexpert - 02-06-2015

(02-06-2015, 03:45 PM)TBO29 Wrote: @dragonexpert maybe you should consider adding language support for international users. I added it as not everybody is using the english language as their default.

It is on my todo list. I rushed the 8.0 update because a permission issue was brought to my attention.


RE: Recent Threads On Index - expat - 02-07-2015

How can i bring an attachment thumbnail to the front? Maybe the last attachment, which is easiest to change?


RE: Recent Threads On Index - Eldenroot - 02-07-2015

@dragonexpert - OK, so problem with permissions is still here.

When unregistered/unlogged user open my forum, he can see threads in recentthread table which are not available for unlogged/unregistered users. After 30 seconds (when table is refreshed by ajax) these threads are hidden and everything is OK.


RE: Recent Threads On Index - dragonexpert - 02-07-2015

(02-07-2015, 09:32 AM)Eldenroot Wrote: @dragonexpert - OK, so problem with permissions is still here.

When unregistered/unlogged user open my forum, he can see threads in recentthread table which are not available for unlogged/unregistered users. After 30 seconds (when table is refreshed by ajax) these threads are hidden and everything is OK.

It uses the same function for both. I'm not sure why it would fail one and not the other.


RE: Recent Threads On Index - Eldenroot - 02-07-2015

Anyway there must be something wrong. I disabled these forums in recenthreads as a temporaly solution


RE: Recent Threads On Index - expat - 02-07-2015

perhaps do a double check, checking the user prior to the forums?


RE: Recent Threads On Index - expat - 02-09-2015

	$query = $db->query("
		SELECT t.*, u.username AS userusername, u.usergroup, u.displaygroup, u.avatar as threadavatar, u.avatardimensions as threaddimensions, lp.usergroup AS lastusergroup, lp.avatar as lastavatar, lp.avatardimensions as lastdimensions, lp.displaygroup as lastdisplaygroup, f.name as forum, a.aid, a.thumbnail as thumbnail
      FROM ".TABLE_PREFIX."threads t
      LEFT JOIN ".TABLE_PREFIX."attachments a ON (t.tid=a.pid)
	LEFT JOIN ".TABLE_PREFIX."forums f ON (t.fid=f.fid) 
      LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
      LEFT JOIN ".TABLE_PREFIX."users lp ON (t.lastposteruid=lp.uid)
      WHERE 1=1 $where AND t.visible=1 AND t.visible > {$approved} {$unsearchableforumssql} {$ignoreforums}
      ORDER BY t.lastpost DESC
      LIMIT $threadlimit 
		");


Hi How do i get that attachment image?


RE: Recent Threads On Index - Crazycat - 02-09-2015

You already have it: the field thumbnail, if not empty, is the attachment thumbnail.


RE: Recent Threads On Index - expat - 02-09-2015

(02-09-2015, 08:13 AM)Crazycat Wrote: You already have it: the field thumbnail, if not empty, is the attachment thumbnail.


Sorry I am a noob i called on all of my miniscule php knowlege and darn thumbnail wont come out...

there can be many thumbs in the thumbnail field in an array for a thread, i called it but all it did was return ARRAY !!

grrrr


RE: Recent Threads On Index - Crazycat - 02-09-2015

try something as:
if (is_array($thumbnails)) {
   foreach ($thumbnails as $thumbnail) {
      echo '<img src="'.$thumbnail.'" />';
   }
} else {
   echo '<img src="'.$thumbnails.'" />';
}
And adapt this to your real code.