From 21525ec6e2909ef39208a255dfbd0349c687bb0b Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Fri, 5 Aug 2016 10:48:35 +0200 Subject: [PATCH] improving configurability of framesets --- bibtexbrowser-documentation.wiki | 43 ++++++++++++++++++++++++++++++++ bibtexbrowser.php | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/bibtexbrowser-documentation.wiki b/bibtexbrowser-documentation.wiki index 805dd0e..fc011e7 100755 --- a/bibtexbrowser-documentation.wiki +++ b/bibtexbrowser-documentation.wiki @@ -452,6 +452,49 @@ bibtexbrowser_configure('PAGE_SIZE','3'); ?> +====How to override framesets and headers?==== + +You can customize every view as follows, in particular by playing with ''BIBTEXBROWSER_URL''. + +''frameset.html'': +
+<html>
+<frameset cols="15%,*">
+<frame name="menu" src="menu.php" />
+<frame name="main" src="output.php" />
+</frameset>
+</html>
+
+ +''menu.php'': +
+MENU (no header sent)
+<?php
+define('BIBTEXBROWSER_URL','output.php');
+$_GET['menu']=1;
+$_GET['bib']='foo.bib';
+include('bibtexbrowser.php');
+?>
+
+ +''output.php'': +
+OUTPUT (no header sent)
+<?php 
+define('BIBTEXBROWSER_URL','elem.php');
+include('bibtexbrowser.php');
+?>
+
+ +''elem.php'': +
+ELEM (no header sent)
+<?php 
+include('bibtexbrowser.php'); 
+?>
+
+ + =====Related tools===== Old-fashioned: diff --git a/bibtexbrowser.php b/bibtexbrowser.php index aeb0744..c70cbc3 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -2539,7 +2539,7 @@ Based on createQueryString. @nodoc */ function makeHref($query = NULL) { - return 'href="?'. createQueryString($query) .'"'; + return 'href="'.bibtexbrowser_configuration('BIBTEXBROWSER_URL').'?'. createQueryString($query) .'"'; }