Forum Discussion
I came across this topic when researching possibilities to export user ranks. I did end up opening a support ticket to ask if it is possible, but unfortunately it is not.
Please consider voting on my product idea here: Allow user ranks to be exported to CSV
Thanks for the idea lilim, upvoted!
Meanwhile I wrote a dirty export script, just execute it within the inspector console on the ranks page in Admin, it will inject a download link called "Export Ranks" which when clicked will give you a text file to download (just rename the .properties file to .csv or .txt or whatever you need, doesn't really matter, its just text):
jQuery('<div id="ranks" />').hide().appendTo('body'); // create fake container for .load() // The ranks are embedded with an iFrame in Admin, and // therefore not accessible directly via JS, that means we first have to fetch // the content of the iFrame, inject it into the DOM and then work from there... jQuery('#ranks').load(jQuery('.lia-component-admin-widget-user-rankings').prop('src') + ' .admin_cell:last', function() { var ranks = []; // initialize variable jQuery('#ranks a[href*="edit&ranking.id"]').each(function() { var $item = jQuery(this); var title = $item.parents('td:first').next().text().trim(); var id = $item.prop('href').split('=').pop(); var output = `rank.${id}.title = ${title}`; ranks.push(output); //console.log(output); }); //console.log(ranks.join("\n")); var file = null; var buffer = new Blob([ranks.join("\n")], {type: 'text/plain'}); var $link = jQuery('<a href="#" download="ranks.properties">Export Ranks</a>').insertBefore('.lia-component-admin-widget-user-rankings'); // If we are replacing a previously generated file we need to // manually revoke the object URL to avoid memory leaks. if (file !== null) { window.URL.revokeObjectURL(file); } file = window.URL.createObjectURL(buffer); $link.attr('href', file); });
of course you would need to tailor the output to your needs, I needed it for rank translation, therefore it is generating the proper text keys to overwrite rank names...