Subscribe to Category

Beschreibung

This plugin lets a user subscribe and unsubscribe to posts within a certain category or categories.
Subscribers will receive an e-mail notification with a link to the actual post.

For a complete overview of STC read: STC’s User Manual version 2.6.3.
This document also includes a Step by Step Get Started chapter.

The following features are available

  • E-mail notification template with placeholders
  • Custom Posts
  • Custom Taxonomies
  • Enhanced keyword search in Title, Content, Tags and Taxonomies
  • E-mail notification on timer or daily basis
  • SMS notification on timer or daily basis
  • For newly created and / or updated Posts
  • Works with classic editor and the block editor
  • Export and Import subscribers
  • Implementierung per Widget und/oder per Shortcode.

Usage

For a complete overview of STC read: STC User Manual

Screenshots

  • Einstellungsseite mit der STC-Menüstruktur und einigen Punkten
  • Mit Bootstrap-Framework.
  • Ohne Bootstrap Framework, überschreibe und füge dein eigenes CSS hinzu.
  • Wenn „Beitrag erneut senden“ in den Einstellungen aktiviert ist, gibt es eine neue Option, die beim Bearbeiten eines Beitrags verfügbar ist.
  • Wenn sowohl das erneute Senden von Beiträgen als auch die Einstellungen des Gutenberg-Editors aktiviert sind, sind die Optionen zum erneuten Senden im Gutenberg-Dokument-Tab verfügbar.
  • Taxonomie-Bearbeitungsmöglichkeit
  • STC-Abonnentenliste mit einer individuellen Taxonomie namens „Taxonomien“.
  • Abonnieren wie durch den Shortcode erstellt (im Baumansichtsmodus)
  • Abonnieren wie durch den Shortcode erstellt (im normalen Listenmodus)
  • Benachrichtigungs-E-Mail mit allen 6 aktiven HTML-Einfügeabschnitten
  • Template für E-Mail-Benachrichtigung zum Einstieg
  • Einstellen von Widget-Attributen

Installation

Dieser Abschnitt beschreibt, wie du das Plugin installierst und zum Laufen bringst.

  1. Lade subscribe-to-category in das Verzeichnis wp-content/plugins/ hoch.
  2. Aktiviere das Plugin im „Plugins“-Menü des WordPress-Backends.
  3. Überprüfe und speichere deine Einstellungen mit dem Dashboard-Menüpunkt „STC Abonnent > Einstellungen“.
  4. Erstelle eine Seite und füge den Shortcode [stc-subscribe] hinzu oder benutze das STC-Widget, um das STC-Abonnementformular anzuzeigen.
  5. Überprüfe/erstelle/aktualisiere Abonnenten mit dem Dashboard-Menüpunkt STC-Abonnent > Abonnenten

Shortcode-Attribute

‚category_in‘ – Use this attribute if you only want one or several categories to be available for subscription. Value to be entered is the name of the category. Note that only level 0 (no parent) values can be entered.
‚category_id_in‘ – The difference to above is to use the category ID instead of category name.
‚category_not_in‘ – Use this attribute if you want to exclude categories to be available for subscription. Value to be entered is the name of any category.
‚category_id_not_in‘ – The difference to above is to use the category ID instead of category name.
For the above attributes you can use a comma sign to separate multiple categories, like [stc-subscribe category_in=“news, article“].

‚hide_unsubscribe‘ – hide_unsubscribe=“true“ disables the unsubscribe feature but only if the shortcode attribute is also enabled at the admin setting
‚treeview_folded‘ – treeview_folded=“false“ unfolds the category / taxonomy tree view by default
‚treeview_enabled‘ – treeview_enabled=“false“ displays the categories / taxonomies as one list ignoring hierarchy. Please note that only the selected categories are in or out
‚keyword_search‘ – keyword_search=“on“ enables the search for keywords in new or updated selected post types. Default is keyword_search=“off“
’subscriber_notification‘ – subscriber_notification=“true“ enables email notification on an individual per subscriber basis. Default is subscriber_notification=“false“
‚mobile_phone‘ – mobile_phone=“on“ enables the SMS Notification function. This will send SMS Notifications just like the the E-mail notifications for new or updated posts.

Filter und Hooks

Die folgenden Filter und Haken können zur Anpassung der E-Mail-Nachricht verwendet werden.

