Thread Rating:
  • 10 Vote(s) - 3.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Recent Threads On Index [Updated 02-12-19]
#31
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?
Reply
#32
(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.
Reply
#33
thanks for the information
oh ok sorry for bad english in last post. maybe because of cold fingers.
Reply
#34
This user has been denied support. This user has been denied support.
Would really intesting on seeing some pictures of it ,
Reply
#35
(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/67...sforum.png

OK, I changed temlate... now it looks better. One thing - I need to show next to the post the forum where it is
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#36
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.
Reply
#37
It would be nice to have it the next version... thank you!
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#38
I pushed the edits to the Github branch. If something doesn't work right, let me know.
Reply
#39
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?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#40
(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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)