Forum Replies Created
-
AuthorPosts
-
BrianParticipant
Thanks for the link Christina, I’m going to try that. Looks like it should work, it simply maps the venue fields that aren’t mapped in the code from the original tut. I’ll let you know how I get on, and will post full code if I get it working…
BrianParticipantForm is working, event post is created when I submit the form….and title, body, start time and end time are being saved…..but Venue details are not. I have fields like “Venue Name”, “Venue Address”, “Venue City”, and “Venue Zip Code”.
Using _EventVenue as the custom field name , _EventCity and so on…isn’t working , and the data isn’t being saved along with the other event data. It is submitting to the form though in Gforms.
Any ideas?
I’m using the code from this tut http://creativeslice.com/tutorials/gravity-forms-events-calendar-submissions/ along with the code I pasted above in my functions.php file.
BrianParticipantHere is the correct code (did you really try test this?! haha – two equals signs were missing, could not have worked, crashes site)
add_action(‘save_post’, ‘save_tec_event_meta_from_gravity’, 11, 2);
function save_tec_event_meta_from_gravity($postId, $post) {
if( class_exists(‘TribeEvents’) ) {
// only continue if it’s an event post
if ( $post->post_type != TribeEvents::POSTTYPE || defined(‘DOING_AJAX’) ) {
return;
}
// don’t do anything on autosave or auto-draft either or massupdates
if ( wp_is_post_autosave( $postId ) || $post->post_status == ‘auto-draft’ || isset($_GET[‘bulk_edit’]) || $_REQUEST[‘action’] == ‘inline-save’ ) {
return;
}
if( class_exists(‘TribeEventsAPI’) ) {
TribeEventsAPI::saveEventMeta($postId, $_POST, $post);
}
}
}BrianParticipantGot an error,
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in functions.php on line 149
There’s a problem somewhere in this line:
if ( wp_is_post_autosave( $postId ) || $post->post_status ‘auto-draft’ || isset($_GET[‘bulk_edit’])
Any idea? Is there a typo in there somewhere
BrianParticipantAwesome, thanks for this Rob. Attempting to do this integration with GFORMS right now
BrianParticipantJohn, it’s all down to knowing what naming convention the devs of the events plugin have given the roles…..if any…So, we just have to wait to see if they can provide that info….
Like I said, the other examples (gravity forms, nextgen gallery) use the plugin name first, then the capability….So, your guess is as good as mine for what the event calendar pro uses….
BrianParticipantCreate a new folder in your theme folder, name it “events” , and then copy over the “single.php” from the events calendar plugin folder named “views” and paste that single.php file into your new “events” folder in your theme directory.
Go to line 79 in that file (look for where it calls post_thumbnail) and remove everything from line 79 down to 82 or comment it like this : (paste this code in place of what’s there now =>http://pastebin.com/Eu8dbfdw
BrianParticipantI agree Andrew. Both those need to be hidden for Pro users. For now, I just remove it from the php files so the clients can’t see it
BrianParticipantI recommend “Members” plugin by Justin Tadlock http://wordpress.org/extend/plugins/members/
Then you just need to add the necessary capabilities ….I’m not exactly sure what you’d name the capability for Events Calendar ….most other plugins seem to start the capability names with the plugin name…. e.g. Gravity Forms uses gravityforms_view_entries ….and Nextgen Gallery looks like… NextGEN Edit album
Perhaps the devs could let us know the exact capability slug we should be using for event calendar? Thanks
BrianParticipantAs an add-on to Birgit’s comment, I used the custom event fields to have a drop down in the admin event post screen so that I could designate the zoom level uniquely for each event.
I added the following code immediately after zoom: on line 17 in that event-map.php file
And under Events Calendar settings, you need to add a custom events field named something like “zoomlevel” and make it a dropdown, and give it 1 through 20 as the values. This was the second custom events field I had added, so its label is _ecp_custom_2 so you need to change that to _ecp_custom_1 if it’s the first custom event field you’ve created….or the 3rd or whatever….
Now you can have a unique zoom level for each event….hopefully that helps someone, sounds perfect for you Robert. All the best
Brian
BrianParticipantBrianParticipantThanks for your reply John. Can’t seem to get it working using sp_get_events()
Can you post a small sample query and loop that you’d recommend using please?
Thanks
October 15, 2011 at 7:44 am in reply to: Different Events URL slug and Single Event URL slug cause issue with breadcrumbs #9723BrianParticipantTry Breadcrumb Navtx plugin, that one is able to work with custom post types nicely, which is what “Events” now are in ECP2
BrianParticipantAlso, yes, the recurring events all have a category designation of “Homepage Slider” which is what I am using in my query.
Anyone with any help would be great, thanks
October 14, 2011 at 9:28 am in reply to: Displaying Custom Field Attributes on Frontend in Custom Template File #9689BrianParticipantOk, I ended up looking through the database to see how these custom field values are stored in ECP 2.0 and found _ecp_custom_1 as the key….
So for anyone looking for this answer, here’s the code I’m using to pull out the value for my first custom field value in the events custom fields – http://pastebin.com/bhFAZLFM
-
AuthorPosts