Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter grexican

    (@grexican)

    eli dot gassert
    at toad-software dot com

    Thread Starter grexican

    (@grexican)

    Hi Q,

    I’m back from my trip. I’ll try out your plugin changes sometime this week.

    Also, since you’re adding save changes, I think adding a “select all” feature would be very much appreciated.

    In my case, when I wrote this little JS snippet, it didn’t save changes and I didn’t need the fancy selector. So I just used JS to hide it and add a “select all” feature with jQuery. Adding this feature natively would be a big help I think. We have hundreds of fields.

    Here’s my jquery. you should be able to easily adapt it with a static element and then call and “update” to the field picker UI to refresh based on the hidden field’s data:

    setTimeout(function()
    		{
    			$('#bp_fields').css('position', 'static !important').css('left', '');
    			$('#ms-bp_fields').hide();
    
    			var $bpAll = $('<span> <a href="#" onclick="return false;">Select All</a></span>').on('click', function()
    			{
    				$('#bp_fields option').prop('selected', true);
    			});
    
    			$('#bp_fields').after($bpAll);
    
    		}, 50);
    Thread Starter grexican

    (@grexican)

    Sounds like a plan. I’ve starred the project. Let me know when you’ve updated the repo and I’ll take it for a test run with my larger-than-life export.

    Thread Starter grexican

    (@grexican)

    Sure, I’ll definitely test it for you, but I unfortunately won’t be able to until next week. I’m about to head out for a few days for a business conference and won’t get back until Saturday.

    Thread Starter grexican

    (@grexican)

    It’s a fall-through. So in the case of ‘g’ (gigabytes) the value (let’s say 1g) gets multiplied by 1024 * 1024 * 1024. So 1 * 1024 * 1024 * 1024 = # of bytes in a gig. 1 * 1024 = # of megabytes in a gig; again * 1024 = # of kb in a gig; again * 1024 = # of bytes. We need it in bytes because that’s what memory_get_usage() returns.

    ob_end_flush() is for good measure. On low-memory systems, you can fill up the output buffer when you echo things. ob_end_flush() says that each echo is written to the output stream immediately instead of buffering. This takes the weight off the memory limits and also starts dumping data to be downloaded as soon as it’s ready. It’s also slightly slower than buffered streams because of the context switching between the PHP call to write and the actual writing, but the tradeoffs are worth it for file downloading, imho.

Viewing 5 replies - 1 through 5 (of 5 total)