<?php
// FILTERS
// Parameters: $value
add_filter( 'stc_message_length_sum_of_words', 'stc_message_length_sum_of_words', 10, 1 ); //set return value to a negative number to show the full content


// Parameters: $value, $post_id, $subscriber_post_id
add_filter( 'stc_message_title_html', 'my_stc_message_title_html', 10, 3 );
add_filter( 'stc_message_link_to_post_html', 'my_stc_message_link_to_post_html', 10, 3 );
add_filter( 'stc_message_unsubscribe_html', 'my_stc_message_unsubscribe_html', 10, 3 );
add_filter( 'stc_message_subscribe_html', 'my_stc_message_subscribe_html', 10, 3 );

// HOOKS
// Parameters: $post_id, $subscriber_post_id  
add_action( 'stc_before_message', 'my_stc_before_message', 10, 2 );
add_action( 'stc_before_message_title', 'my_stc_before_message_title', 10, 2 );
add_action( 'stc_after_message_title', 'my_stc_after_message_title', 10, 2 );
add_action( 'stc_before_message_content', 'my_stc_before_message_content', 10, 2 );
add_action( 'stc_after_message_content', 'my_stc_after_message_content', 10, 2 );
add_action( 'stc_after_message', 'my_stc_after_message', 10, 2 );

// Parameters: $subscriber_post_id, $categories, bool $all_categories
add_action( 'stc_after_update_subscriber', 'my_stc_after_update_subscriber', 10, 3 );
add_action( 'stc_after_insert_subscriber', 'my_stc_after_insert_subscriber', 10, 3 );

// Parameters: $subscriber_post_id, 
add_action( 'stc_before_unsubscribe', 'my_stc_before_unsubscribe', 10, 1 ); // runs before deleting a subscriber from database
add_action( 'stc_before_subscribe', 'my_stc_before_subscribe', 10, 1 ); // runs before adding a subscriber to the database


/**
 * Example for adding featured image to STC email
 */
function my_stc_after_message_title( $post_id ){
    echo get_the_post_thumbnail( $post_id, 'thumbnail' );
}
add_action( 'stc_after_message_title', 'my_stc_after_message_title', 10, 2 );

?>

Optional, aber empfohlen

Da WordPress Cron davon abhängt, dass du Besuche auf deiner Website hast, solltest du einen Cronjob auf deinem Server einrichten, der in regelmäßigen Abständen auf http://yourdomain.com/wp-cron.php zugreift, um sicherzustellen, dass WP Cron wie erwartet läuft. In der aktuellen Version von Subscribe to Category läuft der WP Cron einmal stündlich, das könnte eine Option sein, die in zukünftigen Versionen geändert werden kann.
Daher könnte ein vorgeschlagenes Intervall für deinen Server Cron einmal alle 5 Minuten sein.

FAQ

Kann STC zusätzlichen HTML-Inhalt in die Benachrichtigungs-E-Mail einfügen

Ja, indem man die verfügbaren Hooks benutzt, um (an 6 Stellen) HTML-Inhalte in die Benachrichtigungs-E-Mail einzufügen. Aber es erfordert Programmierkenntnisse, um sich an STC anzuschließen. Seit Version 2.4.9 ist dies auf eine viel ausgeklügeltere Weise möglich. Siehe für die Stellen, an denen du HTML-Screenshot-10.jpg einfügen kannst

Für einen Neuanfang ist der einfachste Weg, alle HTML-E-Mail-Templates (veröffentlicht und verworfen) zu löschen. Dann wird STC automatisch ein bearbeitbares STC-Demo-E-Mail-Template wie in Screenshot-11 erstellen. Vergiss nicht, diese Vorlage unter STC Subscribe -> Einstellungen zu aktivieren.

Or follow the 3 steps below.
step 1: STC Subscribe->Notifications->Add New notification to create a new e-mail notification template.
Step 2: Edit the post best in block-editor using a single html block. All styling must be within each HTML element. Remember not all email providers handle all HTML styles. Use the placeholders like {{post_title}},{{post_content}},{{justify}} and {{unsubscribe}}. For more details look in Chapter 5 of STC’s User Manual
step 3: Enable the required post template in the STC admin settings.

Kann das STC-Widget mit Attributen umgehen

