You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
Support is currently Online
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
How can I get JCE Mediabox 2 working in my own component? I can't get it to load images in a popup. It adds the zoom icon, so I guess it's loading, but all images just open in a new window.
I've tried
<a class="jcepopup" data-mediabox="1" href="<? echo $imgURL; ?>"><img src="<? echo $imgURL; ?>" alt="Screenshot"/></a>
as well as
<a class="wfpopup wf-zoom-image" href="<? echo $imgURL; ?>"><img src="<? echo $imgURL; ?>" alt="Screenshot"/></a>
as well as
$cpex = '<a class="jcepopup" data-mediabox="1" href="'.$imgURL.'"><img src="'.$imgURL.'" alt="Screenshot"/></a>';
echo JHtml::_('content.prepare',$cpex);
But neither seem to work. JCE Mediabox is set to load on the component page (and does afaik).
It does work in regular articles.
I've tried
<a class="jcepopup" data-mediabox="1" href="<? echo $imgURL; ?>"><img src="<? echo $imgURL; ?>" alt="Screenshot"/></a>
as well as
<a class="wfpopup wf-zoom-image" href="<? echo $imgURL; ?>"><img src="<? echo $imgURL; ?>" alt="Screenshot"/></a>
as well as
$cpex = '<a class="jcepopup" data-mediabox="1" href="'.$imgURL.'"><img src="'.$imgURL.'" alt="Screenshot"/></a>';
echo JHtml::_('content.prepare',$cpex);
But neither seem to work. JCE Mediabox is set to load on the component page (and does afaik).
It does work in regular articles.
Mediabox is initialized when the page loads. If you load content dynamically, then any popup links in that content won't be initialized.
You need to re-initialise MediaBox so that it will convert popup links in the dynamic content. You can do this by running the script:
or you can also specify exactly which items to create as popups, eg:
You need to re-initialise MediaBox so that it will convert popup links in the dynamic content. You can do this by running the script:
WfMediabox.create();
or you can also specify exactly which items to create as popups, eg:
WfMediabox.create(jQuery('a[href]'));
Just because you're not paranoid doesn't mean everybody isn't out to get you.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!