diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91f1d3d --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +Thumbs.db + +# other files to ignore # +# emacs +*~ +bibtexbrowser*.dat diff --git a/bibtexbrowser.php b/bibtexbrowser.php index 1e913a6..65c54f0 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) @@ -4102,61 +4102,57 @@ usage: getRSS() getTitle() * $title: title of the page - */ -function HTMLTemplate($content) { - -// when we load a page with AJAX -// the HTTP header is taken into account, not the -header('Content-type: text/html; charset='.OUTPUT_ENCODING); -echo ''."\n"; - -?> - - - - -getRSS()!='') echo ''; -?> -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 ' + + +HTML; -echo "\n".' -->'; +// 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 << - <?php echo $this->title;?> - http:// - + $this->title + $rssLink + bibtexbrowser v__GITHUB__ - -entries as $bibentry) { - ?> - - <?php echo $this->text2rss($bibentry->getTitle());?> - getURL();?> - - text2rss(bib2html($bibentry)."\n".$bibentry->getAbstract()); - ?> - - getKey());?> - - + $rssItems - -main(); */ + class Dispatcher { /** this is the query */ @@ -4740,23 +4738,28 @@ class Dispatcher { exit; } - function frameset() { ?> - - - - - - - - You are browsing <?php echo htmlentities($_GET[Q_FILE], ENT_QUOTES); ?> with bibtexbrowser - - - - - - - - + + + + +You are browsing $bibFilename with bibtexbrowser + + + + + + +HTML; + // return 'END_DISPATCH'; }