Gilles

Forum Replies Created

Viewing 7 posts - 31 through 37 (of 37 total)
  • Author
    Posts
  • in reply to: Problem with list view #959136
    Gilles
    Participant

    Hi,

    Thank you for the information. I disabled my functions.php customizations and the issues was still there. I have about 90 plugins installed, so it’s a bit hard to ask me to disable them all, but I will try. I will look into switching theme.

    The thing is, I look into the query in wp-content/plugins/the-events-calendar/lib/tribe-event-query.class.php, and it looks exactly the same when using ajax or on page refresh. The return of the query looks different, so that’s where the problem lies. Though I have no idea how the same exact query can result in a different result.

    If you have any idea how that could be possible, let me know. Thank you.

    in reply to: Problem with Google Calendar link #954728
    Gilles
    Participant

    Hi George,

    Thanks for the reply. I understand it’s easy to “fix up” the google calendar event. It is sad that Google does not allow setting recurring events through url. I do understand it is a bit of a tricky situation but it can be done with ics files, so I don’t see why it couldn’t be done with urls too. Anyway I guess they are investing in a true API to give users better access and get more control and visibility on their side. I hope you have the time at some point to switch to supporting the API.

    Thank you for pointing me to the other post. There is some really interesting coding in there. Below is what I came up with on my own (and some help from the interwebs). There is a code specific to my custom fields.

    I appreciate the detailed support!

    Gilles

    // Remove html tags from google calendar export
    add_filter(‘tribe_google_calendar_parameters’, ‘my_tribe_google_calendar_parameters’, 10, 1);
    function my_tribe_google_calendar_parameters ($params) {
    $event_details = urldecode($params[‘details’]);

    // First, replace UTF-8 characters.
    $event_details = str_replace(
    array(“\xe2\x80\x98”, “\xe2\x80\x99”, “\xe2\x80\x9c”, “\xe2\x80\x9d”, “\xe2\x80\x93”, “\xe2\x80\x94”, “\xe2\x80\xa6”),
    array(“‘”, “‘”, ‘”‘, ‘”‘, ‘-‘, ‘–‘, ‘…’),
    $event_details);
    // Next, replace their Windows-1252 equivalents.
    $event_details = str_replace(
    array(chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133)),
    array(“‘”, “‘”, ‘”‘, ‘”‘, ‘-‘, ‘–‘, ‘…’),
    $event_details);

    $event_details = preg_replace(“/(<\/p>)/”, ‘$1’.”\n”, $event_details);
    $event_details = trim(strip_tags($event_details));
    $event_details = preg_replace(“/(we|you|they)’re/”, ‘$1 are’, $event_details);
    $event_details = preg_replace(“/(I)’m/”, ‘$1 am’, $event_details);
    $event_details = preg_replace(“/(she|he)’s/”, ‘$1 is’, $event_details);
    // remove empty lines
    $event_details = preg_replace(“/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/”, “\n\n”, $event_details);

    $event_details = preg_replace(‘/(PRE-REQUISITES:)/’, “\n# “.’$1′, $event_details);

    $fields = tribe_get_custom_fields( get_the_ID() );
    foreach ( $fields as $label => $value ) {
    $value = trim(strip_tags($value));
    if ($label == ‘Instructor 1’) {
    $title = urldecode($params[‘text’]);
    $title .= ‘ w/ ‘.strtok($value,’ ‘);
    $params[‘text’] = urlencode($title);
    } elseif ($label == ‘Instructor 2’) {
    $title = urldecode($params[‘text’]);
    $title .= ‘ & ‘.strtok($value,’ ‘);
    $params[‘text’] = urlencode($title);
    } else {
    $event_details .= “\n\n$label: $value”;
    }
    }

    $event_details = urlencode($event_details);
    $event_details = preg_replace(‘/%26%238230%3B/’, str_repeat(urlencode(‘.’), 3), $event_details);
    $params[‘details’] = $event_details;

    return $params;
    }

    in reply to: Problem with Google Calendar link #953661
    Gilles
    Participant

    Okay I have one more. It would be great if there was a filter on this line of wp-content/plugins/the-events-calendar/lib/the-events-calendar.class.php:

    $event_details = get_the_content();

    Then I could easily manipulate the content myself, e.g. I could remove the html tags.

    Gilles

    in reply to: Problem with Google Calendar link #953659
    Gilles
    Participant

    One last thing for today, it would be great if the additional fields could be included too.

    Gilles

    in reply to: Problem with Google Calendar link #953658
    Gilles
    Participant

    I also see a number of formatting issues:

    “…
    You might think we’ll be baking, with moves that include words like “roll” and “sugar”, and you won’t
    …”

    Google calendar does not support HTML so after you call get_the_content(), it would be great to pass it through an HTML to text converter.

    Gilles

    in reply to: Problem with Google Calendar link #953657
    Gilles
    Participant

    Hmm things start to work again without my doing anything. Well okay I have been working on the site continuously so it’s possible I fixed it inadvertently. Or maybe google was having an issue, not sure.

    Anyway, I’ve noticed that exporting a recurring event does not make it recurring on google. Seems like a bug or am I using the wrong link?

    Gilles

    PS: My first name has two Ls in it 🙂

    Gilles
    Participant

    Hmm I think I figured out that I needed to use ‘Clear’ to remove the filter. This is not intuitive at all.

    Gilles

Viewing 7 posts - 31 through 37 (of 37 total)