Ja, ab Version 2.4.16 hat der Einstellungsbereich des Widgets ein Feld zum Hinzufügen von Attributen. Das Format ist das gleiche wie in der Shortcode.

Kann STC mit individuellen Inhaltstypen umgehen

Ja, ab Version 2.4.1 ist es möglich, STC mit individuellen öffentlichen Inhaltstypen zu verlinken. Du kannst die indiuviduelle Inhaltstypen auf der STC-Admin-Einstellungsseite auswählen

Kann STC individuelle Taxonomien verarbeiten

Ja, ab Version 2.3.1 ist es möglich, STC mit individuellen Taxonomien zu verknüpfen. Du kannst diese innerhalb von STC auf der STC-Admin-Einstellungsseite aktivieren.

Warum kann ich nur Kategorien/Taxonomien der Stufe 0 für die „Kategorie in Filtern“ haben

Das liegt daran, dass, wenn du eine untergeordnete Kategorie zum Filtern auswählst, die Baumansicht nicht mitten im Nirgendwo beginnen kann. Wenn das Attribut ‚treeview_enabled=“false“ aktiv ist, ist es jedoch möglich, eine untergeordnete ohne übergeordnete Kategorie auszuwählen, da diese als eine einzige Kategorie/Taxonomie aufgelistet sind.

Wie kann ich die Kategorien und Taxonomien anstelle der Baumansicht auflisten lassen

Du kannst eine Kategorie/Taxonomie als Liste haben, indem du das Shortcode-Attribut treeview_enabled=“false“ hinzufügst. Bitte beachte, dass bei aktiviertem Attribut die Kategorie/Taxonomie „in Filtern“ die Hierarchie ignoriert, was dazu führt, dass die Liste genau der Liste entspricht, die im Attribut „in Filter“ angegeben ist.

Wie sollte das Format für den Import von Abonnenten aussehen?

STC kann nur mit Tab-getrennten Dateien umgehen, da die Kategorien mit Kommas voneinander getrennt sind.↵
(Unter anderem) Excel gibt dir die Möglichkeit, das Arbeitsblatt als Tab-getrennte TXT-Datei zu exportieren.

Rezensionen

13. Juli 2021
No nonsense plugin without unnecessary marketing features. Simple and with good documentation, if you bother to read through it carefully (which I didn't but that's on me). Active and helpful developer with great support. Even got in a call with me to help, far beyond anything you can demand. Getting a placeholder for the updated category without "Term:" and "found." would be great but that's too small an issue to complain about.
6. Mai 2021
This plugin does exactly what it should and it comes with amazing support. Some other review says: "Do one thing and do it well" I totally agree.
6. April 2021
Curious about functionality: What I am looking is: as blog Reader, be able to subscribe only to certain Categories in Posts (get emails). Doable?
15. März 2021
Our deepest gratitude, Sidney. This is wonderful and so is your support with the odd array of challenges specific to my client's site and setup. Highly recommend. I'd encourage the developers to create a Pro version - we will happily purchase.
10. Februar 2021
I ran into a glitch with custom posts being accidentally pushed out on republish. After I reported the bug to the support forum, vandestouwe not only replied within no time at all, but also fixed it and developed a new feature in the process. Amazing!
Alle 28 Rezensionen lesen

Mitwirkende & Entwickler

„Subscribe to Category“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„Subscribe to Category“ wurde in 5 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Subscribe to Category“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

2.6.3

  • added possibility to use jet smart filter checkbox settings as subscription categories.

2.6.3

  • added possibility to use jet smart filter checkbox settings as subscription categories.
  • buf fixes

2.6.2

  • On import subscribers changed seperator from „, “ to „,“ and allowing for subscribers with zero assigned Taxonomies
  • Simplified Import and Export so it can now cope with custom taxonomy groups
  • Text changes to allow for *.txt and *.csv files on import subscribers
  • STC Subscription CSS changed theme ul style causing problems for some themes
  • minor bug fixes

2.6.1

  • Added admin setting to enable the SMS Notifications (default is off))
  • Added Mobile Number and SMS Status Fields to the STC Subscribers List
  • fixed several debug notices, warnings and code bugs.

2.5.9

  • Added attribute to show taxonomy hierarchy in the reason why a notification was sent.
  • minor bug fixes

2.5.8

  • Fixed warning on directory or file does not exsist
  • Fixed problems with containers with two or more columns

