• Resolved auniquename

    (@auniquename)


    It seems to work on the demo, but when I install it, the only permissions available are for users with roles – guest do not have a role – so how do I allow them to upload pictures?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter auniquename

    (@auniquename)

    Please notify me when this question is posted so that I can return and see if it has been read. Thanks.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi @auniquename,
    if users are unable to upload images from a page with [adverts_add] shortcode then usually this is because there is some JavaScript error on your site which prevents the Gallery upload script from executing.

    One other problem is that the frontend is using non-SSL connection but the wp-admin and the page to which AJAX requests are sent is using SSL connection.

    It would be best if you could share a link to your page with the [adverts_add] shortcode so i could take a look at it?

    In very least while on a page with [adverts_add] in Chrome pres Ctrl + Shift + i this will open a developer console, and show you all JavaScript error you can either make a screenshot or copy them and paste here.

    Thread Starter auniquename

    (@auniquename)

    Thanks for the reply!

    There is no JavaScript error. The issue is that when I save the Image Editor Capability under Options -> Core -> Gallery -> Image Editor Capability … and set it to Subscriber/Read it always saves as the last role in the select – not the one I selected. (Currently role ‘Organization’ in my list)

    Have you tested the plugin on a site with non-standard roles? I am using the ‘Members’ plugin (Justin Tadlock’s). As well as Membee login integration.

    Also, the custom post status implementation needs a little work.

    I will look at your code today and see if I can find out why it does not respect the Image Editor Capability selected.

    Thanks again for the reply!

    Plugin Author Greg Winiarski

    (@gwin)

    Hi @auniquename,
    one thing i did not notice about the “Image Editor Capability” options is that it lists all the capabilities for each user role, so the “read” capability occurs there multiple times as usually, all roles have it.

    That being said, while this might be inconvenient (and i will update it in the next release) it is not that much of a problem as it is unimportant which “read” option is selected as this is one and the same “read” capability.

    Most likely you are seeing the last one as selected as each “read” option is marked as selected (since they have the same “read” value) and the browser will show the last option with selected="selected" param as actually selected.

    Two notes about your questions from the first message:

    1. If you allow the non-logged in users to post Ads from the [adverts_add] page then they can also upload images into the gallery.

    2. The “Image Editor Capability” option disables only users ability to customize images (it does not disallow to upload images), that is the user who cannot edit images will not see the “Edit Image” button see the video here https://www.youtube.com/watch?time_continue=58&v=eAnLUX55r9M in the 50th second you will see the “Edit Image” button and what it does.

    If you want not-logged-in users to be able to edit images, then in the “Image Editor Capability” field select an empty option.

    3. I am not sure what do you mean by Also, the custom post status implementation needs a little work.?

    Thread Starter auniquename

    (@auniquename)

    I found the problem. It was WP-SpamShield (the last free version before the whole disturbing controversy here).

    I have solved it without disabling WP-SpamShield by adding the following filter to my child theme functions.php:

    add_filter( 'wpss_misc_form_spam_check_bypass', 'custom_misc_form_spam_check_bypass' );
    function  custom_misc_form_spam_check_bypass( $bypass ) {
    	$bypass = FALSE;
    	$bypass_actions = array (
        	'adverts_gallery_upload',
    		'adverts_gallery_delete',
    		'adverts_gallery_update_order'
        );
    	if ( isset($_POST['action'] ) ) {
        	if ( in_array($_POST['action'], $bypass_actions ) ) {
            	$bypass = TRUE;
            }
        }
        return $bypass;
    }
    Plugin Author Greg Winiarski

    (@gwin)

    Ok great i am glad you have it resolved and thanks for posting feedback and a solution, maybe someone will find it helpful in the future :).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Allow image upload for guests’ is closed to new replies.