monperrus / bibtexbrowser

Beautiful publication lists with bibtex and PHP (standalone or in Wordpress)
http://www.monperrus.net/martin/bibtexbrowser/
84 stars 54 forks source link

Use default bib-file specified by constant #93

Closed fabianfaul closed 5 years ago

fabianfaul commented 5 years ago

First of all, thanks for this application!

I'd like to use bibtexbrowser to display a bib-file that is updated from time to time. Since I want to access the bibtexbrowser directly by a domain (e.g. bibtex.example.org), I cannot pass any GET-parameter. Therefore, it would be helpful if the bib-file could be also specified by a constant. I would be happy to implement this but was not sure where the bib-file is specified. Is it always called from the GET-variable or is there a specific variable where the filename is stored?

Thanks, Fabian

monperrus commented 5 years ago

Create a file bibtexbrowser.local.php, and there you add

<?php
$_GET['bib']='defaultfile.bib';
?>

Works for you?

fabianfaul commented 5 years ago

Good idea, thanks.. And indeed, it works but only if the variable is set directly in the bibtexbrowser.php.