Convert Flash Based Gallery to image list on mobile

Note: This code is for use as-is and may not work with updated versions of the CMS as things are updated.

No warranty given - use at own risk. If issues occur remove code-  

Code is for MOBILE AREA only

CHANGE [YOURSITEID] for the Site Id of your website. Keep the quotes.

Paste the following script into the Mobile Script area:

$(document).ready(function(){
if($("#flashcontent").length > 0){
pageid = $("#cmsPageContainer").attr("pageid");
siteid = "[YOURSITEID]";
jQuery.get('/webapps/site/'+siteid+'/'+pageid+'/info/ajax-stream.html', function(data ) {
jQuery('#flashcontent').html('<div id="gallerystream"></div>');
jQuery('#gallerystream').html(data);
$("#gallerystream img").each(function(){
src = $(this).attr("src");
src = src.replace('-160x160','');
$(this).attr("src",src);
});

});
}

if($("#ContentCMS object").length > 0){
pageid = $("#cmsPageContainer").attr("pageid");
siteid = "[YOURSITEID]";
jQuery.get('/webapps/site/'+siteid+'/'+pageid+'/info/ajax-stream.html', function(data ) {
jQuery('#ContentCMS').html('<div id="gallerystream"></div>');
jQuery('#gallerystream').html(data);
$("#gallerystream img").each(function(){
src = $(this).attr("src");
src = src.replace('-160x160','');
$(this).attr("src",src);
});

});
}
});

// END CODE COPY

Paste the following CSS into the MOBILE CSS area

#gallerystream img{
max-width:none;
width: 100%;
}
#gallerystream .cmsImage{
width:100%;
}

Index Previous Next