2.5.7

  • added confirmpage slug: stcs-confirmation-page for stage one of email confirmation
  • added SMS Notification feature (workonly with TextMagic as send sms provider)
  • Fixed problem with email notification subject
  • Fixed mixed some text messages wrongly using Blog where it should be Post
  • Fixed problem with do not send this Post on new/update
  • minor bug fixes.

2.5.5

  • added landingspage with slug stcs-landing-page
  • solved bug in succesfull reply on import susbscribers
  • solved bug in subscribers not having a proper default value for individual subscribtions

2.5.4

  • new placeholders
  • choice for weekdays, daily and hourly notifications on individual basis
  • problem with word / character cutoff in middle of html tag’s
  • small bugfixes

2.5.3

  • added new place holder {{post_excerpt}}
  • added new place holder {{post_featured_image}}
  • new STC Basic e-Mail Template V2.1 (delete older versions)
  • solved problem {{search_reason}} containing „“ in some cases.

2.5.2

  • added possibility in the post ducoment sidebar to inhibbit send e-mail notifications
  • Ignore default treeview enabled when category attributes are used in the same shortcode this makes it possible to upgrade STC from older (before treeview) versions

2.5.1

  • revised readme.txt and introduction of STC’s User Manual
  • Added enhanced keyword search facilities.
  • Added stc_update_count_callback function which filters out the terms count for custom post type ’stc‘.
  • Check for STC meta keys present on custom posts created by others. Add STC meta keys/values if not present.
  • Added more placeholders to control the e-mail notification template
  • For newly created e-mail notification post are created with content explanatory content and possible placeholders.
  • small bugfixes

2.4.18

  • Removal of all the non textual tags preventing cutoff’s causing e-mail layout failure
  • Added multibyte characters count for the E-Mail Notification
  • Added hidden

tags to separate multiple updates and / or saves posts. HR styling is available in body class „stc-notify-hr“
* Added workaround to control justification in the contents row of the e-mail notification template. text-align: left“>{{post_content}} is used by STC to replace the word left for center allowing dynamic justification depending on content cutoff is 0 or > 0
* small bugfixes

2.4.17

  • Created „STC Demo E-mail Template V1.1“ to enable background-color style change with Chinese SMTP provider (tested with outlook, gmail and exmail).
  • Improved handling of E-mail Template
  • small bugfixes

2.4.16

  • Unsubscribe via e-mail link firing more then once causing incorrect fault message
  • New single HTML E-mail Notification layout with placeholders for title, content and unsubscribe
  • Widget settings for STC Widget: new possibility to use shortcode attributes
  • small bugfixes

2.4.14

  • adding a feature to send all email notifications once per day
  • revised the STC Settings Notification E-mail status pane
  • small bugfixes

2.4.12

  • Added/Revised code and HTML section post to create an initial html template setup like in screenshot-11. Delete all HTML sections (published and trashed) to replace existing HTML sections
  • corrected quite a view spelling mistakes in messages and readme.txt
  • small bugfixes

2.4.11

  • Redesigned the STC menu structure. Dashboard: STC Subscribe => Submenu: (Settings, Notifications, Subscribers)
  • Added code to create the basic notification structure automatically (if HTML section names not checked && post does not exist) {wp_insert_post(….)}
  • small bugfixes

2.4.10

  • created a way that categories are default on until the user itself disables it through STC admin settings
  • redesigned option structure for compatibility reasons

2.4.9

  • major change in adding HTML text to the notification e-mail (read FAQ concerning HTML inserts)
  • categories can now be disabled to accommodate users how only work with custom taxonomies
  • small bugfixes

2.4.8

  • small bug fixes.

2.4.7

  • STC used Sendmail instead of PHPMailer because in version 5.5 from WordPres wp_mail can’t cope with a encoded_basic64. Analasys of the PHPMailer’s showed that it takes care of 8-bit characters itself so no need to do this in STC. wp_mail() again used enabling Mail plugins to pick up STC mails.

2.4.6

  • added attribute ‚treeview_folded‘ -> treeview_folded=“false“ unfolds the category / taxonomy tree view by default
  • added attribute ‚treeview_enabled‘ -> treeview_enabled=“false“ displays the categories / taxonomies as one list ignoring hierarchy. Please note that only the selected categories are in or out
  • added/changed some French translations
  • small bug fixes.

