mirror of
https://git.emanuelegori.uno/emanuelegori/eg-social-timeline.git
synced 2026-06-02 22:06:30 +02:00
A WordPress plugin to display a unified timeline of social media activity from Mastodon, Bluesky, Diggita and Fogejo.
https://emanuelegori.uno/hub-attivita/
- PHP 85.6%
- CSS 14.4%
| assets | ||
| languages | ||
| social-icons | ||
| .gitattributes | ||
| .gitignore | ||
| CHANGELOG.md | ||
| eg-social-timeline.css | ||
| eg-social-timeline.php | ||
| LICENSE.IT.md | ||
| LICENSE.md | ||
| README.it-IT.md | ||
| README.md | ||
| readme.txt | ||
EG Social Timeline
WordPress plugin to display a unified chronological timeline of your social activity from Mastodon, Diggita (Lemmy), Forgejo/Gitea and Bluesky.
Features
- Unified Timeline: aggregates posts from multiple platforms in chronological order
- Supported platforms:
- Mastodon (and ActivityPub-compatible servers)
- Diggita (Lemmy) with full statistics
- Forgejo/Gitea (repository commits)
- Bluesky (public ATP API, no authentication required)
- Per-platform limits: prevents a single platform from monopolizing the timeline
- Interactive filters: pure-CSS filter system to show/hide platforms
- Modular icon system: SVG icons loaded from files, easy to customize
- Smart cache: reduces API requests with a configurable cache
- Interaction stats: shows likes, boosts and comments for each post
- Responsive: design optimized for desktop, tablet and mobile
- Dark Mode: automatic dark theme support
- Privacy-friendly: public data only, no tracking
Screenshot
Installation
Automatic (WordPress)
- Download the latest release from Forgejo
- Go to Plugins → Add New → Upload Plugin
- Select the downloaded ZIP file
- Click Install and then Activate
Manual (FTP/SSH)
cd wp-content/plugins
git clone https://git.emanuelegori.uno/emanuelegori/eg-social-timeline.git
EG Forgejo Updater (Recommended)
Install EG Forgejo Updater for automatic updates from Forgejo.
Configuration
- Go to Settings → EG Social Timeline
- Configure at least one profile:
- Mastodon: full profile URL (e.g.
https://mastodon.uno/@emanuelegori) - Diggita: username (without @)
- Forgejo: username + instance URL (e.g.
https://git.emanuelegori.uno) - Bluesky: handle (e.g.
emanuele.bsky.social, without @)
- Mastodon: full profile URL (e.g.
- Configure per-platform limits (optional):
- Max Mastodon posts (default: 20, 0 = unlimited)
- Max Diggita posts (default: 10, 0 = unlimited)
- Max Forgejo commits (default: 5, 0 = unlimited)
- Max Bluesky posts (default: 10, 0 = unlimited)
- Adjust cache and display settings
- Save
Usage
Basic shortcode
[eg_social_timeline]
With custom limit
[eg_social_timeline limit="20"]
Full example
<h2>My recent activity</h2>
[eg_social_timeline limit="50"]
Platform filters
Built-in CSS filter system:
┌──────────────────────────────────────┐
│ Filter by platform: │
│ ☑ Mastodon (12) ☑ Diggita (8) │
│ ☑ Forgejo (5) ☐ Bluesky (2) │
└──────────────────────────────────────┘
Click a checkbox = posts shown/hidden instantly (zero JavaScript required!)
Customization
Platform icons
Icons are SVG files inside social-icons/:
social-icons/
├── mastodon.svg
├── diggita.svg
├── forgejo.svg
├── bluesky.svg
└── blog.svg
To customize:
- Replace the SVG file with your icon
- Keep size at 24x24px and
viewBox="0 0 24 24" - Use
fill="currentColor"to inherit the surrounding color
Custom CSS
Create wp-content/themes/your-theme/eg-social-timeline-custom.css:
/* Change primary color */
.eg-timeline-filters {
border-color: #YOUR_COLOR;
}
/* Customize post cards */
.timeline-item {
background: #YOUR_BG;
}
Development
Requirements
- WordPress 5.0+
- PHP 7.4+
- API access to the configured platforms
File structure
eg-social-timeline/
├── eg-social-timeline.php # Main plugin
├── eg-social-timeline.css # Styles
├── social-icons/ # SVG icons
│ ├── mastodon.svg
│ ├── diggita.svg
│ ├── forgejo.svg
│ └── bluesky.svg
├── languages/ # Translations
├── README.md
├── readme.txt # WordPress readme
└── LICENSE
APIs used
- Mastodon:
/api/v1/accounts/{id}/statuses - Diggita: RSS
/feeds/u/{username}.xml(with stats parsing) - Forgejo:
/api/v1/users/{username}/repos+/api/v1/repos/{owner}/{repo}/commits - Bluesky:
https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed(public, no token required)
Changelog
[1.6.6] - 2026-06-02
Fixed
- translators: comments added to all i18n strings with placeholders
- strip_tags() replaced with wp_strip_all_tags() (×4)
- date() replaced with gmdate() for timezone safety
- wp_unslash() + sanitize_text_field() added to nonce verification
- error_log() calls marked with phpcs:ignore (already gated by EG_SOCIAL_TIMELINE_DEBUG)
- phpcs:ignore on SVG icon output (hardcoded, sanitized internally)
- esc_html() added to EG_SOCIAL_TIMELINE_VERSION constant output
Removed
- load_plugin_textdomain() — not needed since WP 4.6+ with compiled .mo files
Changed
- tags reduced to 5 (Plugin Check limit)
[1.6.1] - 2026-06-02
Fixed
- Plugin action links now use English msgids (
Settings,Documentation) — correctly translated to Italian viait_IT.mo - Added
rel="noopener noreferrer"to the Documentation action link
[1.6.0] - 2026-06-02
Changed
- Full i18n refactor: all PHP strings now use English msgids (WordPress convention)
it_IT.po/.morebuilt with proper English→Italian translationsen_US.po/.moremoved — English is now the native fallback
[1.5.3] - 2026-06-02
Fixed
- "Filter by platform:" (
Filtra per piattaforma:) wrapped inesc_html_e()and added toit_IT.po/.mo
[1.5.1] - 2026-06-02
Fixed
translators:comment moved immediately aboveesc_html__()call (PHPCS compliance)readme.txttranslated to English (Plugin Check compliance)
[1.5.0] - 2026-06-02
Fixed
- All
strip_tags()replaced withwp_strip_all_tags() date()replaced withgmdate()for timezone safety- Nonce verification uses
wp_unslash()+sanitize_text_field() error_log()calls marked withphpcs:ignore(already gated byEG_SOCIAL_TIMELINE_DEBUG)esc_html()added toEG_SOCIAL_TIMELINE_VERSIONconstant output
Removed
load_plugin_textdomain()— no longer needed since WP 4.6+
[1.4.6] - 2026-05-25
Changed
- readme.txt rewritten with clearer structure
- Tested up to bumped to WordPress 7.0
- EG Forgejo Updater replaces Git Updater in installation instructions
[1.4.5] - 2026-05-25
Security
- HTTPS validation on the Forgejo instance URL during sanitization
Added
- Frontend, configuration and post-limits screenshots
[1.4.4] - 2026-05-24
Fixed
- Forgejo: client-side repo sorting by
updated_atusingusort()— thesort=recentupdateparameter is not supported by the/users/{username}/reposendpoint
[1.4.3] - 2026-05-24
Added
- Image preview support with new admin option (default: disabled)
- Mastodon: extraction of the first image from
media_attachmentswithpreview_urland alt text loading="lazy"attribute on images
Fixed
- Forgejo: repos sorted by last push with
?sort=recentupdate; only the necessary repos are queried (min(repo_count, limit)). Previously the most recent repos were excluded because the API returned repos in creation order
Changed
- Unified post structure:
image_urlandimage_altfields available across all platforms
[1.4.2] - 2026-05-24
Added
- Italian (
it_IT) and English (en_US) translations with.pot,.poand.mofiles
Fixed
- "View original post" / "View commit" link always right-aligned in the footer, even without statistics
Changed
- Mastodon account ID cache extended from 24 hours to 30 days
[1.4.1] - 2026-05-02
Added
- Configurable post text length from admin (default: 300, range: 50–600, 0 = full text with no limits)
[1.4.0] - 2026-05-02
Added
- Bluesky integration via public ATP API (
app.bsky.feed.getAuthorFeed) - New admin field: Bluesky handle (e.g.
emanuele.bsky.social, without @) - New admin field: Max Bluesky posts (default: 10, range: 0-100)
- Bluesky platform filter in the timeline (CSS-only)
- Bluesky statistics: likes, reposts, replies
- Repost support, honoring the "Include Boost/Repost" option
- Automatic stripping of the leading
@from the handle during sanitization
Changed
- "At least one profile" validation extended to Bluesky
- Updated admin error messages
[1.3.1] - 2026-04-06
Security
- Added
LIBXML_NONETto the Diggita RSS feed XML parsing (anti-XXE) - Inline SVG sanitization with
wp_kses()ineg_social_timeline_get_icon()(anti-XSS) - Anti-SSRF validation on external API URLs: new function
eg_social_timeline_is_public_url()rejects private, reserved and localhost IPs
Fixed
- Added missing
esc_url()on admin links inside the shortcode
[1.3.0] - 2026-01-11
Added
- Per-platform configurable limits in admin settings
- New fields: Max Mastodon posts, Max Diggita posts, Max Forgejo commits
- Value 0 = no limit (v1.2.x behavior)
- More balanced timeline: prevents a single platform from monopolizing it
Changed
- Fetch logic modified to honor per-platform limits
- Forgejo: TOTAL commit limit instead of per-repo
- Sensible defaults: Mastodon 20, Diggita 10, Forgejo 5
- Total timeline limit raised: 1-100 (was 1-50)
[1.2.5] - 2026-01-11
Fixed
- Diggita stats:
<br>tags converted to\nbeforestrip_tags()for correct parsing - Forgejo repository name: now visible in the timeline ("Commit to {repo}: {message}")
- Filter buttons: automatic width fixes inconsistent heights
- Filter icons: uniform sizes without distortion
Changed
- CSS: removed fixed width on filter buttons (was 145px → auto)
- CSS: removed
object-fit: containon icons for uniform rendering - Diggita: parsing uses
str_replacefor<br>beforestrip_tags()
[1.2.4] - 2026-01-11
Fixed
- Diggita: robust HTML parsing with
strip_tags() - Forgejo: repo name included in the content
[1.2.3] - 2026-01-11
Fixed
- CSS filters: inverted logic
- Forgejo: commits page link
- UI: compact filter box
[1.2.0-1.2.2] - 2026-01-11
- Forgejo integration, various fixes
[1.0.0-1.1.2] - 2026-01-10/11
- Initial releases, Mastodon API
Contributing
Contributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is released under the GPL-2.0-or-later license.
See the LICENSE file for full details.
Author
Emanuele Gori
- Website: emanuelegori.uno
- Mastodon: @emanuelegori@mastodon.uno
- Gitea: git.emanuelegori.uno
Acknowledgements
- The Mastodon community for the well-documented API
- Diggita.com for the Italian Lemmy platform
- Forgejo/Gitea for the excellent API
- The WordPress community


