Changeset 740007
- Timestamp:
- 07/12/2013 08:29:40 PM (12 years ago)
- Location:
- nextgen-gallery-voting/trunk
- Files:
-
- 3 edited
-
js/ajaxify-likes.js (modified) (1 diff)
-
js/ajaxify-stars.js (modified) (1 diff)
-
ngg-voting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nextgen-gallery-voting/trunk/js/ajaxify-likes.js
r739201 r740007 11 11 data: '', 12 12 success: function(data, textStatus, XMLHttpRequest) { 13 var start = data.indexOf("<!-- NGGV START AJAX RESPONSE -->") + 41; //find the start of the outputting by the ajax url (stupid wordpress and poor buffering options blah blah) 14 var end = data.indexOf("<script><!-- NGGV END AJAX RESPONSE -->"); 15 16 var js = data.substr(start, (end-start)); 17 js = js.replace(/(\r\n|\n|\r)/gm,''); 18 19 eval(js); //the array of voters gets echoed out at the ajax url 13 var ajaxVer = data.indexOf('var nggv_ajax_ver'); //bit of a hack to improve ajax with minification, but keeping backwards compat for older users 14 if(ajaxVer > -1) { //means it was actually found, the ver num is irrelevent for now 15 eval(data); 16 }else{ 17 var start = data.indexOf("<!-- NGGV START AJAX RESPONSE -->") + 41; //find the start of the outputting by the ajax url (stupid wordpress and poor buffering options blah blah) 18 var end = data.indexOf("<script><!-- NGGV END AJAX RESPONSE -->"); 19 20 var js = data.substr(start, (end-start)); 21 js = js.replace(/(\r\n|\n|\r)/gm,''); 22 23 eval(js); //the array of voters gets echoed out at the ajax url 24 } 20 25 21 26 if(typeof(nggv_js) == 'object') { -
nextgen-gallery-voting/trunk/js/ajaxify-stars.js
r739201 r740007 11 11 data: '', 12 12 success: function(data, textStatus, XMLHttpRequest) { 13 var start = data.indexOf("<!-- NGGV START AJAX RESPONSE -->") + 41; //find the start of the outputting by the ajax url (stupid wordpress and poor buffering options blah blah) 14 var end = data.indexOf("<script><!-- NGGV END AJAX RESPONSE -->"); 15 16 var js = data.substr(start, (end-start)); 17 js = js.replace(/(\r\n|\n|\r)/gm,''); 18 19 eval(js); //the array of voters gets echoed out at the ajax url 13 var ajaxVer = data.indexOf('var nggv_ajax_ver'); //bit of a hack to improve ajax with minification, but keeping backwards compat for older users 14 if(ajaxVer > -1) { //means it was actually found, the ver num is irrelevent for now 15 eval(data); 16 }else{ 17 var start = data.indexOf("<!-- NGGV START AJAX RESPONSE -->") + 41; //find the start of the outputting by the ajax url (stupid wordpress and poor buffering options blah blah) 18 var end = data.indexOf("<script><!-- NGGV END AJAX RESPONSE -->"); 19 20 var js = data.substr(start, (end-start)); 21 js = js.replace(/(\r\n|\n|\r)/gm,''); 22 23 eval(js); //the array of voters gets echoed out at the ajax url 24 } 20 25 21 26 if(typeof(nggv_js) == 'object') { -
nextgen-gallery-voting/trunk/ngg-voting.php
r739201 r740007 1709 1709 $form = $this->getImageVoteMarkup($options); 1710 1710 1711 echo '<!-- NGGV START AJAX RESPONSE -->'; 1712 echo '<script>'; 1711 //echo '<!-- NGGV START AJAX RESPONSE -->'; 1712 //echo '<script>'; 1713 echo 'var nggv_ajax_ver = 2;'; //new in 2.6.1 to help js minification messing up ajac voting 1713 1714 echo 'var nggv_js = {};'; 1714 1715 echo 'nggv_js.options = {};'; … … 1716 1717 echo 'nggv_js.msg = "'.addslashes($votedOrErr).'";'; 1717 1718 echo 'nggv_js.voting_form = "'.addslashes($form['form']).'";'; 1718 echo '<script><!-- NGGV END AJAX RESPONSE -->';1719 //echo '<script><!-- NGGV END AJAX RESPONSE -->'; 1719 1720 exit; 1720 1721 }
Note: See TracChangeset
for help on using the changeset viewer.