0
Under review

URL link display

Ioan Muntean 5 year бұрын updated by Daniel Owens 10 ай бұрын 9

I embedded Bibbase code from a Zotero database in a wordpress page and all works fine, except the url links . The little icon for the link, a square with an arrow up shows up, but when I click on it in wordpress does not open the link in a frame. Is there any way to instruct bibbase to open the link in a new window? Can we add a extra flag or something similar to the html code to indicate where to open the link? Thanks in advance.

Under review

Hi Ioan,

Could you send me a link to the page? Then I'll take a look.


Thanks!

Dear Christian, 

Thanks. Here is the link with the bibbase included. 

https://imuntean.wp.unca.edu/current-research-projects/

Only the first paper (2020) has an url and the icon shows up. When once click on it, the frame does not display anything. If I open the link in new window, it shows the right way. On this page I posted a short explanation of how they can download the PDF file. An alternative would be to instruct the Bibase code to open the link in a new window, with a flag (?)

Thanks! I took a look and found the issue in the developer console of the browser. There it says the following when clicking the link:

Refused to display 'https://unca-my.sharepoint.com/personal/imuntean_unca_edu/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fimuntean%5Fu....' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

This means that sharepoint.com disallows being shown in an iframe (more details on that feature here:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options).

But I liked your suggestion of controlling where links are being opened. That's indeed possible in HTML and easy, too. So I've just implemented a minor patch to BibBase that will always open links in the parent frame. The patch is already rolled out and your page seems to behave as expected now.


Also, if I may use the opportunity to ask you a question: if BibBase were to offer hosted pages much like Wordpress but with additional features that are specific to scientists' needs, could that be of interest to you? The features would, of course, include the publication rendering and also templates that are tailored to scientific web pages. Is that something you could justify spending $5/month on? Or are there any other premium features you would like to see, e.g., merging multiple data sources with duplicate detection (e.g., pulling in your DBLP result https://bibbase.org/show?msg=embed&bib=https://dblp.org/pid/229/8799.bib), or something else that can save you time or improve your web presence?

Thanks!

Dear Christian,

I run into a similar problem and thought that maybe it would be appropriate to mention it here:

I embedded the JavaScript from BibBase in my Wix site (it uses iframe, I believe), and when clicking on the "paper" links, a "can't open this page" message comes up.

I tried adding the following code to get the links open on a new tab, but this doesn't work. Any chance that you may have a solution for this issue?

Here is a link to my site

Best,

Nir 

target="_blank" rel="noopener noreferrer"

Hi Nir,

This is because the site that is hosting the paper refuses to run in an iframe. This is becoming more and more common. We strong recommend not embedding BibBase via an iframe. In your case, it seems that you are actually just embedding one of your own pages, hosted elsewhere, in this site, and that other html page contains nothing but the script tag for embedding BibBase. Does Wix now allow you to use the script tag directly? If it id, that would make for a much better solution for several reasons: you wouldn't have a scrolling page within a scrolling page (confusing to your users), and the issue at hand of opening links would be resolved.

Let me know if there was anything not working with that direct use of the script tag that I may be able to help with. Otherwise, if you want to stick with the iframe, then I think this is a solution: https://stackoverflow.com/questions/1037839/how-to-force-link-from-iframe-to-be-opened-in-the-parent-window

Christian

Dear Charles, thanks for the amazing work you put into this. Now the link on the icon works. It looks like you got it solved immediately. I did not know about the limitations of sharepoint.

Probably it is equally easily to fix the link "Paper" that appears when one clicks on the title of the material. That one still does not open in a new frame.

I am interested in the option you mentioned. For the time being my university hosts my wordpress page but I would like to look into other options in the future. Thanks for your great work with bibbase!

Bibbase is amazing, so thankful for it. 

I am running into the problem described above for the "Paper" link, but I am using the Javascript not an iframe. I would like the ability to instruct the browser to open links in a new tab, as in:

target="_blank"

Is there an option to do this that I cannot see in the documentation? My page is at https://sites.google.com/newcovenantnaperville.org/apostles-creed/home?authuser=1.

Daniel

Hi Daniel,

If you are ok with enabling this behavior for all links on your page, not just the bibbase ones, then you can just add this to your page:  

<base target="_blank" />

(reference).

I don't think we currently have an option to enable it for the links generated by BibBase only.

Thank you for the quick reply. I did try that, but I think it will not work for a Google site because they don't allow access to the <head> element.