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 - Hamster24 - 01-20-2015

Great plugin i was some other persons recent posts on index but this one is great . it also has the latest avatar options.
can i change the template of this recent threads?


RE: Recent Threads On Index - dragonexpert - 01-20-2015

(01-20-2015, 11:22 AM)Hamster24 Wrote: Great plugin i was some other persons recent posts on index but this one is great . it also has the latest avatar options.
can i change the template of this recent threads?

You can change the templates how you want, but you may not redistribute them.


RE: Recent Threads On Index - Hamster24 - 01-21-2015

thanks for the information
oh ok sorry for bad english in last post. maybe because of cold fingers.


RE: Recent Threads On Index - randomname49 - 01-21-2015

Would really intesting on seeing some pictures of it ,


RE: Recent Threads On Index - Eldenroot - 01-24-2015

(01-20-2015, 11:59 AM)dragonexpert Wrote:
(01-20-2015, 11:22 AM)Hamster24 Wrote: Great plugin i was some other persons recent posts on index but this one is great . it also has the latest avatar options.
can i change the template of this recent threads?

You can change the templates how you want, but you may not redistribute them.

It takes a lot of space - you take minify it Big Grin I prefer something like this: 
http://mods.mybb.com/uploads/previews/67216-1351697730-latestpostsforum.png

OK, I changed temlate... now it looks better. One thing - I need to show next to the post the forum where it is


RE: Recent Threads On Index - dragonexpert - 01-25-2015

Quote:OK, I changed temlate... now it looks better. One thing - I need to show next to the post the forum where it is

There are two ways you can do this. Longer way In the function recentthread_list_threads, globalize the variable $cache. Somewhere in the while($thread = $db->fetch_array($query)) You'll need to add this code:

if(!is_array($forums))
{
$forums = $cache->read("forums");
}
$thread['forum'] = $forums[$thread['fid']]['name'];

The second method is to alter the query itself. Change the query to
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
			FROM ".TABLE_PREFIX."threads t
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 > {$approved} {$unsearchableforumssql} {$ignoreforums}
			ORDER BY t.lastpost DESC
			LIMIT $threadlimit

In your templates you will then use {$thread['forum']} to output the name of the forum the thread is in. I can add this feature in the next release and get rid of the views column.


RE: Recent Threads On Index - Eldenroot - 01-25-2015

It would be nice to have it the next version... thank you!


RE: Recent Threads On Index - dragonexpert - 01-25-2015

I pushed the edits to the Github branch. If something doesn't work right, let me know.


RE: Recent Threads On Index - Eldenroot - 01-25-2015

Ok, thank you. I will check later today, I am not at home now.

Can you add a language support? Now lang string are hard coded in templates, right?


RE: Recent Threads On Index - dragonexpert - 01-25-2015

(01-25-2015, 05:31 PM)Eldenroot Wrote: Ok, thank you. I will check later today, I am not at home now.

Can you add a language support? Now lang string are hard coded in templates, right?

A future version, yes I can add language support. It is currently hard coded in templates.