Viewing 11 replies - 1 through 11 (of 11 total)
  • you can modify that using template file at templates/ical.php or ical-event.php

    https://wp-events-plugin.com/documentation/using-template-files/

    Thread Starter raskull

    (@raskull)

    Hm, well it’s going to take me some amount of time to muck around in there. Meanwhile, wouldn’t you agree that a location without an address is a problem, not a feature?

    Thread Starter raskull

    (@raskull)

    I figured out how to correct the problem for the generated ics file in i-cal-event.php. But I do not see where to correct it for the parameters passed in the url to google. Please advise.

    can you share the solution?

    Thread Starter raskull

    (@raskull)

    in ical-event.php, line 33

    before:
    $location = $EM_Event->output( '#_LOCATION' );

    after (using a local template, of course):
    $location = $EM_Event->output( '#_LOCATION #_LOCATIONADDRESS #_LOCATIONTOWN #_LOCATIONSTATE #_LOCATIONPOSTCODE' );

    That gives me all the info for the ics file. But which function/file is passing the parameters to the google url? That is the one I need to change.

    it’s the area here:

    BEGIN:VEVENT
    UID:{$UID}
    DTSTART:{$dateStart}
    DTEND:{$dateEnd}
    DTSTAMP:{$dateModified}
    SUMMARY:{$description}
    LOCATION:{$location}
    URL:{$EM_Event->output('#_EVENTURL')}
    END:VEVENT";

    Thread Starter raskull

    (@raskull)

    No, that info is what goes into the ics file. It does not have any effect on the url parameters passed to google. BUT I found it:

    In em-event.php, line 1457:

    before:
    $gcal_url = str_replace('location_name', urlencode($this->output('#_LOCATION')), $gcal_url);

    after:
    $gcal_url = str_replace('location_name', urlencode($this->output('#_LOCATION #_LOCATIONADDRESS #_LOCATIONTOWN #_LOCATIONSTATE #_LOCATIONPOSTCODE')), $gcal_url);

    Now google calendar can generate a map for the location. Would you consider this for an update? I don’t know if there is any way to hook into your code, so I had to hack it.

    you can try to modify/override placeholder instead to make it update free https://wp-events-plugin.com/tutorials/modifying-placeholder-default-information/

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    rather than do that, I’d make this an option in the settings page, so you can change placeholders there.

    Thread Starter raskull

    (@raskull)

    Please explain further. Are you suggesting an update that you would make to the plugin?

    I wonder why #_LOCATION and #_LOCATIONNAME are both the same thing. It would make sense to me to have #_LOCATION be the combination of #_LOCATIONNAME #_LOCATIONADDRESS #_LOCATIONTOWN #_LOCATIONSTATE and #_LOCATIONPOSTCODE.

    BUT… since it is not, I am trying to modify the #_LOCATION placeholder. AND I need help. Using your example:

    function my_em_placeholder_mod($replace, $EM_Location, $result){
    	if ( $result == '#_LOCATION' ) {
    		$replace = $replace . WHAT GOES HERE?;
    	}
    	return $replace;
    }
    add_filter('em_location_output_placeholder','my_em_placeholder_mod',1,3);

    What do I put where it says WHAT GOES HERE? I tried, for example, ‘#_LOCATIONPOSTCODE’ and #_LOCATIONPOSTCODE but neither of those worked.

    Thread Starter raskull

    (@raskull)

    Allrighty I think I got it. Let me know if you see any fatal flaws:

    function my_em_placeholder_mod( $replace, $EM_Location, $result ){
    	if ( $result == '#_LOCATION' ) {
    		$replace = $EM_Location->output( '#_LOCATIONNAME #_LOCATIONADDRESS #_LOCATIONTOWN #_LOCATIONSTATE #_LOCATIONPOSTCODE' );
    	}
    	return $replace;
    }
    add_filter( 'em_location_output_placeholder','my_em_placeholder_mod',1,3 );

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Events Manager] location address missing for google calendar and ical’ is closed to new replies.