Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2014-07-14 15:24:35

sdousley
Member
Registered: 2014-07-14
Posts: 11

Retrieving latest posts in a forum

Hi

I am looking to get a list of the latest posts from a specific forum (as configured) from within a Laravel app.

What is the best way to achieve this? Is it just a case of creating a regular model, and retreive the posts using standard eloquent methods, or is there some form of package/plugin for laravel 4.2 that I can use for this already?

My laravel setup doesn't have any prefixes on tables, but the fluxbb does (fluxbb_).

If there's any other information that would help, let me know, and I can see what I know. smile

TIA.

Offline

#2 2014-07-14 16:21:24

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,876
Website

Re: Retrieving latest posts in a forum

Welcome! smile

We could, of course, add some simple Eloquent models to my auth-fluxbb library. Feel free to open an issue there if you would like to see those.

For now, simply accessing extern.php might help you - see the usage notes at the top of the file.

Please note that this assumes you want to access a FluxBB 1.5 instance from a Laravel app. FluxBB 2.0 - which is built using Laravel - is not quite done yet.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#3 2014-07-14 17:32:24

sdousley
Member
Registered: 2014-07-14
Posts: 11

Re: Retrieving latest posts in a forum

Hey

Something being added to the auth-fluxbb would be awesome.  I thought about posting something there, but thought that as it's not really auth related, it didn't feel like the best place to ask, so thought it would be better to ask here.

You are correct in assuming Fluxbb 1.5, which is the version I'm working on (out of interest, is there any idea, even roughly when 2.X might be out?)

If you want me to put a post onto the auth-fluxbb "issues" I can add something there to "formally" request this be added to auth-fluxbb.

Steve

Offline

#4 2014-07-14 21:30:01

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,876
Website

Re: Retrieving latest posts in a forum

Yeah, please add an issue there.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#5 2014-07-15 07:36:43

sdousley
Member
Registered: 2014-07-14
Posts: 11

Re: Retrieving latest posts in a forum

Issue #15 created - feel free to close this off if needed.

Offline

#6 2014-07-29 16:54:09

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,876
Website

Re: Retrieving latest posts in a forum

For everybody interested in accessing FluxBB data using Eloquent models, I've started a gist with example models. I'll extend this in the future, so that more things are possible.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#7 2014-07-29 23:45:20

Sxderp
Member
Registered: 2012-11-02
Posts: 72

Re: Retrieving latest posts in a forum

Franz wrote:

For everybody interested in accessing FluxBB data using Eloquent models, I've started a gist with example models. I'll extend this in the future, so that more things are possible.

So things like group permissions, posts, usernames, etc?

Offline

#8 2014-07-30 09:06:14

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,876
Website

Re: Retrieving latest posts in a forum

Currently only posts and topics. What do you need?


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#9 2014-07-30 19:10:41

Sxderp
Member
Registered: 2012-11-02
Posts: 72

Re: Retrieving latest posts in a forum

How about getting the group that a user is in? And (if they're implemented) the permissions of that group? These two are probably the only things I'd need for my stuff.

Offline

#10 2014-07-31 08:27:44

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 5,876
Website

Re: Retrieving latest posts in a forum

I added models for those two.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

Board footer

Powered by FluxBB 1.5.7