New param required to display Image for Mobile/Tablet.

More
11 years 4 months ago #38677 by brandonking
It would be very nice to have new option that allow us to select popup type for Mobile/Tablet.

So there will be two popup setects, one for PC and the other for Mobile/Tablet.

I have found that below mobile detect plugin is very good.
mobiledetect.net/
and actually there is a plugin for joomla as well.
www.yagendoo.com/en/blog/free-mobile-det...ugin-for-joomla.html

I have tested and worked well..but I had to turn System cache plugin off(coz once I access a page through PC I have correct image popup type for PC, after that if I access same page with iPhone then same image popup type displayed because of cache,,,and don't know anything else other than turning system cache off).

New popup type(Galleriffic) is really good.
I have found some really nice.
1. Elastislide is a responsive image carousel and Tested.
tympanus.net/codrops/2011/09/12/elastisl...responsive-carousel/
2. PhotoSwipe is a FREE HTML/CSS/JavaScript based image gallery specifically targeting mobile devices and Tested.
www.photoswipe.com/

Both of them, I had to change some css rules for my needs.
In my opinion, PhotoSwipe is must have feature.. :D

Hope to hear from you soon..

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #38680 by ggppdk
Hello,

i see that you added these by following the 'way' / 'pattern' that we use in image field, i see nothing ugly into the code.

just a question , where are you loading the Mobile Detection library at your joomla template , other ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #38681 by brandonking
I have installed mobile detect plugin for joomla described in previous post.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #38683 by ggppdk
hhhmm ...

we have mobile detection built-in in our code , but i don't want to maintain this (yes i would rather use a 3rd party library), so this 3rd party library, looks good i think to replace our detection with this ...

now about this 3rd party library:
- we PACKAGE this Mobile Detection Library in our libraries and load it OR:
- we ask people to install this Joomla plugin?

to package the Mobile Detection Library with FC is trivial


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #38685 by brandonking
Built-in would be better. :D
So will you be able to add those two image plugins as well with mobile detection? Then please add some params for choosing image plugin for PC and mobile/tablet.
And about cache problem, do you have any solution without turning off system cache plugin?

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #38686 by ggppdk
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'


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.728 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline