Prerequisite: Tutorial: How to AutoTweet from Joomla in 5 minutes
If you are looking for a way to simply publish content from some categories or exclude some categories, most plug-ins have a "Filter" to define included/excluded categories. Firstly, check the associated plugin, "Filter" tab, to filter by category. Moreover, this option avoids any further processing, not generating new requests.
Out of the box, AutoTweet is set up to publish Posts into all Social Channels. However, this is not what most users would like. These are some classic examples:
Some cases can be solved just with a filter at content plugin level, but in this section, solutions based on rules are presented.
Rules allow selecting plugins and channels to post by category, text terms, author and more. Rules are only needed when you will do particular posts. If you will post messages to all channels there is no need to add rules.
The rules engine works processing requests from the list to create posts, when they are on the way to the social channels.
Each rule has the following options:
The following rule types are executed only if the article attribute is either included or not in the associated list of values.
Additionally, "Only Featured" filter allows restricting the rule to featured content.
These rule types are oriented to solve cases where a word or sentence has to be matched to execute the rule:
These are the parameter than can be controlled and modified by a rule.
Message format: a pattern to customize how the message is created. These tags can be implemented in a message pattern:
[xxxxx,99]: it is a special operator to restrict the length of title, text, or fulltext. For example: [introtext,45]
[message] / #Joomla - [fulltext,60]
Extly: [introtext,45] #Joomla #AutoTweetNG [maincat]
Static text can be introduced, or removed if it was previously introduced, in the message.
This is one of most powerful AutoTweet features. It provides a flexible way to replace strings in the message
Reference: Regular Expressions (Perl-Compatible)
The word autotweetng is always replaced with #AutoTweetNG, ignoring case.
/ autotweetng/i \#AutoTweetNG
Similarly to the previous example, but for two words.
["/ autotweetng/i","/ jomsocial/i"] [" #AutoTweetNG"," #JomSocial"]
For example, a regular expression to create hashtags:
["/ AutoTweetNG/i","/ Jomsocial/i"]
[" @AutoTweetNG"," @JomSocial"]
In this case, the rules help to route the content between two channels. Each channel must receive and publish only the articles from its associated category.
Article: A new article for Channel 1
By default, AutoTweet broadcasts the content Requests to all Channels. So, the rules must publish the articles from a category to its channel, and discard everything else received in the channel.
The final result and the rules can be checked in the following screenshots:
In the image, the post for Channel 1 was successfully processed, and the post for Channel 2 was canceled.
In case, you are wondering if there is a way to avoid the "canceling" rules, YES, there is. You can enable DENY ALL mode. In this mode, no post will be published unless you define specific rules to publish posts.
In this example, we are going to show how to setup two rules, one for each language, to show the power of the Rules. In this way, for example, you can define a channel for Twitter in Spanish, Facebook in English, and LinkedIn for all the site languages:
These are the rules:
To avoid any processing of other languages content, the DENY ALL can be enabled
When we publish articles in different languages, they are routed according to the selected language.
In this example, we are going to show how to setup two rules, one for each access level. For instance, you can define a Public Channel to publish news to a Facebook page and a Members Only Channel:
These are the rules:
When articles are published by different access level, they are routed according to the target audience.
By default, the rule engine works in ACCEPT ALL mode, accepting all posts and applying specific rules to the source-channel combination.
On the other hand, if you want to publish content under very specific conditions, more content has to be canceled than published. In this case, DENY ALL is the most convenient option.
The advanced mode DENY ALL works in the other way, rejecting all and accepting only rule-specific posts. A rule must be created to publish content in a source-channel.
In Control Panel / Options / Advanced Settings / Rule Engine Mode:
For more information: http://www.extly.com/docs/autotweetng_joocial/installation/faq#rules
Copyright © 2007-2017 Extly Extensions - All Rights Reserved.
Joomla! name is used under a limited license from Open Source Matters in the United States and other countries. Extly.com is not affiliated with or endorsed by Open Source Matters or the Joomla! project.