Showing most recent forum posts on main page/index?

Forum
Last Post
Threads / Messages

Ittermat

The awesomesauce
Member
Joined
Feb 2, 2016
Messages
304
Points
18
Location
in front of my laptop
Mysidian Dollar
21,294
Is there a way to do this? (preferably in the sidebar.) I wanna show the most recent posted in/ created forum posts on my index page. (just the titles with a link to it)
 
Last edited:
I'll message you on Discord and if we can figure it out I'll post the answer here. I'm sure it's an if page working with a $today date type code that looks at what db stuff was posted for the day then displays.
 
@Hall of Famer Do you know how to call things from mybb onto a main site? We cant figure out the correct db call- coding and stuff- or if its even possible.
I assume its something with $mybb? instead of $mysidia.. but we dunno the rest- if this is possible any info would be appreciated- especially if someone else wants to call something from the Forums to the main site too.

Oh right im on 1.3.4

Thanks in advance famer
 
well, in the forum integration script(/functions/functions_forums.php for Mys v1.3.4) you should find something like this:

PHP:
    include("inc/config_forums.php");   
    $forums = new Database($mybbdbname, $mybbhost, $mybbuser, $mybbpass, $mybbprefix) or die("Cannot connect to forum database, please contact an admin immediately.");

So you can create a database object for the forum database using the above code. This allows you to fetch rows from MyBB forum tables, hopefully the hint is helpful.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,260
Messages
33,016
Members
1,601
Latest member
Fortuna
BETA

Latest Threads

Top