solved Arrange Blogs

Dazed
Dazed
@dazed
11 years ago
1,022 posts
Ran into a slight issue here. I would like to be able to arrange blog posts but since I have allowed other users to post in the "News" category blog, I am not sure if this is even supported?
updated by @dazed: 10/27/14 02:56:21PM
brian
@brian
11 years ago
10,148 posts
I'm not sure what you mean - if a user wants to arrange their blogs they can do so by clicking the "arrange" button on the blog index on their profile - they cannot arrange blog entries for the site as a whole.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Dazed
Dazed
@dazed
11 years ago
1,022 posts
Hey Brian. I have 3 users who can now post to the blog category "News". As an admin, I would like to be able to sort the blogs in that category. Currently the blog sort is tied to the user and with multiple users, this can no longer be accomplished.
brian
@brian
11 years ago
10,148 posts
Dazed:
Hey Brian. I have 3 users who can now post to the blog category "News". As an admin, I would like to be able to sort the blogs in that category. Currently the blog sort is tied to the user and with multiple users, this can no longer be accomplished.

You would need to:

- create an admin only custom form field called "blog_admin_order" (or whatever)
- in your jrCore_list call in your "news" page, do order_by="blog_admin_order numerical_asc"

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Dazed
Dazed
@dazed
11 years ago
1,022 posts
Hey Brian - Maybe I am a bit lost here. It would not be the first time heh. I tried what you mentioned. Is there any specific setting in the custom form field? The numerical_asc is bring up old posts obviously. I think in JR4 it was order=15 but that is from memory.

What I need is this.

I post a blog. You post a blog pushing mine down and you are in spot 1. I would like to change the sort so that I can change my post to be post 1 and your to post 2. Kind of like the arrange songs being drag and drop for order.
michael
@michael
11 years ago
7,772 posts
Dazed:...I post a blog. You post a blog pushing mine down and you are in spot 1. I would like to change the sort so that I can change my post to be post 1 and your to post 2. Kind of like the arrange songs being drag and drop for order....

Your right, there is an issue with blog display order. It should be ordered by the newest publication date at the top. Its not doing that right now.

Getting your item to the top should be as easy as updating the post and setting its publication date as newer that the other one.

This is the code that seams correct in /jrBlog/item_index.tpl
{jrCore_list module="jrBlog" profile_id=$_profile_id search1="blog_publish_date <= `$smarty.now`" order_by="blog_publish_date numerical_desc" pagebreak="8" page=$_post.p pager=true}

/jrBlog/index.tpl is also listing the list from oldest to newest publication date which should be reversed.
brian
@brian
11 years ago
10,148 posts
Well - there's actually not an issue - the blogs are being ordered by the display_order key, which is correct - if we change that in the template to be by the publish_date, then the profile owner no longer has the ability to set the blog order on their profile (and they will wonder why going into the arrange for blogs does not work).

The proper solution for this problem is what I outlined above.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,148 posts
Dazed:
Is there any specific setting in the custom form field?

Yes - the value you would place in the custom field would be the number you want it to appear in on your news page. So if you placed "1" in the field, it would be in the first position, "2" would be in second, and so on.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
11 years ago
7,772 posts
Dazed:...I have 3 users who can now post to the blog category "News". As an admin, I would like to be able to sort the blogs in that category...

Where is this? Is this on the profile or the front section of the site?
Dazed
Dazed
@dazed
11 years ago
1,022 posts
Index.tpl news blog
douglas
@douglas
11 years ago
2,797 posts
Try changing the order_by to this:

order_by="blog_display_order numerical_asc"

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 09/04/14 08:31:17AM
brian
@brian
11 years ago
10,148 posts
The solution to this is as I outlined above. The other suggestions on this thread are not going to work for what you want.

Thanks!


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