diff --git a/bibtexbrowser.php b/bibtexbrowser.php
index 3e7568c..d63a443 100755
--- a/bibtexbrowser.php
+++ b/bibtexbrowser.php
@@ -2669,7 +2669,9 @@ if (!function_exists('bibtexbrowser_top_banner')) {
function javascript() {
// we use jquery with the official content delivery URLs
// Microsoft and Google also provide jquery with their content delivery networks
-?>
+ $JQUERY_URI = JQUERY_URI;
+print <<
+JS;
} // end function javascript
@@ -3959,8 +3960,7 @@ class BibDataBase {
/** returns the default CSS of bibtexbrowser */
function bibtexbrowserDefaultCSS() {
-?>
-
+$css = <<<BODY> and TITLE)
@@ -4105,58 +4105,54 @@ usage:
*/
function HTMLTemplate($content) {
-$OUTPUT_ENCODING = OUTPUT_ENCODING;
-// when we load a page with AJAX
-// the HTTP header is taken into account, not the
-header('Content-type: text/html; charset='.OUTPUT_ENCODING);
-print <<
-
-
-
-
-HTML;
-
-// if ($content->getRSS()!='') echo '';
-
-
// we may add new metadata tags
$metatags = array();
if (method_exists($content, 'metadata')) {
$metatags = $content->metadata();
-}
+ }
+
+ $htmlMetatags = "";
foreach($metatags as $item) {
list($name,$value) = $item;
- echo ''."\n";
+ $htmlMetatags .= ''."\n";
} // end foreach
-
-
// now the title
if (method_exists($content, 'getTitle')) {
- echo ''.strip_tags($content->getTitle()).'';
+ $htmlTitle = ''.strip_tags($content->getTitle()).'';
}
-// now the CSS
-echo '';
+$OUTPUT_ENCODING = OUTPUT_ENCODING;
+// when we load a page with AJAX
+// the HTTP header is taken into account, not the
+header('Content-type: text/html; charset='.OUTPUT_ENCODING);
+print <<
+
+
+
+
+ $htmlMetatags
+ $htmlTitle
+
+
+
+HTML;
+
+// if ($content->getRSS()!='') echo '';
-?>
-
-
-
-" . $content->getTitle() . "";
}
@@ -4369,42 +4365,43 @@ class RSSDisplay {
$this->entries = $entries;
}
- function setWrapper($x) { $x->wrapper = 'NoWrapper'; }
+function setWrapper($x) { $x->wrapper = 'NoWrapper'; }
- function display() {
- header('Content-type: application/rss+xml');
- echo '';
+function display() {
+
+foreach($this->entries as $bibentry) {
+$bibEntryKey = urlencode(@$_GET[Q_FILE].'::'.$bibentry->getKey());
+$bibEntryUrl = $bibentry->getURL();
+$bibEntryTitle = $this->text2rss($bibentry->getTitle());
+$bibEntryAbstract = $this->text2rss(bib2html($bibentry)."\n".$bibentry->getAbstract());
//
+$rssItems .= <<
+ $bibEntryTitle
+ $bibEntryUrl
+ $bibEntryAbstract
+ $bibEntryKey
+
+RSS;
+}
-?>
+ header('Content-type: application/rss+xml');
+ echo '';
+
+$rssLink = 'http://' . @$_SERVER['HTTP_HOST'].htmlentities(@$_SERVER['REQUEST_URI']);
+$atomLink = 'http://' . @$_SERVER['HTTP_HOST'].htmlentities(@$_SERVER['REQUEST_URI']);
+print <<
- title;?>
- http://
-
+ $this->title
+ $rssLink
+
bibtexbrowser v__GITHUB__
-
-entries as $bibentry) {
- ?>
- -
- text2rss($bibentry->getTitle());?>
- getURL();?>
-
- text2rss(bib2html($bibentry)."\n".$bibentry->getAbstract());
- ?>
-
- getKey());?>
-
-
+ $rssItems
-
-main();
*/
+
class Dispatcher {
/** this is the query */