monperrus / bibtexbrowser

Beautiful publication lists with bibtex and PHP (standalone or in Wordpress)
http://www.monperrus.net/martin/bibtexbrowser/
84 stars 54 forks source link

Show frameset with a header #47

Closed i2000s closed 8 years ago

i2000s commented 8 years ago

Hi,

I found that if I have a header.php defined, the bibtexbrowser.php cannot yield a frameset. I have tried to use $_GET['frameset']=1; to generate the frameset, but no luck. I looked at the code, seems the frameset only works without a header?

Even without a template, the error/warning message is persistent:

Warning: Cannot modify header information - headers already sent by (output started at /home/***/bibtexbrowser.local.php:147) in /home/***/bibtexbrowser.php on line 3879

Thanks, Qi

monperrus commented 8 years ago

What do you mean by header.php?

--Martin

i2000s commented 8 years ago

Sorry, the header.php I mentioned is an example of page template file which has a header defined inside created by the website developers. Could this cause the problem? I am actually not sure.

monperrus commented 8 years ago

I don't really understand. header.php includes bibtexbrowser.php?

--Martin

i2000s commented 8 years ago

One example is here. I embedded the bibtexbrowser code as some short code onto that page, the header pictures of which is defined in the header.php template on the server. I have tried all the methods I know to generate a library frameset on that page, but no luck. It only works when I use a direct URL as something like http://cquic.unm.edu/bibtexbrowser.php?bib=CQuICmembers.bib&all=1&academy=1&frameset with the index missing and warnings occur as well.

I have also noticed you have implemented the page numbering feature which looks nice. But again, on that page with the header defined, this feature neither worked.

I am not a master of php coding, but maybe I can try to define some compatible HTML template under your guidance, if this issue can be solved by using another HTML generator template. Thanks for your insight.

monperrus commented 8 years ago

I think it works now, see new section "How to override framesets and headers?" in http://www.monperrus.net/martin/bibtexbrowser/

i2000s commented 8 years ago

I haven't fully tested it yet, but just a side comment here: when opening links in the frameset, it seems some URLs may not work. For my case, the citation links from Google scholar are not working. I think it would be nice to set target="_top" for links by default.

monperrus commented 8 years ago

fixed in latest commit,. "_top" is not the default, but you can configure with bibtexbrowser_configure('BIBTEXBROWSER_LINKS_TARGET','_top'); or bibtexbrowser_configure('BIBTEXBROWSER_LINKS_TARGET','_blank');

i2000s commented 8 years ago

@monperrus I just found that if I search anything on the menu frame using your example code, the output will generate another menu list on the output frame. Any idea?