Hello,
thanks for suggestions / and code contribution
-- About
system cache plugin i have not looked into a way to bypass it, maybe it is possible:
this plugin is great for speed and FLEXIcontent works smoothly with it (maybe you will not needed it once we fix performance of universal content module (soon)),
-- your options are
1. check if it is possible to do some check inside template index.php (does system plugin allow execution to reach this file i think yes , i have not checked ...)
2. hack the joomla cache plugin to include the mobile detect code ...
3. duplicate it and make a custom version of it ???
Just one thing about your changes , please read below:
i think one of your changes not best approach ...
-- You have added 2 more OPTIONS for parameters "
popuptype", so far this is good
... but you added also a 3rd option "9" for autoselecting these when mobile client is detected, this not best approach, because you limit your choices to just 2 options ...
It is better to add 1 more LIST parameter called "
popuptype_mobile" which will have the same OPTIONS as "
popuptype" but also one more:
Code:
<option value="">Same as non-Mobile</option>
(notice that value is empty we will use strlen below)
so:
Code:
$popuptype = $field->parameters->get( 'popuptype', 1 ) ;
add:
Code:
$popuptype_mobile = $field->parameters->get( 'popuptype_mobile', '' ) ;
if ($detect && strlen($popuptype_mobile)) $popuptype = $popuptype_mobile;
and then in your code replace:
Code:
!$detect && $popuptype == 9
with:
Code:
$usepopup && $popuptype == 7
and
Code:
$detect && $popuptype == 9
with:
Code:
$usepopup && $popuptype == 8
and now you can use ANY js image library for mobile
i will commit these changes ... in next commit
when you update to latest FLEXIcontent, just edit image field and set both 'popuptype' and 'popuptype_mobile'