I've been doing further developments on my mobile
plugin and run into a big problem with pagination that impacts this
Merge request. While my initial changes controlled the number of items
displayed in a notice or group list they don't affect the pagination
menu because that uses hard coded values. In fact the extensive use of
NOTICES_PER_PAGE and PROFILES_PER_PAGE makes
it impossible for a plugin to modify the page size. In addition these
are defined constants and therefore require a code change not a
configuration change meaning any deployment that wants to change these
has licensing implications.
To address this I propose to make the following changes.

Change the code so that these NOTICES_PER_PAGE, PROFILES_PER_PAGE and
GROUPS_PER_PAGE are initialised from a single configuration value. At the
moment these three values all default to 20 so I can't see there is any need
for the complexity of three values. This would at least allow sites to
easily change the page size without affecting the 'source'. There is some
code that doesn't reference these constants but assumes their values
(e.g. NOTICE_CACHE_WINDOW in Notice.php is set to 61 on the assumption that
NOTICES_PER_PAGE is 20). These too should be changed to use the
configuration value.

Secondly, in order to allow plugins to change the page size to deliver
smaller pages to less capable devices Action should have an $itemsperpage
variable that is used instead of direct references to the configuration or
defined value. This would default to the single configured value.

Does this seem reasonable and acceptable? If so, I'll trac it and change it.
In the meantime I've deleted the Merge request.

Martin



2009/8/7 Martin Higham <[email protected]>

> I don't mind losing the compression change if something better is coming
> along soon. Alternatively are there any short term changes to it you can
> suggest that would make it acceptable until then?
> Martin
>
> 2009/8/7 Craig Andrews <[email protected]>
>
> Since Events really form a (what I would expect to be a) stable API, I
>> want to check with the list for this merge request:
>> http://gitorious.org/laconica/mainline/merge_requests/1129
>>
>> I don't really like the way he did "output compression" or the terminology
>> used... so I recommend we don't take that commit. (Of course, I'm also
>> planning to remove the HTML indentation and more, so I'm a bit biased :) )
>>
>> As for the rest of it, I think it's okay. Thoughts?
>>
>> ~Craig
>>
>>
>
_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to