2872ae2b97
#19 Per-article cross-posting: Content plugin injects "Cross-Posting" fieldset into article editor via onContentPrepareForm. Dynamic checkbox list of all enabled services. Skip toggle. System plugin reads article attribs for mokojoomcross_services (array of service IDs) and mokojoomcross_skip (boolean). Unchecked = post to all. #20 Analytics dashboard: Posts-by-service breakdown table with success rate column (color-coded). Top cross-posted articles list. DashboardModel methods: getServiceBreakdown(), getDailyTrend(), getTopArticles(). #21 OAuth flows: OAuthHelper with authorize URL generation (Facebook, LinkedIn, Twitter), PKCE for Twitter, code→token exchange, token storage in service credentials. OauthController with authorize and callback actions. Reads client ID/secret from plugin params. #22 Wiki documentation: Services guide (all 9 platforms, default vs custom mode), REST API reference, Message Templates guide with examples per platform, Troubleshooting guide. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
78 lines
1.8 KiB
Markdown
78 lines
1.8 KiB
Markdown
# Message Templates
|
|
|
|
MokoJoomCross uses message templates to format the content sent to each platform. Templates support placeholders that are replaced with article data at post time.
|
|
|
|
## Managing Templates
|
|
|
|
Navigate to **Components → MokoJoomCross → Templates** to create and edit templates.
|
|
|
|
## Template Priority
|
|
|
|
When cross-posting, the system looks for templates in this order:
|
|
1. **Platform-specific template** — matches the service type exactly (e.g., "twitter")
|
|
2. **Default template** — fallback used when no platform-specific template exists
|
|
|
|
## Available Placeholders
|
|
|
|
| Placeholder | Description | Example |
|
|
|-------------|-------------|---------|
|
|
| `{title}` | Article title | "New Product Launch" |
|
|
| `{url}` | Full article URL | "https://example.com/article/123" |
|
|
| `{introtext}` | Intro text (280 chars, HTML stripped) | "We're excited to announce..." |
|
|
| `{fulltext}` | Full text (500 chars, HTML stripped) | Extended content |
|
|
| `{image}` | Intro image full URL | "https://example.com/images/photo.jpg" |
|
|
| `{category}` | Article category name | "News" |
|
|
| `{author}` | Author display name | "John Smith" |
|
|
| `{date}` | Publish date (YYYY-MM-DD) | "2026-05-28" |
|
|
|
|
## Example Templates
|
|
|
|
### Default (all platforms)
|
|
```
|
|
{title}
|
|
|
|
{introtext}
|
|
|
|
{url}
|
|
```
|
|
|
|
### Twitter / X (280 char limit)
|
|
```
|
|
{title}
|
|
|
|
{url}
|
|
```
|
|
|
|
### Mastodon (with hashtags)
|
|
```
|
|
{title}
|
|
|
|
{introtext}
|
|
|
|
{url}
|
|
|
|
#Joomla #{category}
|
|
```
|
|
|
|
### Mailchimp (HTML email)
|
|
```html
|
|
<h1>{title}</h1>
|
|
<p>{introtext}</p>
|
|
<p><a href="{url}">Read the full article</a></p>
|
|
```
|
|
|
|
### Telegram (HTML format)
|
|
```html
|
|
<b>{title}</b>
|
|
|
|
{introtext}
|
|
|
|
<a href="{url}">Read more</a>
|
|
```
|
|
|
|
## Per-Article Override
|
|
|
|
In the article editor, the **Cross-Posting** tab lets you:
|
|
- Skip cross-posting entirely for a specific article
|
|
- Select which services to post to (instead of all enabled services)
|