How do I store crypto coins icons locally?
By default OUGC Crypto Prices uses the API returned image URLs to display crypto coin images. This means that administrators don't have control over ...

By default OUGC Crypto Prices uses the API returned image URLs to display crypto coin images. This means that administrators don't have control over the resources served by default.

To change this and render images directly from your server, follow the next steps.

  1. Download the attached package, it stores all coin icons for all supported currencies of the plugin in SVG format.
  2. Unpack the file, inside you should find the ougc_crypto_prices directory holding all icon SVG files.
  3. Upload the contents of the package to your server, inside the images directory. At the end all SVG files should be accessible through the path mybb/images/ougc_crypto_prices/.
  4. Edit the ougccryptoprices_item template, find:
    <img src="{$image}" title="{$name}" alt="{$name}" loading="lazy" />
    

    Replace with:
    <img src="{$mybb->asset_url}/images/ougc_crypto_prices/{$symbol}.svg" title="{$name}" alt="{$name}" loading="lazy" style="max-height: 24px;" />
    

Please note the max height set with the style element in the img tag.
Files

ougc_crypto_prices.7z application/octet-stream 10.28 KB Downloads: 23 MD5: bc88cf99938e099c1c29e1473d0ca90e 12:42 am, 7 Jan, 2021

There are currently no posts to display. Be the first one to leave a reply.

Current time: 20 Oct, 2021, 4:08 am

This forum uses Lukasz Tkacz MyBB addons.