By Hideto on Tuesday, 20 June 2017
Posted in General Issues
Replies 7
Likes 0
Views 555
Votes 0
Hello,

When viewing the list of all authors, currently 20 items per author are shown.
I want to change it to 5 items per author, for example.

Previously on v3.9.x, I was able to control at Settings > Layout > Pagination > Bloggers Blog Items Per Page.
But on v5.1.8, I cannot figure out how to control the number.

Changing the number at "Layout > General > Default List Limit" will affect all the pages, not only the list of all authors.

Is there any way to change only for all authors page?


Thanks,
rikao
Hi rikao,

You can customize the limit in the file:
.../components/com_easyblog/views/blogger/view.html.php line 53

limit = EB::getLimit();

to

limit = 5;

and see how it goes?

You're suggested to backup the file that you want to customize beforehand for precaution
·
Tuesday, 20 June 2017 11:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,

Thanks for your quick response.
I edited the file as instructed, but the results didn't change.

Could you test on your end, too?

Thanks,
rikao
·
Tuesday, 20 June 2017 12:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi rikao,

I've tested on my end seems the author was display correctly with 5 author per page as I apply the code above.
Perhaps I've refer to a different page as your, may I know do you refer to this page https://www.screencast.com/t/LpaTD1LuDUod
yourdomain/index.php?option=com_easyblog&view=blogger ?
·
Tuesday, 20 June 2017 14:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,

Ahh, now I noticed that there is misunderstanding between us.

I want to control "the number of items per author", not the number of authors per page.


rikao
·
Tuesday, 20 June 2017 14:45
·
0 Likes
·
0 Votes
·
0 Comments
·
I see
Sorry for misunderstanding rikao.
In the same file as above you can customize/edit the code in line 96 and 170 respectively:

$items = $blogModel->getBlogsBy('blogger', $row->id, $postsOrdering, $postsLimit, EBLOG_FILTER_PUBLISHED);

to

$items = $blogModel->getBlogsBy('blogger', $row->id, $postsOrdering, 5, EBLOG_FILTER_PUBLISHED);

and

$limitPreviewPost = EB::getLimit();

to

$limitPreviewPost = 5;

and see how it goes?

You're suggested to backup the file that you want to customize beforehand for precaution
·
Tuesday, 20 June 2017 16:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,

Thanks to your advice, I was able to achieve the results I wanted by "$postsLimit = 5;".
(Not sure if I also need to edit "$limitPreviewPost = 5;".)

Just to confirm, it doesn't work in override folder, does it?

Thanks,
rikao
·
Tuesday, 20 June 2017 20:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi rikao,

Yes, you cannot do template override for this file as this is not template view
·
Wednesday, 21 June 2017 12:16
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post