WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Image uploads for non logged in users (10 posts)

  1. greggo
    Member
    Posted 2 years ago #

    I have the event form set up on my site so that anonymous users (not logged in) can submit events. At the moment, they are only allowed to upload a single image. The text editor, which displays the uploader icon when someone is logged in, does not display the icon when not logged in. IS it possible to allow for an anonymous user to upload images using the text editor?

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 2 years ago #

    yes, please checkout the event-editor.php template @ templates\forms but how about the Upload/change picture file upload?

    http://wp-events-plugin.com/documentation/using-template-files/

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    not without making some changes yourself to the editor... you'd need to add an uploader to that page, and some PHP code to handle the extra images.

  4. greggo
    Member
    Posted 2 years ago #

    The uploader is there when logged in, there must be somewhere where I can just take off the conditional logic that requires someone to be logged in to upload, no? Any clues as to which files to look for would be appreciated.

    thanks.

  5. greggo
    Member
    Posted 2 years ago #

    I found where I can edit the template "form/event-editor.php" but the code that should allow for guest access to image uploader isn't working. Any ideas? This is what I've tried:

    <?php $settings = array('wpautop' => true, 'media_buttons' => true, 'quicktags' => true, 'textarea_rows' => '25'); ?>
    <?php wp_editor($EM_Event->post_content, 'em-editor-content', array('textarea_name'=>'content', $settings) ); ?>
  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    Ah, if you mean within the text editor, you should probably look around the codex for this sort of solution, it's WP related, not EM.

    Maybe there's a plugin that allows this sort of permission?

  7. greggo
    Member
    Posted 2 years ago #

    What I've found thus far is that I need set the filter user_can_richedit via the functions.php. I've tried that to no avail.

    Also, I've been getting this error, any correlation to the issue?

    Warning: Invalid argument supplied for foreach() in /srv/htdocs/site/wp-includes/class-wp-editor.php on line 414

    Another question is regarding video embed codes...they get lopped out without the richedit mode.

  8. greggo
    Member
    Posted 2 years ago #

    I can't seem to get rid of this error? Even when I revert back to the original template, it's still there. Any ideas?

    http://fthebanks.org/bank-actions/share-your-action/

    Note, the error doesn't appear when you're logged in...only when you're a guest.

  9. agelonwl
    Member
    Posted 2 years ago #

    that's a PHP warning which you can turn-off in your server settings (display_errors=off) and that should not affect the whole process?

  10. pranoy
    Member
    Posted 1 year ago #

    HI,

    I also face the same issue with mulilang Contact form and wp 3.4.1 - the same error like:
    Warning: Invalid argument supplied for foreach() in localdrive:\xampp\htdocs\your_project\wp-includes\class-wp-editor.php on line 434
    When i deactivate the Multilang plugin the warning goes away and all is working fine.
    If anybody finds the same problem i would like to suggest to open the page: ml-contactform.php and i commented out this line ( last line in my case)
    //add_filter('tiny_mce_before_init', 'mlcf_mce_valid_elements');

    The problem is resolved in my case.

    Best regards,

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic