MyBB Community Forums

Full Version: Recent Threads On Index [Updated 02-09-21]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 37 38 39 40 41 42
(2015-01-25, 05:35 PM)dragonexpert Wrote: [ -> ]
(2015-01-25, 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.

Yes, it would be nice, at least for recent thread table... latest version from github works fine BUT:
- names in forum collumn should be clickable
- is there any way how to disable relative time and show absolute?
- add expand/hide button to the right corner (same like in forum)
- add auto cutoff feature or at least cut off setting for forum title
Quote: names in forum collumn should be clickable

Can be done easily. I didn't think about that when I updated Github. You can use this code in your template:
<a href="{$mybb->settings['bburl']}/forumdisplay.php?fid={$thread['fid']}">{$thread['forum']}</a>"

Quote:is there any way how to disable relative time and show absolute?

Use the variable {$lastposttime} in your template instead of {$lastposttimeago}. You can also use {$lastpostdate} for the date of it.

Quote:add expand/hide button to the right corner (same like in forum)

I can try and add this, but can't make any promises.

Quote:add auto cutoff feature or at least cut off setting for forum title

That isn't something I intend on doing. Forum names are something you control where as thread titles are what member's choose. If you want to try and do that yourself look near this line
 if(strlen($thread['subject']) > $length && $length != 0)
OK, thank you. I have added clickable forum links and change date to absolute
Can we get a screenshot of how it looks like?
Of course - here you are - minimalism design. I just change template and css - now it looks amazing Smile

Last thing which I am missing is click to show/hide button, but it will be there soon... I hope .)

@dragonexpert

I have found a bug - users which do not have permissions to view some forums can see threads in recent thread table in index page. These threads should be hidden for them. I used to this plugin http://mods.mybb.com/view/recent-posts-forum-index and it hides these threads to users whose cannot see them.

Could you please FIX this? Thank you!

EDIT2: I see that you have this feature in your plugin but obviously it is not working properly - many users in my forum report this issue since I have added your plugin
Hi i need something like this for "selected" important threads, and or announcements.

can it be done?

and where do you change the template for this?

Hello,
I am using Xthreads

http://mybbhacks.zingaburga.com/showthread.php?tid=288

but my globals are not showing up

Quote:{$GLOBALS['threadfields']['key']}

help please
(2015-01-27, 09:09 PM)Eldenroot Wrote: [ -> ]Of course - here you are - minimalism design. I just change template and css - now it looks amazing Smile

Last thing which I am missing is click to show/hide button, but it will be there soon... I hope .)

@dragonexpert

I have found a bug - users which do not have permissions to view some forums can see threads in recent thread table in index page. These threads should be hidden for them. I used to this plugin http://mods.mybb.com/view/recent-posts-forum-index and it hides these threads to users whose cannot see them.

Could you please FIX this? Thank you!

EDIT2: I see that you have this feature in your plugin but obviously it is not working properly - many users in my forum report this issue since I have added your plugin

Seems to be a bug in the get_unsearchable_forums function that is part of core MyBB. In the code it does a check for canview and cansearch, but it seems it fails. When I have time, I'll figure out a rewrite. If there are forums you don't want the general public to see, put them in the setting for which forums to ignore.

@expat: You're post is a mess because of multiposting.

Quote:Hi i need something like this for "selected" important threads, and or announcements.

can it be done?

Yes it can, but not from this plugin. You can post in Plugin Requests.

If you wish to change the layout of it, its in Global Templates. recentthread_thread is for each individual thread; recentthread is the template that has the table.

The XThreads stuff should be posted in Plugin Support.
On Github I updated code that I think fixes the permission issue. Would like to hear back on if it is working. Once I get confirmation it is working, it will go to the Mods Site.
Firstly how do i update and keep my new formatting,

secondly, does AJAX break any new JS for how the threads are displayed? I rotated the threads and after a while the layout breaks, so I am thinking AJAX kicks in

the plugin Xthreads gave me this

// only 'username' and 'fid' keys are used from the $thread array
function xthreads_get_threadfields($tid, &$threadfields, $noextra=true, $thread=array()) {
 $tid = (int)$tid;
 if(!$tid) return;
 
 if(empty($thread))
 $thread = get_thread($tid);
 
 if($thread['fid'] == $GLOBALS['fid']) // use global cache if we're referring to current forum
 $threadfield_cache =& $GLOBALS['threadfield_cache'];
 if(!isset($threadfield_cache))
 $threadfield_cache = xthreads_gettfcache((int)$thread['fid']);
 
 if(!empty($threadfield_cache)) {
 global $db;
 $threadfields = $db->fetch_array($db->simple_select('threadfields_data', '`'.implode('`,`', array_keys($threadfield_cache)).'`', 'tid='.$tid));
 if(!isset($threadfields)) $threadfields = array();
 foreach($threadfield_cache as $k => &$v) {
 xthreads_get_xta_cache($v, $tid);
 xthreads_sanitize_disp($threadfields[$k], $v, $thread['username'], $noextra);
 }
 }
}

how can i pull it to the front?
If you were running the previous version, upload the new file.

The Xthreads stuff I don't really know, sorry.
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 37 38 39 40 41 42