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-07-11, 11:47 AM)christbobby Wrote: [ -> ]Hello!
i just downloaded the plugin for recent post on index, hoe do i install it?
do i have to upload it to my cpanel?
Please Help!
i need it please
Reply via mail : <- snip ->

Please have upload it but can find it among my plugins
Upload it through ftp
To inc/plugins

So how do I change the thread link from last post to first post I want users to read the thread starter and not the last post
Go to this line:
$threadlink = get_thread_link($thread['tid'], "", "newpost");

Change it to
$threadlink = get_thread_link($thread['tid'], "");
Is is it possible to use this to show recent posts on an external web page? If so, how?

Thanks
It worked, thanks
Hey guys,

I've been looking into this for a few days now and thought maybe someone here could answer this question better for me. I've been trying to figure out a way to get recent threads to list by prefix; not to sort them, but to have whichever prefix value I enter as being true spit out listed threads. So if I had a prefix called "Unresolved" my recent threads list would only show threads with that prefix.

Would this be accomplished by using joins? Any and all help would be appreciated!! Thanks a bunch in advance Smile
If you look up the prefix id, you can edit this line:
WHERE 1=1 $where AND t.visible > {$approved} {$unsearchableforumssql} {$ignoreforums}

Change it to:
WHERE 1=1 AND t.prefix='x' $where AND t.visible > {$approved} {$unsearchableforumssql} {$ignoreforums}

Replace x with the prefix id.
Dragon,

Thank you soooooooooo much, this worked perfectly!
so all the forum restrictions are implemented in this plugin?
Is it possible for this plugin to show the threads with unread posts in bold text like most of the thread listings do by default?

I can edit the php just fine, but is that a variable that's already in the SQL query somewhere?

Why not use linked forums instead of plain text forum names in the third column?

Line ~296
    $thread['forum']  = '<a href="'.get_forum_link($thread['fid']).'">'.($forums[$thread['fid']]['name']).'</a>';

It seems the plugin doesn't take in account the forum permissions.

It checks for "unsearchable forums" and "unviewable forums" but it doesn't seem to consider the user's group and forum permissions. This is a problem if you have, say, a "moderator only" subforum that only mods should be able to see.

The following seems to work, to hide threads from forums that user can not view:

  $onlyusfids        = array();
$onlycanview = array(); //ADD THIS

  (...)

  foreach ($group_permissions as $fid => $forum_permissions)
  {
    if ($forum_permissions['canonlyviewownthreads'] == 1)
    {
      $onlyusfids[] = $fid;
    }
    // ADD THESE
    if ($forum_permissions['canview'] == 0)
    {
      $onlycanview[] = $fid;
    }
  }

  if (!empty($onlyusfids))
  {
    $where .= "AND ((t.fid IN(" . implode(',', $onlyusfids) . ") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(" . implode(',', $onlyusfids) . "))";
  }

// ADD THIS
if (!empty($onlycanview)) {
  $where .= "AND (t.fid NOT IN(" . implode(',', $onlycanview) . "))";
}
Is there any way for users to filter post how they want it ? This could be a suggestion for new version also Big Grin
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