Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" src="{TEMPLATEURL}imagetick_lime.js"></script> {TEMPLATEJS}
{TEMPLATEJS} <script type="text/javascript" src="{TEMPLATEURL}imagetick_lime.js"></script>
<strong>Facebook</strong> <a href="http://www.facebook.com/sharer.php?u=http://goo.gl/6AYn4" target="_blank">Share this questionaire on Facebook</a></p>
<script charset="utf-8" type="text/javascript">
</script>
<!-- jPlayer files --> <link href="{TEMPLATEURL}skin/blue.monday/jplayer.blue.monday.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="{TEMPLATEURL}jquery.jplayer.min.js"></script>
$(document).ready(function(){ if($('.audioSource').length > 0) { // Define some vars var surveyRoot = location.pathname.split('index.php')[0]; var templateName = $('head link[href*="template.css"]').attr('href').replace(/\/template.css/, '').split('/templates/')[1]; var fieldNames = $('input#fieldnames').attr('value'); var tmp = fieldNames.split('X'); var sID = tmp[0]; var gID = tmp[1]; // Add some classes $('.audioSource').closest('div.question-wrapper').addClass('audioQuestion'); // Loop through all player source inclusions $('.audioSource').each(function(i) { // The source filename var audioSource = $(this).text().replace(/[\s\n\t]/g,''); //Insert a wrapper for the player object $(this).after('<div id="player'+i+'" class="playerWrapper" />'); // Insert the player user interface var parentClass = ''; if($(this).closest('tr[id^="javatbd"]').length > 0) { parentClass = 'subQuestion'; } else if($(this).closest('div.question-wrapper').length > 0) { parentClass = 'question'; } else { parentClass = 'groupDescription'; } var playerController = '<div id="jp_container_'+i+'" class="jp-audio '+parentClass+'"> \ <div class="jp-type-single"> \ <div class="jp-gui jp-gui_'+i+' jp-interface"> \ <ul class="jp-controls"> \ <li><a href="javascript:;" class="jp-play jp-play_'+i+'" tabindex="1">play</a></li> \ <li><a href="javascript:;" class="jp-pause jp-pause_'+i+'" tabindex="1">pause</a></li> \ <li><a href="javascript:;" class="jp-stop jp-stop_'+i+'" tabindex="1">stop</a></li> \ <li><a href="javascript:;" class="jp-mute jp-mute_'+i+'" tabindex="1" title="mute">mute</a></li> \ <li><a href="javascript:;" class="jp-unmute jp-unmute_'+i+'" tabindex="1" title="unmute">unmute</a></li> \ <li><a href="javascript:;" class="jp-volume-max jp-volume-max_'+i+'" tabindex="1" title="max volume">max volume</a></li> \ </ul> \ <div class="jp-progress"> \ <div class="jp-seek-bar jp-seek-bar_'+i+'"> \ <div class="jp-play-bar jp-play-bar_'+i+'"></div> \ </div> \ </div> \ <div class="jp-volume-bar jp-volume-bar_'+i+'"> \ <div class="jp-volume-bar-value jp-volume-bar-value_'+i+'"></div> \ </div> \ <div class="jp-time-holder"> \ <div class="jp-current-time jp-current-time_'+i+'"></div> \ <div class="jp-duration jp-duration_'+i+'"></div> \ <ul class="jp-toggles"> \ <li><a href="javascript:;"class="jp-repeat jp-repeat_'+i+'" tabindex="1" title="repeat">Repeat</a></li> \ <li><a href="javascript:;"class="jp-repeat-off jp-repeat-off_'+i+'" tabindex="1" title="repeat off">Repeat off</a></li> \ </ul> \ </div> \ </div> \ </div> \ </div>' if(parentClass == 'question' || parentClass == 'subQuestion') { $(this).parent().prepend(playerController); } else { $(this).parent().append(playerController); } // Construct the player object $('#player'+i).jPlayer( { swfPath: surveyRoot+'upload/templates/'+templateName, solution: 'html, flash', supplied: 'mp3', preload: 'metadata', volume: 0.1, muted: false, backgroundColor: '#000000', cssSelectorAncestor: '#jp_container_'+i+'', cssSelector: { play: '.jp-play_'+i+'', pause: '.jp-pause_'+i+'', stop: '.jp-stop_'+i+'', seekBar: '.jp-seek-bar_'+i+'', playBar: '.jp-play-bar_'+i+'', mute: '.jp-mute_'+i+'', unmute: '.jp-unmute_'+i+'', volumeBar: '.jp-volume-bar_'+i+'', volumeBarValue: '.jp-volume-bar-value_'+i+'', volumeMax: '.jp-volume-max_'+i+'', currentTime: '.jp-current-time_'+i+'', duration: '.jp-duration_'+i+'', repeat: '.jp-repeat_'+i+'', repeatOff: '.jp-repeat-off_'+i+'', gui: '.jp-gui_'+i+'' }, ready: function () { $(this).jPlayer("setMedia", { mp3: surveyRoot+'upload/templates/'+templateName+'/audio/'+audioSource }); }, play: function () { // Pause all other players $(this).jPlayer('pauseOthers'); }, errorAlerts: false, warningAlerts: false }); }); } });
/******** Audio player styles (additional styles in the skin folder) ********/ span.group-description { display: inline-block; padding: 5px; } .audioSource, .answeredCodes { display: none; } .jp-audio { text-align: center; }
<div class="audioSource">question_1.mp3</div>
? Can you find when it work and when not ?nicoillo wrote: Whit default template sometimes it's ok, sometime no. :blink:
No, you have it in the survey: this is OK.nicoillo wrote: "With the last version ranking.css must be added for all template". What do you mean with this? I have to put rankin.css in my template folder and include it in the html or with {TEMPLATECSS} am I ok?
Accept */* Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Content-Length 83 Content-Type application/json; charset=UTF-8 Host 10.0.0.2 Referer http://10.0.0.2/www/ User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0 X-Requested-With XMLHttpRequest POST body: {"method":"get_session_key","params":{"username":"admin","password":"test"},"id":1}
Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection Keep-Alive Content-Encoding gzip Content-Length 20 Content-Type text/html Date Tue, 19 Mar 2013 15:23:41 GMT Expires Thu, 19 Nov 1981 08:52:00 GMT Keep-Alive timeout=15, max=99 Pragma no-cache Server Apache/2.2.16 (Debian) Vary Accept-Encoding X-Powered-By PHP/5.3.3-7+squeeze15
Yes. Currently that script supports Limesurvey 1.92, but we are just testing a first version for Limesurvey 2 which should be available at the shop the next weeks.fchanavat wrote: You mention a cron script for sending mails automatically.
Is this the one that can be found here:
www.limesurvey-templates.com/automatical...nvitations-p-49.html
If it is run by a cronjob, then sending the emails is done automatically once the server calls the script.fchanavat wrote: Does it prevent having to press on the "continue" button?
It runs on each provider which offers cronjobs. Please note that limits such as the max number of emails / minute/hour is limited by the provider, not the script. Ask your provider to raise such limits if necessary.fchanavat wrote: Does it work on self-hosted instances and with all ISPs?
See above...fchanavat wrote: Is it compatible with ALL versions?
<script type="text/javascript" src="{TEMPLATEURL}jquery.csv.js"></script>
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Define the CSV filename var csvName = 'linguas.csv'; // Define some paths var surveyRoot = location.pathname.split('index.php')[0]; var templateName = $('head link[href*="template.css"]').attr('href').replace(/\/template.css/, '').split('/templates/')[1]; var templatePath = surveyRoot+'upload/templates/'+templateName+'/'; // Define the questions var q1ID = '{QID}'; var q1 = $('#question'+q1ID); var q2 = $(q1).nextAll('.text-short:eq(0)'); var q3 = $(q1).nextAll('.text-short:eq(1)'); // Define the path to the CSV var url = templatePath+csvName; // Create an array to hold the CSV rows var namesArr = new Array(); // Grab the CSV contents $.get(url,function(data){ // Convert CSV contents to an array of arrays fullArray = jQuery.csv()(data); // Load the CSV rows array $(fullArray).each(function(i, item){ namesArr.push(item[0]); }); // Initialise the autocomplete plugin $('input.text', q1).autocomplete({ source: namesArr, // Event fired when a selection is made (ui.item.value refers to the selected item) select: function(event, ui) { // Find the column 2 and column 3 values associated with the selected column 1 value and load q2 and q3 $(fullArray).each(function(i, item){ if(item[0] == ui.item.value) { // The value from column 2 of the CSV $('input.text', q2).val(item[1]); // The value from column 3 of the CSV $('input.text', q3).val(item[2]); } }); } }); }); }); </script>
That template is stone old and won't work well with the latest Limesurvey versions.navneet123 wrote: I have downloaded the IPhone1 template from the link below
www.limesurvey.org/en/download-limesurve...vey-design-templates