Events Manager
[resolved] Anonymous Event Submissions - Is adding an Event Image possible? (5 posts)

  1. bmxcamel
    Posted 5 years ago #

    Hi all,

    This plugin is wonderful, but it would be really beneficial to my site if the new "anonymous event submission" feature allowed users to upload event images.

    I tried copying the code from em-event.php into the event-form.php, but it does not save the image.

    Any help would be appreciated!


  2. bmxcamel
    Posted 5 years ago #

    OOOOH good news I have the solution for you:

    First, make sure the form on line 57 looks like this (note the enctype attribute)

    <form id="event-form" method="post" action=""  enctype='multipart/form-data'>

    Paste the following code at line 324 of /events-manager/templates/event-form.php:

    <div id="event-image" class="stuffbox">
    					<?php _e ( 'Event image', 'dbem' ); ?>
    				<div class="inside" style="padding:10px;">
    						<?php if ($EM_Event->get_image_url() != '') : ?>
    							<img src='<?php echo $EM_Event->image_url; ?>' alt='<?php echo $EM_Event->name ?>'/>
    						<?php else : ?>
    							<?php _e('No image uploaded for this event yet', 'dbem') ?>
    						<?php endif; ?>
    						<br /><br />
    						<label for='event_image'><?php _e('Upload/change picture', 'dbem') ?></label> <input id='event-image' name='event_image' id='event_image' type='file' size='40' />
  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 5 years ago #

    note that you can do this upgrade-safe by using template files (see our site docs).

    the plan is to add options to enable/disable bits of the form (hence it's still beta)

  4. bmxcamel
    Posted 5 years ago #

    Hey Marcus,

    That's a great suggestion. I've followed your instructions here:

    However, for one reason or another the files are not being overridden by the ones I copied to my theme directory. I preserved the folder hierarchy, and only copied one file, event-form.php into /mytheme/plugins/event-manager/templates/templates/event-form.php

    Any idea why?

  5. bmxcamel
    Posted 5 years ago #

    As usual solved it on my own -- don't put it two /templates/templates deep, just /templates

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic