Forum Activity for @ultrajam

SteveX
@ultrajam
04/25/17 04:17:48PM
2,584 posts

How to delete one uploaded temp file but keep others from the same form?


Jamroom Developers

Hi Michael

I use that in the function, I probably should have posted the whole thing to start with:
function ujPano_form_validate_exit_listener($_data, $_user, $_conf, $_args, $event)
{ if ($_data['module'] == 'ujPano') {// && isset($_data['pano_equirect_image']) $_fl = jrCore_get_uploaded_media_files('ujPano','pano_equirect_image'); if ($_fl && is_array($_fl) && isset($_fl[0])) { foreach($_fl as $_img) { // check it is 2:1 $_tmp = getimagesize($_img); $w = (int) $_tmp[0]; $h = (int) $_tmp[1]; if ($w / $h !== 2) { // it isn't an equirectangular image global $_post; jrCore_delete_upload_temp_directory($_post['upload_token']); //unlink($_img); jrCore_set_form_notice('notice', "Invalid Equirectangular Image"); jrCore_form_field_hilight('pano_equirect_image'); jrCore_form_result(); } else { } } } } return $_data; }

I've tried deleting the file using unlink($_img) (commented out above) but that results in a continuing failed form validation even when the replacement image passes the equirectangular test. I can't see a way around it.
SteveX
@ultrajam
04/25/17 01:11:52PM
2,584 posts

live streaming


Suggestions

It does look interesting, and seems fairly cheap to me for what it says it does.

Is it any good? Do you rate it?
SteveX
@ultrajam
04/25/17 01:05:26PM
2,584 posts

How to delete one uploaded temp file but keep others from the same form?


Jamroom Developers

My custom module has a form_validate_exit_listener which checks an uploaded image (it must be equirectangular).

If it fails the check, I can do this and everything works as it should :)
global $_post;
jrCore_delete_upload_temp_directory($_post['upload_token']);

But then I've lost other media items which may have been uploaded to other fields.

If I unlink just the failed file the form won't save even with all good files.

Is there any way to get rid of the failed file and notify the user but not insist they upload all the files again, the files can often be quite large.

Any advice or ideas appreciated :) Thanks!
updated by @ultrajam: 08/03/17 01:33:28AM
SteveX
@ultrajam
04/24/17 02:17:19PM
2,584 posts

New Module - (Electronic Press Kit) - idea


Suggestions

Zachary Moonshine:
Actually I was playing with the page creator module last night and think this might be possible

Is that for the EPK idea?
SteveX
@ultrajam
04/24/17 04:30:00AM
2,584 posts

Custom Module AJAX URL


Jamroom Developers

1. They are created when a module has a javascript file added in its init function
2. Just like your example, but replace jrProfile_url with sdModule_url (assuming your module is called sdModule)
3. You don't need to do anything except add the parameter so the router can do its job.
In your module javascript file you create your url before your ajax function:
var url = core_system_url + '/' + sdModule_url + '/my_custom_view/__ajax=1';

Create your view (named view_sdModule_my_custom_view) in your module index.php (look at view_jrProfile_get_pulse_counts in jrProfile index.php as an example). The view needs to encode and return its data using jrCore_json_response($_your_array) - just pass your array in and Jamroom does the rest.
SteveX
@ultrajam
04/20/17 04:27:25AM
2,584 posts

Marketplace listing shows bbcode tags


Using Jamroom

You can see this on the Audio module listing (before it is installed)
/marketplace/browse/module?search_string=audio
Quote: The Audio Support module adds [ b ] Full Audio Support[ /b ] to your Jamroom site,




marketplace-audio.png marketplace-audio.png - 166KB

updated by @ultrajam: 08/10/17 05:43:14AM
SteveX
@ultrajam
04/20/17 03:51:36AM
2,584 posts

Users Online tab has stopped listing visitors online


Installation and Configuration

I'm seeing the same problem and same solution with jrUser 2.2.0b1 as well
  41