Fork of bibtexbrowser for static publications lists on the website of the ZRD Saar
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.4 KiB

  1. <?php
  2. bibtexbrowser_configure('ABBRV_TYPE','key');
  3. // use tabular layout (HTML tables)
  4. bibtexbrowser_configure('BIBTEXBROWSER_LAYOUT','table');
  5. // URL to individual files
  6. bibtexbrowser_configure('BIBTEXBROWSER_URL',"https://publications.zrd-saar.de/");
  7. // URL to jQuery
  8. bibtexbrowser_configure('JQUERY_URI', '/static/jquery-3.6.4.min.js');
  9. // URL to MathJax
  10. bibtexbrowser_configure('MATHJAX_URI', '/static/TeX-AMS_HTML.V2.7.1.js');
  11. // target for links
  12. bibtexbrowser_configure('BIBTEXBROWSER_LINKS_TARGET','_blank');
  13. // use IEEE Transactions-like style, e.g. puts authors in front of title
  14. bibtexbrowser_configure('BIBLIOGRAPHYSTYLE', 'JanosBibliographyStyle');
  15. //bibtexbrowser_configure('BIBLIOGRAPHYSECTIONS','AGSorgeBibliographySections');
  16. // Allow "Firstname Lastname" as well as "Lastname, Firstname" for authors
  17. bibtexbrowser_configure('USE_FIRST_THEN_LAST',true);
  18. // Enable all metadata generation
  19. bibtexbrowser_configure('METADATA_COINS',true); // see https://en.wikipedia.org/wiki/COinS
  20. bibtexbrowser_configure('METADATA_GS',true); // metadata google scholar
  21. bibtexbrowser_configure('METADATA_DC',true); // see http://dublincore.org/
  22. bibtexbrowser_configure('METADATA_OPENGRAPH',true); // see http://ogp.me/
  23. bibtexbrowser_configure('METADATA_EPRINTS',true); // see https://wiki.eprints.org/w/Category:EPrints_Metadata_Fields
  24. // include language config
  25. if(isset($_GET['language']))
  26. {
  27. include(preg_replace('/local\.php$/',$_GET['language'].'.php',__FILE__));
  28. }
  29. // Order entries by year, but reverse the order (newest on top)
  30. bibtexbrowser_configure('ORDER_FUNCTION','compare_bib_entry_by_year_reverse');
  31. function compare_bib_entry_by_year_reverse($a, $b)
  32. {
  33. return 0 - compare_bib_entry_by_year($a, $b);
  34. }
  35. // A custom URL builder for the static files we create
  36. bibtexbrowser_configure('BIBTEXBROWSER_URL_BUILDER', 'url_builder_static');
  37. function url_builder_static($bibentry) {
  38. return BIBTEXBROWSER_URL.'keys/'.$bibentry->getKey().'.html';
  39. }
  40. // A custom function for the MathJax footer to use the static URL instead of the CDN one
  41. // Also include iframeResizer JS
  42. function javascript_math() {
  43. ?>
  44. <script>
  45. MathJax = {
  46. tex: {
  47. inlineMath: [['$', '$'], ['\\(', '\\)']]
  48. }
  49. };
  50. </script>
  51. <script type="text/javascript" id="MathJax-script" async src="/static/tex-mml-chtml.js">
  52. </script>
  53. <script type="text/javascript" id="iFrameResizer" src="/static/iframe-resizer.child.js">
  54. </script>
  55. <?php
  56. }
  57. ?>