From d2929c37c480d65f2e6e0e092dee25f5593268ca Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Mon, 23 Nov 2015 16:21:05 +0100 Subject: [PATCH] explain how to embed Bibtexbrowser into a website --- bibtexbrowser-documentation.wiki | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/bibtexbrowser-documentation.wiki b/bibtexbrowser-documentation.wiki index 5a61303..761a077 100755 --- a/bibtexbrowser-documentation.wiki +++ b/bibtexbrowser-documentation.wiki @@ -83,6 +83,33 @@ Create a bib file with the publication records (e.g. csgroup2008.bib) and upload =====FAQ===== +====How to embed Bibtexbrowser into a website?==== +To embed Bibtexbrowser into a website, you need to use it as a library: + +
+<?php
+$_GET['library']=1;
+require_once('bibtexbrowser.php');
+global $db;
+$db = new BibDataBase();
+$db->load('biblio.bib');
+?>
+
+ +Then, you have to call bibtexbrowser on you own: +
+<?php
+// printing all 2014 entries
+$query = array('year'=>'2014');
+$entries=$db->multisearch($query);
+uasort($entries, 'compare_bib_entries'); 
+foreach ($entries as $bibentry) { 
+  echo $bibentry->toHTML(); 
+}
+?>
+
+ + ====How to embed a publication list in an home page?====