diff --git a/bibtexbrowser-documentation.wiki b/bibtexbrowser-documentation.wiki index 4703dbc..031e0a2 100755 --- a/bibtexbrowser-documentation.wiki +++ b/bibtexbrowser-documentation.wiki @@ -357,27 +357,18 @@ Add in ''bibtexbrowser.local.php'': ====How to configure the order of Bibtex entries?==== -You can set the default order function in ''bibtexbrowser.local.php'': -
-<?php -// can be @define('ORDER_FUNCTION','compare_bib_entry_by_title'); -define('ORDER_FUNCTION','compare_bib_entry_by_bibtex_order'); -?> --Or programmatically: +The default order is first by year, then by month (according to bibtexfield ''month''), see ''define('ORDER_FUNCTION',...)'' and ''define('ORDER_FUNCTION_FINE',...)''. + +You can also set another order function in ''bibtexbrowser.local.php'':
<?php -$_GET['library']=1; -require_once('bibtexbrowser.php'); -$db = new BibDataBase(); -$db->load('biblio.bib'); -$query = array('year'=>'2014'); -$entries=$db->multisearch($query); -uasort($entries, 'compare_bib_entries'); -foreach ($entries as $bibentry) { - echo $bibentry->getYear().'
'; + +function my_own_order($a, $b) { + return strcmp($a->getKey(),$b->getkey()); } + +define('ORDER_FUNCTION','my_own_order'); ?>