solved recent jrForum posts

blindmime
@blindmime
11 years ago
772 posts
I would like to have a list of most recent forum posts on my home page. How would I do this? I've tried a basic jrCore list command, but it looks like it may be more complicated than using the modules item_list.tpl to output on the front page.
updated by @blindmime: 08/16/14 10:23:53AM
paul
@paul
11 years ago
4,335 posts
Can you not just define another template with a simpler 'forum_text' listing?

{jrCore_list module="jrForum" order_by="_created numerical_desc" template="forum_front_page.tpl"}

Then for forum_front_page.tpl use a stripped down copy of the jrForum's item_list.tpl


--
Paul Asher - JR Developer and System Import Specialist
blindmime
@blindmime
11 years ago
772 posts
I tried using something like index_list_videos.tpl and repurposing it for jrForum (which I've done for youtube videos), but I think jrForum has some differences. At least, I'm not getting any output from jrCore_list even with something like:

{jrCore_list module="jrForum" order_by="_created numerical_desc"} (testing if maybe my template is bad and seeing if I could at least generate SOMETHING).
blindmime
@blindmime
11 years ago
772 posts
Actually I have this in index.tpl: {jrCore_list module="jrForum" order_by="_created desc" template="item_list.tpl" limit="10"} which is good, but it only outputs forum posts by the admin. I haven't altered the module template.
updated by @blindmime: 07/06/14 11:48:05PM
brian
@brian
11 years ago
10,149 posts
So in the forum datastore, there are 2 "types" of entries - "forum topics" which are for a specific topic, and "forum posts" which are posts TO a topic. Try this:

{jrCore_list module="jrForum" search="forum_post_count > 0" order_by="_created desc" template="item_list.tpl" limit="10"}

That will only get entries that have a "forum_post_count" key, which is only on the forum topic entries.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
In my datastore I only see 2 posts, which are posts the admin user has made. I've just started this forum and there are 5 total posts, the other 3 are by other users and they're not showing in the datastore, in the ACP tools area.

I do see data in the jr_jrforum_item_key table. Is there a reason the other posts don't show in the datastore? Will I not be able to include them in search results?
brian
@brian
11 years ago
10,149 posts
when browsing the datastore, you should see everything. I just tested here on Jamroom.net and I'm not see any problems. Do you see the forum posts on the other profiles when you view the profiles?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
I currently only allow the admin user to have a forum on its profile, but everyone can post and all their posts show up in the forum. But only the admin user's posts show up in the datastore. So when I do a jrCore_list like above it only pulls out posts from the admin user even though there are additional posts in the database. They show up in the forum and I can see them in phpmyadmin.
brian
@brian
11 years ago
10,149 posts
blindmime:
I currently only allow the admin user to have a forum on its profile, but everyone can post and all their posts show up in the forum. But only the admin user's posts show up in the datastore. So when I do a jrCore_list like above it only pulls out posts from the admin user even though there are additional posts in the database. They show up in the forum and I can see them in phpmyadmin.

When you say "only the admin user's posts show up in the datastore" do you mean only the admin's posts are showing up in the jrCore_list call, or do you mean that when any other users tries to write a follow up post, the post is not being saved to the datastore?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
No posts by other users show up in the datastore. Only the admin user's posts show up in the datastore. And those are all that show up in the call.
brian
@brian
11 years ago
10,149 posts
blindmime:
No posts by other users show up in the datastore. Only the admin user's posts show up in the datastore. And those are all that show up in the call.

Well if there are no other posts in the datastore, then that is why you do not see anything else in your jrCore_list call.

So when you log in as a normal user and make a post to the admin forum, that entry is not being saved? What error do you get when you submit?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
That's the thing. All of the posts are being saved in the database. There is no error. The posts show up and everything in the forum and I can see them in the database via phpmyadmin. They just don't show up in the datastore and I can't list them via the jrForum call. You can see them here: the two posts here are non-admin user posts: http://tapegerm.com/home/forum/software/1/what-software-does-anixas-use -- but they don't show up in the jrCore_list call I have on the home page (left column, bottom page).

Also, the first listed post in the call that does show up doesn't show its Category, like the 2nd listed post does, and both of those posts are in the same category.
brian
@brian
11 years ago
10,149 posts
My apologies - I think there's some confusion here based on what we're calling things. When you say "They just don't show up in the datastore", that means to me they are not being saved in the database - the "datastore" is the database back end for the module (i.e. there is no "datastore" that is separate from the database).

So since you have confirmed that the posts are being saved to the DataStore, then the issue is a jrCore_list issue.

I will see if I can replicate this here - can you show me the exact jrCore_list call you are using on your front page?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
{jrCore_list module="jrForum" search="forum_profile_id > 0" order_by="_created desc" template="item_list.tpl" limit="10"} is what I'm trying since I want the most recent posts. I've tried the one you posted above, but, of course, that shows active categories. Both behave as if there are only admin-user posts in the forum.
blindmime
@blindmime
11 years ago
772 posts
Any thoughts?

Also, I had a spam user sign up and make 3 posts in the forum. I deleted the user and his posts don't show, but the topic count for the category he posted in still reflects his posts.

Also random forum avatars that have been showing suddenly stop showing (grey question mark shows).

I've done a full integrity check.
updated by @blindmime: 07/12/14 11:10:36AM
brian
@brian
11 years ago
10,149 posts
blindmime:
Any thoughts?

Also, I had a spam user sign up and make 3 posts in the forum. I deleted the user and his posts don't show, but the topic count for the category he posted in still reflects his posts.

Also random forum avatars that have been showing suddenly stop showing (grey question mark shows).

I've done a full integrity check.

Unfortunately I've had minimal time over the last couple days to check on much of anything - I'm hoping to be back to a "normal" day tomorrow and will try to check this out.


Right click on any image that is not showing and choose "view image" and see if you see an error.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,149 posts
OK I just tested your jrCore_list call here locally and I am not seeing any issues - it's picking up posts on all the profile forums, by any user. Do you have any custom modules that might be adding/removing search conditions via the db_search_items event trigger?

As for the counts, when you delete that should adjust - I'll see if I can replicate that here.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,149 posts
I just tested the forum deletion, and I'm not seeing any issues with that either - the count is being adjusted properly. So I'm not sure why that is not working on your site...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
I have one custom module, but it's not doing anything like that. Very basic aparna-generated module with a couple fields so I can output embedded albums from bandcamp and archive.org. No custom search or other functionality.

Could it be a permissions issue. As in users who can't have a forum on their profile don't have posts listed in the datastore (the datastore data that is listed in the ACP).
brian
@brian
11 years ago
10,149 posts
blindmime:
I have one custom module, but it's not doing anything like that. Very basic aparna-generated module with a couple fields so I can output embedded albums from bandcamp and archive.org. No custom search or other functionality.

Could it be a permissions issue. As in users who can't have a forum on their profile don't have posts listed in the datastore (the datastore data that is listed in the ACP).

I bet that is what it is - the forum uses a slightly different quota setup than the other DS modules, so try this - add the following:

quota_check=false

to your jrCore_list call and let me know if that works. That will disable the quota enforcement in the list call.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
Yes, that works -- thanks.
brian
@brian
11 years ago
10,149 posts
blindmime:
Yes, that works -- thanks.

Right on - glad to hear that.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags