WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Subscribe2] Notifications for customer events?

[Resolved] [Plugin: Subscribe2] Notifications for customer events?

Viewing 15 replies - 16 through 30 (of 30 total)
  • quadc3
    Member

    @quadc3

    Has anyone been able to get these two plugins to work together? I’m very interested in this.

    Thanks!

    mattyrob
    Participant

    @mattyrob

    @quadc3,

    I’m not aware of any workaround currently but both plugins have gone through some updates since this thread was opened. It might be worth trying them together now to see if the conflict has been ironed out.

    Unfortunately, it doesn’t appear to be working. I’ve been trying for a week to get it to work. Shame. I could really use this functionality.

    mattyrob
    Participant

    @mattyrob

    @quadc3,

    I’ve had another brief look at the Event Calender plugin code and I’m not sure that it does use a Custom Post Type as it seems to query another database table for event information.

    Making Subscribe2 work with proprietary third-party data tables is not something that I can spend time developing or supporting if this is indeed the case.

    Thanks for taking a look Mattyrob – I couldn’t get it to work either 🙁

    Hello,

    I think I got it. It’s not straight forward, but for me it works.
    I installed the following plugin: TT Subscribe2 Frontend. This plugin provides a front-end form for the users to manage their subscriptions. In the main php file, there are 3 places indicated by author comments where you can insert custom post types and custom taxonomies. I played a little with these and it worked. The custom post type is “ai1ec_event”, and the custom taxonomy is “events_categories”, both found in the database.

    Please give it a try and tell me if it works. I’m not an experienced programmer, that’s why I bought this small plugin for it’s main purpose, but it looks like it helped for other issues too.

    mattyrob
    Participant

    @mattyrob

    @alexene22,

    Thanks for prompting me 🙂 I’ve actually got this working too, in a way with Subscribe2 8.5 and AI1EC 1.8.3-premium. Please read right to the end.

    As stated above you need to apply the correct filters to Subscribe2, you’ve got the right names but the filters above work too. Condensed into a mini-plugin it looks like this:

    <?php
    /*
    Plugin Name: Subscribe2 AI1EC Filters
    Plugin URI: http://subscribe2.wordpress.com
    Description: Adds AI1EC custom post type and taxonomy to Subscribe2.
    Version: 1.0
    Author: Matthew Robinson
    */
    
    function my_post_types($types) {
    	$types[] = 'ai1ec_event';
    	return $types;
    }
    add_filter('s2_post_types', 'my_post_types');
    function my_taxonomy_types($taxonomies) {
        $taxonomies[] = 'events_tags';
    	$taxonomies[] = 'events_categories';
    	return $taxonomies;
    }
    add_filter('s2_taxonomies', 'my_taxonomy_types');
    ?>

    The most important thing of note is that if you enter your new event details and hit Publish you WILL get an error. You MUST save the post as a draft first to create the event calendar database records, then you can hit Publish and it works fine.

    Time.ly are hopefully looking into this to get over this work-around.

    I’ve read through the entries here, but I’m not sure I’ve done everything correctly. When I create a new event with AI1EC (Premium) I don’t see the box where I can normally check off the “Subscribe2 Notification Override.” That’s what I need.

    Here’s what I did:

    1. Create a folder called located at /wp-content/plugins/AI1EC-Subscribe2
    2. Create a file inside that folder called my_post_types.php
    3. Paste this code inside there:

    <?php
    /*
    Plugin Name: Subscribe2 AI1EC Filters
    Plugin URI: http://subscribe2.wordpress.com
    Description: Adds AI1EC custom post type and taxonomy to Subscribe2.
    Version: 1.0
    Author: Matthew Robinson
    */
    
    function my_post_types($types) {
    	$types[] = 'ai1ec_event';
    	return $types;
    }
    add_filter('s2_post_types', 'my_post_types');
    function my_taxonomy_types($taxonomies) {
        $taxonomies[] = 'events_tags';
    	$taxonomies[] = 'events_categories';
    	return $taxonomies;
    }
    add_filter('s2_taxonomies', 'my_taxonomy_types');
    ?>

    Is that everything? Should I be adding custom post type info or taxonomy info to the TT Subscribe2 Frontend plugin (which I also have installed)? What am I missing?

    Thanks in advance!!!

    -Andrew

    I forgot to add: I activated the plugin “Subscribe2 AI1EC Filters” also. Still no “Subscribe2 Notification Override” box on my New Event custom post type edit page.

    Yeah I couldn’t get the custom plugin to work at all, but I found another work around. I just added the code to the Subscribe2.php file itself.

    Basically, I went to Admin Panel -> Plugins -> Editor -> Subscribe2 Drop Down -> and right after the Copyright notice I added just the following:

    function my_post_types($types) {
            $types[] = 'ai1ec_event';
            return $types;
    }
    add_filter('s2_post_types','my_post_types');
    function my_taxonomy_types($taxonomies) {
    $taxonomies[] = 'events_tags';
    $taxonomies[] = 'events_categories';
    return $taxonomies;
    }
    add_filter('s2_taxonomies','my_taxonomy_types');

    Hit Update File. It worked for me.

    Thanks for the tip, but I just followed your directions and, although it didn’t result in a fatal error, it didn’t add the Subscribe2 Notification Override box to my New Event page.

    Is this what your file looks like? http://screencast.com/t/qwmPxiHnx

    On another forum, a poster said the following:

    @erling & @basememara,

    In order to add the custom field box to override post notification you have to know the slug name of the added page. It’s the fourth parameter passes to the add_meta_box() function.

    For that reason it would be easier to extend the Events plugin to call the Subscribe2 code rather than the other way around. Either that or write your own custom plugin that adds the code to the Events page once you’ve found the slug name.

    Perhaps the code we’re using makes it possible to auto-send an email to subscribers for a new event added, but I need the option to turn it on or off, on a per-post/event basis, like I can do for normal posts. Do you have the notification override option working?

    That’s exactly what my code looks like. And no, I don’t have the override option working for new events.

    The code we are working with allows for notification emails to be sent out to the categories that people have subscribed to only. If you have everyone subscribed to all categories selected, then, of course, they will get the new posts.

    The only way that I know of around this is to set an excluded category and then tag your event with that category to keep it from going out. Not exactly what you’re looking for, but could help prevent spamming your users…

    We keep edging closer to this resolution lol….hopefully, someone else can help you out here.

    Huh, that’s an interesting solution. I’ll give the excluded category a shot until a better solution pops up. Thanks!!

    mattyrob
    Participant

    @mattyrob

    @rhdri,

    Further follow up here.

    @quadc3

    Check out the working AI1EC-Subscribe2 plugin solution (at least for me) over here.

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘[Resolved] [Plugin: Subscribe2] Notifications for customer events?’ is closed to new replies.