diff --git a/bibtexbrowser.php b/bibtexbrowser.php index aa5fa7a..96f2921 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -6,7 +6,7 @@ bibtexbrowser is a PHP script to browse and search bib entries from BibTex files *[Download bibtexbrowser|pub/bibtexbrowser.php.txt]* -
+
* [bibtexbrowser can display the menu and all entries without filtering from the $filename hardcoded in the script |bibtexbrowser.php] * [bibtexbrowser can display the menu and all entries without filtering from the file name passed as parameter|bibtexbrowser.php?bib=uml.bib] @@ -16,7 +16,37 @@ bibtexbrowser is a PHP script to browse and search bib entries from BibTex files * [bibtexbrowser can display a single entry|bibtexbrowser.php?bib=biblio_monperrus.bib&key=Krantz] * [bibtexbrowser can display all entries with a bib keyword|bibtexbrowser.php?bib=biblio_monperrus.bib&tag=mda] * [bibtexbrowser can display found entries with a search word (it can be in any bib field)|bibtexbrowser.php?bib=biblio_monperrus.bib&search=ocl] - + + +You can also include your publications list into your home page: +<?php +$_GET['bib']='mybib.bib'; +$_GET['author']='Martin+Monperrus'; +// used for the generated links +$_SERVER['SCRIPT_NAME']='bibtexbrowser.php'; +include('bibtexbrowser.php'); +?> +And tailor it with a CSS style! +<style> +.date { + background-color: blue; + } + +.rheader { + font-size: large + } + +.poweredby { + visibility: collapse; +} + +.bibline { + padding:3px; + padding-left:15px; + vertical-align:top; +} +</style> + == Related tools == Old-fashioned: @@ -428,6 +458,11 @@ class BibEntry { if ($this->hasField('url')) { echo ' [pdf]'; } + + if ($this->hasField('doi')) { + echo ' [doi]'; + } + echo ''; } @@ -478,11 +513,13 @@ class BibEntry { echo '
'; echo " [bib]"; - if ($this->hasField('url')) { + + if ($this->hasField('url')) { echo ' [pdf]'; } + echo ''; } @@ -838,6 +875,9 @@ class ResultDisplay { /** the page number to display. */ var $page; + /** the total number of pages to display. */ + var $noPages; + /** the start index to display. */ var $startIndex; @@ -886,9 +926,9 @@ class ResultDisplay { return; } - $noPages = ceil(count($this->result) / PAGE_SIZE); + $this->noPages = ceil(count($this->result) / PAGE_SIZE); - if ($noPages>1) $this->displayPageBar($noPages, $page); + if ($this->noPages>1) $this->displayPageBar($this->noPages, $page); $this->startIndex = ($page - 1) * PAGE_SIZE; $this->endIndex =$this->startIndex + PAGE_SIZE; @@ -898,7 +938,7 @@ class ResultDisplay { $this->contentStrategy->display($this); echo '
'; - if ($noPages>1) $this->displayPageBar($noPages, $page); + if ($this->noPages>1) $this->displayPageBar($this->noPages, $page); echo $this->poweredby(); @@ -986,7 +1026,7 @@ class DefaultContentStrategy { result); + $refnum = count($display->result)-(($display->page-1)*PAGE_SIZE); foreach ($years as $year => $entries) { @@ -1024,7 +1064,7 @@ class ErrorDisplay { Sorry, this bib entry does not exist. Back to bibtexbrowser - - - \ No newline at end of file