When viewing all birthdays, 25 birthdays are listed per page. This is hard-coded. It'd be good to have an option to specify how many birthdays you want listed.

As far as I can see there's two occurrences:

One in the function birthdays_view_page to get all users to list:

$result = pager_query("SELECT {users}.uid FROM {users} ". $join ." {dob} ON {users}.uid = {dob}.uid WHERE {users}.status <> 0 AND {users}.access <> 0 ORDER BY ". $filter ."{users}.name",25);

and one in the function theme_birthdays_page to print the pager:

$str .= theme('pager', NULL, 25, 0);

-- Sara

CommentFileSizeAuthor
#4 birthdays_set_page_size.patch3.11 KBmaartenvg

Comments

maartenvg’s picture

Assigned: Unassigned » maartenvg

Your totally right.
Do you think it should be an option on the page itself or in the admin settings (or both)?

Sara Adams’s picture

I'd actually be for a setting on the admin page.
Another nice feature would be to add a "monthly view". Meaning: all birthdays in Jan, Feb and so on.

-- Sara

maartenvg’s picture

An admin setting it is. :)

Someone else also requested a monthly overview, so that's on the to do list as well.

maartenvg’s picture

Status: Active » Fixed
StatusFileSize
new3.11 KB

Added administrator setting for the amount of users to be listed on a birthdays page.

Patch attached.

Sara Adams’s picture

Works like a charm. Thanks for this! See www.exetermcr.com/birthdays for 20 per page, and a themed view.

maartenvg’s picture

I've implemented the monthly filtering and committed it to CVS. Takes a few hours to show up on the project page, but please test it after that.

The implementation includes filtering by month and/or by year. So you can list only people from august, only from 1978 _and_ only from august in 1978.

Anonymous’s picture

Status: Fixed » Closed (fixed)