Dimension Badge

How i can add Dimension badge without inter to ojs hosting.

i can find plugin for Dimension badge or other way?

Mustafa Hamdan
Tikrit, Iraq

I’m not aware of a plugin, but you could modify the article details template in
templates/frontend/objects/article_details.tpl with the following code (insert at the location of your interest):

{foreach from=$pubIdPlugins item=pubIdPlugin}
  {if $pubIdPlugin->getPubIdType() != 'doi'}
    {continue}
  {/if}
  {assign var=pubId value=$article->getStoredPubId($pubIdPlugin->getPubIdType())}
  {if $pubId}
    <div class="item badges">
       <div class="__dimensions_badge_embed__" data-doi="{$pubId}" data-style="large_rectangle"></div>
      <script async type="text/javascript" src="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>
    </div>
  {/if}
{/foreach}

Instructions for Dimension badge and its options: https://badges.dimensions.ai

Example as we have implemented it: https://doi.org/10.2533/chimia.1997.34

2 Likes

Thanks Dear >>> Sure will help me

I am also not aware of a plugin. We have implemented it too by adding code to our template (example here: https://smw.ch/index.php/smw/article/view/2742).

Thanks a lot dear
I applied the code according to the required path, and the method succeeded, and the dimensions appeared on the article page.

But what happened was that the DOI was hidden from the article page on the journal’s website… Is there a way to display the DOI on the article page?

I don’t know. Did you accidentally delete the code that displays the DOI? I wrote “insert” above, not “overwrite”.

Here the original article_details.tpl, if you need to reconstruct it.

@nataliemarty Very good that SMW is on OJS!

Thanks dear for providing help and solutions