Events Made Easy › Forums › Bug fixed or feature request implemented › Feature suggestion: 'do_action' on 'eme_event_form'
Tagged: do_action
- This topic has 5 replies, 2 voices, and was last updated 14 years, 3 months ago by
Franky.
-
AuthorPosts
-
Sat 26 Mar 2011 at 14:14 #42662
Anonymous
InactiveI would like to suggest an ‘do_action’ at the end of the ’eme_event_form’ function.
E.g.:
if (has_action(’eme_event_form’)) do_action(’eme_event_form’,$event);
Best/
Andy
Sat 26 Mar 2011 at 15:52 #47315Franky
KeymasterAnd why an action? The eme_event_form function just shows the form for edit/creation of an event, it doesn’t do anything.
Sat 26 Mar 2011 at 16:39 #47316Anonymous
InactiveHi Franky,
Yes …I would like to add two form fields to be able to integrate the add/edit form with another application.
I did some tests, and injected some html and appended it to the form with JavaScript.
But perhaps there is a better way to hook into that page?
Best/
Andy
Sat 28 May 2011 at 14:10 #47317Franky
KeymasterAdding two form fields results in no change, since it’s eme that’s doing the parsing. Or are you using another plugin with higher priority that’s taking this in first?
Thu 2 Jun 2011 at 08:31 #47318Anonymous
InactiveI made my own plugin …dirty, as I’m new to PHP and WordPress.
I use these:
add_action(’eme_event_form’, ‘amx_eme_event_form_hook’);
add_action(’eme_delete_event_action’, ‘amx_eme_db_delete_event’);
add_action(’eme_update_event_action’, ‘amx_eme_db_update_event’);
add_action(’eme_insert_event_action’, ‘amx_eme_db_insert_event’);
In the eme_event_form action I’m adding the html code and placing it with a JavaScript.
E.g.:
<script type=”text/javascript”>
document.write(‘<div class=”postbox” id=”amx_eme_tag_div”><div class=”handlediv” title=”Click to toggle.”>
</div><h3 class=”hndle”><span>Tags</span></h3><div class=”inside”><div style=”overflow:scroll; height: 250px;”><?php echo str_replace(“‘”, “‘”, $tag_input_checked.$tag_input) ?></div><div><label for=”amx_tag_add”>Tilføj Tags (komma separeret): </label></div><input type=”text” id=”amx_tag_add” name=”amx_tag_add” style=”width: 100%” /></div></div>’);document.getElementById(‘post-body-content’).appendChild(amx_eme_tag_div);
</script>
I used it to add Tag functionality to the Add/Edit form …but the implementation is so bad, that I will not post i publicly …tell me if you want my code and make a clean version!
Best/
Andy
Sat 16 Jul 2011 at 08:56 #47319Franky
KeymasterFrom the changelog in trunk:
eme_add_booking_form_filter and eme_delete_booking_form_filter filters added, so you can change the form html to your liking
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.