MyBB Community Forums

Full Version: Transform forum index into activity feed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I wanna do something pretty unusual.

[Image: OwF8VMrh.jpg]

This is what I want my index page to look at. A bit of an explanation:

I've started to find the "forum" categorization structure pretty antiquated and useless, especially for a low-to-mid-activity community. The latest posts page — essentially a search for posts from the last X days, like "view today's posts" is here — is the best way to see what's new. So I thought bringing this functionality to the homepage would be ideal.

Ignore the right-side column and focus on the left. Here's what's there:
  • Start a Discussion/Post a Look buttons are just links to thread creations in two different forums, no big deal.
  • The threads are styled differently based on which forum contains them. In this example, you can see a regular discussion, a Brand discussion (image on right), and a Look discussion (image on left). It's easy to give them all their own styling by using a template conditional to see which forum they are in. The images are pulled from Xthreads.
  • Each thread has an embedded preview of the most recent post. I don't believe MyBB supports this functionality natively.
  • Threads with unread posts have a bolder title, a red line next to the most recent comment. Read threads are slightly translucent and thus de-emphasized, while still remaining beautiful and complete content.
  • It should scroll endlessly. MyBB doesn't have this functionality natively, but I've already implemented it in the looks section of my site (though if I'm honest, it's quite buggy, and if someone was willing to help me out with making it smoother I'd be very happy!)
My biggest question is: how do I get this to be the homepage of my site?

  • I thought of simply making the latests posts search the index. This seems to have two potential consequences. The first is that the URL is pretty ugly. The second is that, for all I know, this will make my site crash. I don't have any idea how disastrous this could be, if at all. Please warn me if I'm about to do something awful.
  • The only other solution seems to be some kind of custom plugin or core edit that forces the index to display every thread from every forum.
Does anyone have any idea what steps I should take to make this a reality?
(2015-03-20, 06:54 PM)brad-t Wrote: [ -> ]I thought of simply making the latests posts search the index.
Quote:The only other solution seems to be some kind of custom plugin or core edit
Making the latest posts display the content in the fashion you have described would probably require core edits anyway;
the best solution would be to add a separate file pulling the latest content and building it as desired (thread types, marking the read status) and setting it as the default page. The URL wouldn't have to look ugly as you can hide the filename part so that forum.com/ displays the latest content while forum.com/index.php still contains the standard forums list (index.php wouldn't actually be the homepage).
(2015-03-20, 07:37 PM)Devilshakerz Wrote: [ -> ]
(2015-03-20, 06:54 PM)brad-t Wrote: [ -> ]I thought of simply making the latests posts search the index.
Quote:The only other solution seems to be some kind of custom plugin or core edit
Making the latest posts display the content in the fashion you have described would probably require core edits anyway;

It wouldn't. Everything here can be done with XThreads and Template Conditionals, except the message preview (hell, that might actually be doable with XThreads, too). But I'm not against doing core edits or custom plugins.
I don't think you need core edits at all. Simple plugins. The only issue I see is to use a different template on a per forum basis. xThreads does not handles that for the forum index but shoul. be possible with a plugin.

What library do yoh use for the endless scrolling?

Yumi already has a last post tool tip preview plugin so that is one off.
(2015-03-20, 08:52 PM)Omar G. Wrote: [ -> ]The only issue I see is to use a different template on a per forum basis. xThreads does not handles that for the forum index but shoul.

Template Conditionals can check which forum the thread is in and serve a different code snippet based on that, though. So no issue.

I forgot Yumi's preview plugin included last post preview, so that's great news Smile

For endless scrolling, I use this: https://github.com/fieg/Infinite-Ajax-Scroll

Seems like the major difficulty, then, is making this the homepage?
Well, you could always try using this in your .htaccess:

DirectoryIndex search.php?action=getnew

That would make the new posts search page the default index page. Only issue is that if there are no new posts, nothing will show at all.
Can you share the code that gets the last posts currently?
You can try to modify the portal instead of the index. Would be easier at least.
It's just http://harajuju.net/search.php?action=getdaily&days=7

You could theoretically just do http://harajuju.net/search.php?action=ge...days=99999 or something. This will show every thread ever.

Why would using the portal be easier?
Easier than the forum index because it already loads all threads, and the are pagination plugins for 1.6 (1.8 already includes portal pagination) and it already loads xThreads data. Search would probably be easier than portal but there is the_ugly_ URL issue. If you move the search code to a custom file you will probably need to get xThreads working in that file.

If you choose the portal path you will only need to query the thread status, hijack the query to modify the order (default: dateline, desired: lastpost), and load the last post data, build the pagination for each thread (this may get a conflict with the jQuery plugin you posted before).

I'm just thinking of the best approach without core edits. I'm not a fan of those.
Quote:If you choose the portal path you will only need to query the thread status, hijack the query to modify the order (default: dateline, desired: lastpost), and load the last post data, build the pagination for each thread (this may get a conflict with the jQuery plugin you posted before).

I don't understand a word of this, so you can understand my difficulty. :')
Pages: 1 2