Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
ICAL and event meta question | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium ICAL and event meta question

ICAL and event meta question

Posted: November 25, 2013 at 2:31 pm

Viewing 9 reply threads


James Simon

November 25, 2013 at 2:31 pm

In the ical.php file I see lines like this

“LOCATION:” . $_REQUEST[‘location’] . “\n” .

I have created Event Meta for Virtual Password that I would want added to the ical import. But I am not sure how to change the line above to pull in event meta.

Could someone guide me in the right direction for what that line would look like?

Much appreciated. Completely lost on this one. Thanks


Dean

  • Support Staff

November 26, 2013 at 1:00 am

Hi James,

You need to modify the function below it first espresso_ical_prepare_by_meta.

There is an array where you can add a key value pair so you can add in the meta data.

Then in the first function you can call that data and add it to the ICAL.


James Simon

November 26, 2013 at 5:12 am

OK just not clear on syntax.

The line towards the top I have

“DESCRIPTION:” . $_REQUEST[‘event_virtualpassword’] . “\n” .

And at the bottom of the file in the function you are referring too I have

‘event_virtualpassword’ => $meta[‘event_virtualpassword’],

No value gets returned.


Dean

  • Support Staff

November 26, 2013 at 5:35 am

Try

'event_virtualpassword' => do_shortcode("[EE_META type='event_meta' name='event_virtualpassword']")

Tehe $meta variable doesn’t contain the event meta as it isn’t a true custom post type (4.0 will be!) so you need to grab the data another way.


James Simon

November 26, 2013 at 7:43 am

Perhaps we are getting closer. However, it returns no data.

Now I have

“DESCRIPTION: this is a test ” . $_REQUEST[‘event_virtualpassword’] . “\n” .

(It displays this is a test in the description area of the calendar entry but event_virtualpassword is left blank)

and lower in the file

‘event_virtualpassword’ => do_shortcode(“[EE_META type=’event_meta’ name=’event_virtualpassword’]”),

In my custom functions file I have (just to confirm the value for the event meta is correct.

if (!function_exists(‘ee_default_event_meta’)){
function ee_default_event_meta(){
return array(
“event_hashtag”=>”#eventespresso”,
“event_format”=>”conference”,
“event_livestreamed”=>”N”,
“event_addteacher”=>”add name”,
“event_addteacheremail”=>”add email”,
“event_addteacher2″=>”add name”,
“event_addteacher2email”=>”add email”,
“event_addteacher3″=>”add name”,
“event_addteacher3email”=>”add email”,
“event_virtualurl”=>”virtual url”,
“event_virtualpassword”=>”virtual password”,
“event_phone”=>”dial in”,
“event_passcode”=>”passcode”

);
}
}


Sidney Harrell

  • Support Staff

November 26, 2013 at 10:44 am

The ee_default_event_meta defines the event meta fields for when you create a new event. The event that you are working with, when you open it in the event editor, does it have the event_virtualpassword field in it?


James Simon

November 26, 2013 at 3:03 pm

yes it does. i added it to the custom functions.php file so it displays as an event meta option as default.

Now i am trying to get that field to show up in the description of the ical import.


Sidney Harrell

  • Support Staff

November 26, 2013 at 4:05 pm

As a debugging measure, I would change line 101 of ical.php to:

$url = add_query_arg( $array, site_url() );var_dump($array);

Once you’ve confirmed that it’s not there, you can go into includes/shortcodes.php and change line 894 to:

global $event_meta, $venue_meta, $all_meta;var_dump($event_meta);

Are you using the ical link in an email, on the event list page, or the event registration page?


James Simon

November 26, 2013 at 5:24 pm

I am using the ical in an email


Sidney Harrell

  • Support Staff

November 27, 2013 at 9:31 am

Because it’s in the email, the $event_meta global hasn’t been populated. You can fix this by adding:

global $event_meta;
		$event_meta = unserialize($wpdb->get_var($wpdb->prepare("SELECT event_meta FROM " . EVENTS_DETAIL_TABLE . " WHERE id=%d", $meta['event_id'])));

anywhere in the function espresso_ical_prepare_by_meta (second function in ical.php) prior to the array declaration. Then when you use the do_shortcode in the array declaration, the $event_meta global will work.

Viewing 9 reply threads

The support post ‘ICAL and event meta question’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server