Add a resource to the view using the base code:
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useStyle('uglipop-bundle')
->useScript('uglipop-bundle');
In the application view, insert the photo according to the documentation. doc uglipop:
<!-- Demo Uglipop Lightbox -->
<img src="/images/stories/com_tournaments/avatars/large/<?php echo $this->item->avatar; ?>" alt="avatar" onclick="uglipop1();" style="cursor:pointer;"/>
<script type="text/javascript">
var uglipop1 = function(){
uglipop({class:'bg-uglipop',source:'html',content:'<img src="/images/stories/com_tournaments/avatars/original/<?php echo $this->item->avatar; ?>?auto=compress&cs=tinysrgb&dpr=1&w=480"></img>'});}
var rem = function(){
remove();
}
</script>
<style>
.bg-uglipop{
width:480px;
height:auto;
-webkit-box-shadow: 0px 0px 15px 5px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 15px 5px rgba(0,0,0,0.75);
box-shadow: 0px 0px 15px 5px rgba(0,0,0,0.75);
z-index: 10;
}
#uglipop_content_fixed {
z-index: 10;
}
#uglipop_overlay {
opacity: 0.5;
}
</style>
<!-- END Demo -->
The result can be seen here in the player photo:
This plugin is designed especially for developers of Joomla! 4. Registers the Uglipop package in the Joomla Web Resource Manager. Then you can use it in your extensions - components, modules, plugins.
With this plugin, you can start using Lightbox on any photo on the web, by simply writing it in the code.
Demo:
https://attour4.easy.minion.cz/hraci/4740-jiri-vanecek
Uglipop support has been uploaded to the Tennis Tournament app == displaying the player's avatar in a popup using Uglipop Lightbox.
plg_system_wtjsuglipop-1.0.2.zip
Subscription 6 months
Total amount of downloads 12