Keyword

User Item list | Ordering is wrong

  • Ryan Scott Jones
  • Ryan Scott Jones's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #112416 by Ryan Scott Jones
User Item list | Ordering is wrong was created by Ryan Scott Jones
Greetings!

I'm trying to get my User Item List (when you click the author link) to display in the same order as my Category views--by date created. When I click display post by user, it's sorting them in descending order base on ID number on the user page. I don't see any settings to sort the items? Is there a line of code I need to modify in the USER.PHP file?

I appreciate the help! :)

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #112417 by Eric
Replied by Eric on topic Re: User Item list | Ordering is wrong
do you have a menu link to the user's page that uses "K2 » User page (blog)"? if not create a new menu (name it anything doesn't matter), then a new menu item within it (so it stays hidden from view but still works), then for "menu item type" choose "User page (blog)" in the k2 section, in required settings part, choose the user, then in the basic options part, you'll see a drop down menu next to "item ordering", here you can choose what order you want the articles to be in

i like to modify things, and make them do unintended things

Please Log in or Create an account to join the conversation.

  • Ryan Scott Jones
  • Ryan Scott Jones's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #112418 by Ryan Scott Jones
Replied by Ryan Scott Jones on topic Re: User Item list | Ordering is wrong
Hello! The menu structure works like this:

Menu
|--Blogs
|
Blogger1
|
Blogger2

When you click Blogs, it shows everyone's blog in the order of Creation Date. If you click Blogger1 or Blogger2, it shows ONLY their blog in the order of Creation Date.

The problem is when you click the author link in Blogs, Blogger1 or Blogger2, it takes you to the User Blog layout with the posts in order of Reverse ID.

I guess I could disable the author link.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago - 11 years 5 months ago #112419 by Eric
Replied by Eric on topic Re: User Item list | Ordering is wrong
what 'menu item type' are you using to diplay the blog pages? if k2 try this:

i like to modify things, and make them do unintended things
Attachments:

Please Log in or Create an account to join the conversation.

  • Ryan Scott Jones
  • Ryan Scott Jones's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #112420 by Ryan Scott Jones
Replied by Ryan Scott Jones on topic Re: User Item list | Ordering is wrong
I'm not trying to display User Blogs through a menu, I'm displaying all categories in Blog. When a user clicks Blog > Blogger1 then it displays Categories again, but only Blogger1's category. All of this works fine. The issue is when a person clicks on the author link "Written by John Smith" When you click John Smith, it displays the User layout (by default?) and it's in ID order. I don't know how to change this setting without modifying the PHP code.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 5 months ago #112421 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: User Item list | Ordering is wrong
Hello,

You have to manually setup a menu item for your desired users. The option you want is located in the menu item's parameters.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Ryan Scott Jones
  • Ryan Scott Jones's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #112422 by Ryan Scott Jones
Replied by Ryan Scott Jones on topic Re: User Item list | Ordering is wrong
Oh wow! That fixed it!!

That's strange the author link goes to a random page, but when you create a menu item set to User Blog layout it then points to that instead. Thank you for that! I would have never have guessed that!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 5 months ago #112423 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] User Item list | Ordering is wrong
You 're welcome,
glad to be of assistance.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #112424 by Tom
Hi Krikor,

Is there a way to do this globally? I have several hundred users and would rather avoid having to setup individual menu items for each.

Many thanks in advance.

Tom

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #112425 by Lefteris
@Tom

You need to hack a K2 core file to achieve this. Edit file components/com_k2/views/itemlist/view.html.php and modify line 265 from
$ordering = $params->get('userOrdering');

to ( example for alphabetical sorting ) :
$ordering = 'alpha';

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum