Dimensions Badge integration on OJS

Has anyone been able to integrate the Dimensions.ai badge into their articles on OJS ? As I understand the script has to be added to each article page by manually creating individual badges for each article. This is a time taking process with a lot of manual input. Would anyone know a way to easily integrate the same?

Bumping the post up in case anyone shares similar challange?

Hi

If this is all it needs

<span class="__dimensions_badge_embed__" data-doi="10.1001/jama.2016.9797"></span><script asyncsrc="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>

Then have you tried just editing your article template? Namely this one https://github.com/pkp/ojs/blob/master/templates/frontend/objects/article_details.tpl

You could just add the code there and assign the DOI by replicating this code https://github.com/pkp/ojs/blob/master/templates/frontend/objects/article_details.tpl#L106

3 Likes

Thank you for your inputs. Will try it.

Has anyone gotten this to work? There must be a way for it to pull the DOI and put it into the code snippet for the badge, so that any new article would automatically get its badge rather than having to do something manual for each new article.

1 Like

Hi to all. It is not hard to enter Dimension Badge.
First register your institution (for Open Access journals are free of use, other way this product is paid) at Dimensions Badges and Metrics API | Dimensions
Under / templates / frontend / object / find Open Article_detail.tpl and enter bellow code on line 124
Start line with < and finished with >

span class=“dimensions_badge_embed” data-doi="{$pubId}" data-legend=“hover-right”></script

Any comments and recommendations are welcome.

3 Likes

I have integrated the dimension badge in my OJS site but when there are no citation it is showing ‘?’
instead of zero(0).
Do anyone have faced the similar situation. Like below
image

Hi @Jnana_Rana,
I got the same problem. Do you remember how to resolve this?

tks

As I know, marking only by dimension when references include doi.

Hi @Jnana_Rana,
I just waited a few days and the numbers came up :slight_smile:

Hi, may i know which version of ojs?

Hi, on any 3.x version it should works.

Under / templates / frontend / object / find Open Article_detail.tpl and enter bellow code on line 124
Start line with < and finished with >

what was that? where is it in OJS?

Hello Jnana_Rana,

You created individual badges for each article or just do one time for all papers?

Dear Michale,

Did you find out the way to solve this problem?