Thread Rating:
  • 10 Vote(s) - 3.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Recent Threads On Index [Updated 02-09-21]
#71
(2015-02-06, 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.
Reply
#72
How can i bring an attachment thumbnail to the front? Maybe the last attachment, which is easiest to change?
Reply
#73
@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.
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#74
(2015-02-07, 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.
Reply
#75
Anyway there must be something wrong. I disabled these forums in recenthreads as a temporaly solution
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#76
perhaps do a double check, checking the user prior to the forums?
Reply
#77
	$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?
Reply
#78
You already have it: the field thumbnail, if not empty, is the attachment thumbnail.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord
Reply
#79
(2015-02-09, 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
Reply
#80
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.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)