Script Declaration in Image field

More
11 years 10 months ago #38707 by ggppdk
Hello,

about galleriffic, i wanted
-- to test CSS and make sure that layout is EITHER responsive OR may add one/two parameters for it


-- 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 10 months ago #38713 by brandonking
Actually, I tried to use it but there were CSS conflicts in many places.
And I guess HTML structure is not correct somewhere.
I spend an hour to solve but I couldn't.... :)

Anyway, I have found different version in Elasislider. I will test and let you know soon. This one is displaying description as well and it is responsive as well.

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

More
11 years 10 months ago #38725 by ggppdk
Hello,

just some comments to consider, that adding something to the image field is not trivial

extra things we did:

1. added code to allow multiple instances of elastislide and photoswipe, e.g. you have 2 galleries in a single item, or you want to use the image fields in a content list, the gallery elements need to have unique ids and variables

2. the photoswipe does not require to be placed inside ul li so i removed these , allowing the proper usage of prefix/suffix/separator/etc

3. the elastislide has some mootools / jquery conflicts, had to patch the library

4. the elastislide requires can not use the separator parameter so placed a check to force separator to be empty


Also the "Use popup" parameter was renamed ro:
Thubmnail list type
- Plain list
- Gallery Layout
with description:

Choose to either display a PLAIN thumbnail list or place your thumbnails inside a popup/inline/other Gallery Layout
-- The Gallery Layout will allow opening the thumbnails in a popup or inline (manual or automatic) image slideshow / carousel"


-- 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 10 months ago #38735 by brandonking
About Elasislide, I found a new one, I mean looks nicer and we even can display Tooltip Description. I am sure you will like it.

Demo: tympanus.net/Tutorials/ResponsiveImageGallery/

RESPONSIVE IMAGE GALLERY WITH THUMBNAIL CAROUSEL
tympanus.net/codrops/2011/09/20/responsi...ent-page-1/#comments

The only concern is that we have to place a jQuery template into head tag.
Code:
<script id="img-wrapper-tmpl" type="text/x-jquery-tmpl"> <div class="rg-image-wrapper"> {{if itemsCount > 1}} <div class="rg-image-nav"> [url=#" class="rg-image-nav-prev]Previous Image[/url] [url=#" class="rg-image-nav-next]Next Image[/url] </div> {{/if}} <div class="rg-image"></div> <div class="rg-loading"></div> <div class="rg-caption-wrapper"> <div class="rg-caption" style="display:none;"> <p></p> </div> </div> </div> </script>

If I use "$document->addScriptDeclaration", it won't add <script> tags.
If I use "$document->addScript(JURI::root().'components/com_flexicontent/librairies/elastislide2/js/gallery.js');", I will add "<script language="JavaScript" type="text/javascript">"

But we need to add "<script id="img-wrapper-tmpl" type="text/x-jquery-tmpl">".
Do you have an idea how to add scripts with above tag?

Anyway, I have added them manually into my index.php.
Please see PM.

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

More
11 years 10 months ago #38738 by ggppdk
Yes,
indeed this does what elastislide does and even more,

probably it is more responsive to screen size than elastislide ?

(i have some problem with external containers and elastislide detecting the width properly ...)


-- 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 10 months ago #38755 by brandonking
Yes I had same problem and I think gallery.js was not loaded properly.
So I changed
from
Code:
$(function() {
to
Code:
jQuery.noConflict(); (function($) { $(document).ready(function(){ .... }); })(jQuery);
Hope this help! :)

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.408 seconds
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
Save