1) Change the paging size: That's an easy one!
go to the ProgramFiles\....\12\Template\LAYOUTS folder and edit AssetPortalBrowser.aspx. BEWARE. Do not edit with SharePoint Designer. It will change all the paths and nothing works no more.
On that page you will find a control called ObjectList1 of Type SMObjectList. It has a PageSize attribute wich you can change from 15 to anything you like really.
2)Changing the Default Sort behaviour: Tricky!
Sadly enough setting the SortDirection ad SortExpression on the Control will not come into effect as the sort is overridden every time the context changes. And the context changes every time the page is loaded. Thus, no matter what you set here it does not seem to work.
The Workaround includes some C# and visual Studio knowhow.
a) Create a new Class Library
b) Add References to the the Microsoft.SharePoint, Microsoft.SharePoint.Publishing and System.Web dlls
c) Create a new Class that inherits from Microsoft.SharePoint.Publishing.Internal.CodeBehind.AssetPickerDialog
d) override the OnLoad event and set the SortDirection, SortExpression and ExplicitView of the ObjectList1 Control programatically. Do this after calling the base.OnLoad() event to make sure the control is loaded correctly.
public class CustomAssetPicker: Microsoft.SharePoint.Publishing.Internal.CodeBehind.AssetPickerDialog
{ protected override void OnLoad(EventArgs e){
base.OnLoad(e);
this.ObjectList1.SortDirection = "DESC";
this.ObjectList1.SortExpression = "Modified";
this.ObjectList1.CancelSortOperation = false;
this.ObjectList1.ExplicitViewName = "All Documents";
}
}
e) sign the assembly
f)install the assembly into the GAC either using gacutil or drag&drop it into c:\windows\assemblyg)fix up the web.config to allow the new assembly by I)adding it to the SafeControls list and II)the compilation\assemblies list
h)Change the Page directive on AssetPortalBrowser.aspx to inherit from your new class instead of the Codebehind class.
Voailla, you now changed the default sort to always show the last modified files and images first.