Browse Source

Merge d1a9e8b180 into 8473ccb50f

pull/14/merge
Luis J. Villanueva 11 years ago
parent
commit
0aa4a69f55
  1. 5
      README.md
  2. 12
      bibtexbrowser.php
  3. 26
      index.php

5
README.md

@ -1,6 +1,7 @@
This is the github repository of bibtexbrowser.
Custom changes to bibtexbrowser, including:
It is used to collect patches and extensions as pull requests.
* Custom index file to select among several bib files
* Added a pdf link for bib databases exported from Zotero
The official home page of bibtexbrowser is <http://www.monperrus.net/martin/bibtexbrowser/>. The official home page of bibtexbrowser is <http://www.monperrus.net/martin/bibtexbrowser/>.

12
bibtexbrowser.php

@ -1484,6 +1484,18 @@ class BibEntry {
$str = ''; $str = '';
#Adding link to PDF file exported by Zotero
if ($this->hasField('file')) {
$file = $this->getField("file");
$file = explode(":", $file);
$file = $file[1];
$str .= ' <a href="'.$file.'">[PDF file]</a>';
}
if (BIBTEXBROWSER_BIBTEX_LINKS) { if (BIBTEXBROWSER_BIBTEX_LINKS) {
// we add biburl and title to be able to retrieve this important information // we add biburl and title to be able to retrieve this important information
// using Xpath expressions on the XHTML source // using Xpath expressions on the XHTML source

26
index.php

@ -0,0 +1,26 @@
<?php
#From http://stackoverflow.com/a/15774700
echo "<html>
<body>
<h3>Available databases:</h3>";
echo "<ul>";
$i = 0;
if ($handle = opendir('.')) {
while (false !== ($entry = readdir($handle))) {
if (strpos($entry,'.bib')) {
echo "<li><a href=\"bibtexbrowser.php?bib=$entry\">$entry</a></li>\n";
$i++;
}
}
closedir($handle);
}
if ($i == 0){
echo "<p><strong>ERROR: </strong>No .bib files were found</p>";
}
echo "</ul>
</body>
</html>";
?>
Loading…
Cancel
Save