WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bmxcamel
    Member
    Posted 3 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!

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

  2. bmxcamel
    Member
    Posted 3 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">
    				<h3>
    					<?php _e ( 'Event image', 'dbem' ); ?>
    				</h3>
    				<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' />
    				</div>
    			</div>
  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 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
    Member
    Posted 3 years ago #

    Hey Marcus,

    That's a great suggestion. I've followed your instructions here:
    http://wp-events-plugin.com/documentation/using-template-files/

    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
    Member
    Posted 3 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

About this Topic