2.4.5

  • filter categories caused the tree view to be messed up completely now any category can be taken out but only categories of level 0 can be filtered in.

2.4.4

  • allow for no categories or taxonomies selected at all
  • fixed issue that subscribers in trash taxonomies where picked up
  • fixed issue displaying wrong indent for category and taxonomy treeview

2.4.3

  • fixed issue on shortcodes attributes: category_in, category_id_in, category_not_in, category_id_not_in

2.4.2

  • fixed issue on STC settings page when no custom post or no custom taxonomies where available
  • fixed issue on subscription warning when no taxonomies where selected
  • fixed issue on first use of the block editor STC resend checkbox

2.4.1

  • Added Custom Posts Functionality
  • Minor bugfixes

2.3.9

  • Fixed error in CSS file stc-tax-style.css causing CSS optimization to fail

2.3.8

  • Revised category and taxonomy selection for the shortcode and widget
  • Several changes to make understand STC better
  • Fix bug in wp-mail sending corrupted base64 encode subject in notification
  • Other bugfixes

2.3.6

*bugfixes

2.3.5

  • Small changes to adapt to WP 5.5
  • bugfixes

2.3.1

  • New admin setting to select custom taxonomies names (shortcode for taxonomy selection comes later for now use admin edit of subscription)
  • Multiple post to one subscriber are added together in one notification.
  • bugfixes

2.2.1

  • Introduced subscriber verification for subscriptions and updates while not logged in to WordPress
  • Introduced disabling of the unsubscribe checkbox
  • New admin setting to control the length of the content in the email notification
  • bugfixes

2.1.7

  • Added email conformation to intended STC subscriber. When confirmed the new STC subscriber becomes active. This is not required when the user is in admin mode.

2.1.6

  • minor bugfixes

2.1.5

  • changed subscription method for existing subscribers to enable updating the subscription
  • bug fixed with only one category causing nothing to show

2.1.4

  • Changed text for using the Gutenberg/Block editor to be more clear
  • Redirect to first page after subscription stays now on the current page
  • Bug fixed causing not to update the subscribers when using the classic WP editor

2.1.3

  • Added an admin feature to import a csv subscriber list in exactly the same format as created by the export function

2.1.2

  • Added an admin setting to control the WP-Cron STC rescheduling „send email time“. Default is 3600 second but the user can now set it to any value between 180 and 3600 => 2 minutes and 1 hour

2.1.1

  • during sanitizing process, the email address from the unsubscriber lost the „@“ sign causing failed unsubscribing issues

2.1.0

  • implemented sanitizing and escaping according WPCS
  • adapted internationalization text domain to plugin standards
  • added ’numberposts‘ => -1 to the arguments for exporting all subscribers to excel it was defaulting to a maximum of 5
  • minor bugfixes

2.0.0

  • adapted STC to wp 5.3 features by adding a STC resend option to the document tab

1.9.0

  • Email address preset for logged in users.
  • Japanese, Dutch, German and Norwegian language added.

1.8.1

  • Added pot file to be used for translation.
  • Bugfix – changed text domain to string instead of constant.

1.7.0

  • Added some new hooks: stc_after_update_subscriber, stc_after_insert_subscriber, stc_before_unsubscribe.

1.6.0

  • Added a Widget for subscription form.
  • Don’t show category list if only one is available (thanks to davefx).
  • Extended short code attributes with an option to use category id instead of category name (thanks to Stingray_454).

1.3

  • Added hooks and filters to make the plugin extensible.
  • Added Lithuanian language.

1.2.1

  • Fixed some undefined variables that might have caused some errors for some environments.
  • Renamed language files for Russian language to correct syntax.
  • Added Italian language.

1.2.0

  • Possibility to re-send a post on update that has already been sent. This option needs to be activated in the settings for the plugin.
  • Attribute ‚category_in‘ added to shortcode to show only entered categories in the subscribe form. Multiple categories are separated by a comma sign.
  • Attribute ‚category_not_in‘ added to shortcode to exclude categories in the subscribe form. Multiple categories are separated by a comma sign.

1.1.0

  • Added php sleep() function to prevent sending all e-mails in the same scope.
  • Using Ajax when send is manually triggered in back-end.

1.0.0

  • First release