Link in the admin’s notification email

Home Forums Calendar Products Community Events Link in the admin’s notification email

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #68401
    Rafael
    Participant

    Hello support
    When users submit a community event the admin is notified. In the notification email to the admin there’s a link to the submitted event. This link leads to the “front-end” editor of the event (the same interface as the user had who submitted the event).

    Wouldn’t it make much more sense to have the link lead directly to the “back-end” of the event, that is to the WordPress editor?

    So instead of:
    http://www.mywebsite.com/events/submit/edit/event/postid/
    have the link lead to:
    http://www.mywebsite.com/wp-admin/post.php?post=postid&action=edit

    That’s what I’d like to do. Can you help me with it?

    #68414
    Casey
    Participant

    Thanks for stopping by, and I’ll see if I can help you out. I’ve submitted this request to one of developers to take a look at, so please stand by while I wait to hear back their response.

    Thanks!

    #68417
    Casey
    Participant

    Just got a response. It looks like we don’t have a convenient filter to allow you to easily change the link. However, you should be able to write some code to filter on ‘wp_mail’ to modify the link that is sent.

    I know that’s not an ideal solution, but if you’re looking for an easier built-in way to do this, please suggest a feature on our UserVoice page here: http://tribe.uservoice.com

    I hope that helps. Thanks!

    #68491
    Rafael
    Participant

    Thanks for your prompt response.
    How would I go about writing such code to filer on ‘wp_mail’? Is there some sample code?

    #68541
    Casey
    Participant

    Unfortunately I don’t have a code sample for something like this, but you can read the documentation (which has a few basic filter examples) for wp_mail here: http://codex.wordpress.org/Function_Reference/wp_mail

    Hope that helps. Good luck!

    #68584
    Rafael
    Participant

    I’ve found another solution. It’s a hack, but it works. Here’s what I did in case someone is interested.

    I found the code for the link in the file:
    the-events-calendar-community-events/lib/tribe-community-events.class.php
    on line 1279. I changed that line from:

    $message .= ” . $this->getEditButton( $post, __( ‘Review Event’, ‘tribe-events-community’ ) );

    to:

    $message .= ” . ‘‘ . __( ‘Review Event’, ‘tribe-events-community’ ) . ‘‘;

    Of course this change is lost when the plugin gets updated. But for the moment this works for me. Maybe it helps someone else with the same issue.

    #68586
    Rafael
    Participant

    Ooops, the code I entered above doesn’t get displayed correctly. How can I show code in the comment?

    #68600
    Casey
    Participant

    Great! Glad to hear you were able to get this done.
    Try using a site like http://pastebin.com/ to paste your code into the thread.

    #69461
    Rafael
    Participant

    I’ve found another solution. It’s a hack, but it works. Here’s what I did in case someone is interested.

    I found the code for the link in the file:
    the-events-calendar-community-events/lib/tribe-community-events.class.php
    on line 1279. I changed that line from:

    to:

    Of course this change is lost when the plugin gets updated. But for the moment this works for me. Maybe it helps someone else with the same issue.

    #69462
    Rafael
    Participant

    I’ve found another solution. It’s a hack, but it works. Here’s what I did in case someone is interested.

    I found the code for the link in the file:
    the-events-calendar-community-events/lib/tribe-community-events.class.php
    on line 1279. I changed that line from:

    to:

    Of course this change is lost when the plugin gets updated. But for the moment this works for me. Maybe it helps someone else with the same issue.

    #69463
    Rafael
    Participant

    My last two comments above are attempts to embed code from pastebin.com (the first one using javascript, the second using iframe), but it does not seem to work.
    Am I doing something wrong or is it simply not possible to show/embed code into this thread?

    #69469
    Casey
    Participant

    Swissvegan,
    SO sorry about that! We’re working on fixing code formatting in our forum and should be updating that soon. In the mean time, just paste the URL to the pastebin code that you saved so users can go directly to pastebin to view it. Thanks!

    #69473
    Rafael
    Participant

    Thanks Casey for your prompt response. Ok, so here’s the solution that worked for me.

    In the file:
    the-events-calendar-community-events/lib/tribe-community-events.class.php
    on line 1279. I changed that line from the code at:
    http://pastebin.com/gNqQdNG6
    to the code at:
    http://pastebin.com/fGmtAYUg

    Maybe this solutions helps someone.

    #69474
    Casey
    Participant

    Awesome! Since you’ve gotten sorted this out, I’m going to mark this thread “Answered” and close it out.

    We really appreciate your support and please let us know if you need anything else in the future. If you find yourself with a few minutes and would be so kind as to give us a “Works” rating or a positive star voting on the WordPress.org repo (http://wordpress.org/extend/plugins/the-events-calendar/), or even a shoutout to your followers on Facebook or Twitter, it would mean a lot to us. Thanks again for using the plugin.

    #981314
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Link in the admin’s notification email’ is closed to new replies.