Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Changing The Way MyBB Does Threads
Seabody Offline
Member
***
Posts: 54
Joined: Aug 2012
Post: #2
RE: Changing The Way MyBB Does Threads
Not tested this, but this should work. It's an altered version of my own query.

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$id = 0;
foreach ($id as $ids): 
$id++;
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE fid == (INSERT fid HERE) ORDER BY `tid`);
$threads = '';
while($thread = $db->fetch_array($query))
{
$threads .= "<span class=\"tid".$id."\">";
$threads .= "<strong><a href=\"showthread.php?tid={$thread['tid']}\" target=\"_blank\">".htmlspecialchars_uni($thread['subject'])."</a></strong>";
$author = "<a href=\"member.php?action=profile&uid=".$thread['uid']."\">{$thread['username']}</a>";
$threads .= " ({$author})";
$threads .= "</span>";
$threads .= "<br /><br />";
}


Now in your templates, use "{$threads}" and it'll display like this:

Changing The Way MyBB Does Threads (Eric J.)

That should give you a basic idea of how to work it, but as I say, I'm not 100% sure it'll work.

E: Missed some of your post, but this is what needs to be done to display all threads.

E2: And the classes are tid1, tid2, etc. ZiNgA mentions doing it with xThreads below, but since I was doing this, I figured it could be easily integrated.

(This post was last modified: 01-04-2013 02:15 PM by Seabody.)
01-04-2013 01:44 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Changing The Way MyBB Does Threads - Seabody - 01-04-2013 01:44 PM

 Standard Tools
Forum Jump: