|
| 1 | +# TootPress WordPress Plugin |
| 2 | + |
| 3 | +TootPress copies your toots from Mastodon to WordPress continuously. |
| 4 | + |
| 5 | +## Description |
| 6 | + |
| 7 | +The plugin copies your toots from Mastodon continuously and saves them into the WordPress database. The toots can be displayed on the blog chronologically (but do not have to). Indeed, Mastodon is also blogging, micro-blogging so to speak. |
| 8 | + |
| 9 | +## Functions |
| 10 | + |
| 11 | +* Copy your toots back |
| 12 | +* Copy your tooted images back |
| 13 | +* Display your toots on the blog |
| 14 | +* Retrieve your complete timeline |
| 15 | +* Languague: English, German (only FrontEnd) |
| 16 | + |
| 17 | +## Installation |
| 18 | + |
| 19 | +1. Download the plugin from the GitHub Repository (see Releases) |
| 20 | +2. Rename the folder to "tootpress" |
| 21 | +2. Upload the plugin to the WordPress Plugin Directory |
| 22 | +3. Activate the plugin in WordPress |
| 23 | +4. Follow the configuration manual |
| 24 | + |
| 25 | +## Configuration |
| 26 | + |
| 27 | +1. Create an Application on your Mastodon Instance for API Access (Account Settings/Applications) |
| 28 | +2. Restrict the Authorization of the Application to Read (all data) |
| 29 | +3. Maintain Mastodon Instance and Access Token in the TootPress Settings |
| 30 | +4. Retrieve your Account ID (WordPress Tools/Toots) |
| 31 | +5. Maintain the Account ID in the TootPress Settings |
| 32 | +6. Create a new WordPress Page and add the Page to your Main Menu |
| 33 | +7. Maintain the Page ID in the TootPress Settings (see URL editing the Page) |
| 34 | +8. Run Mastodon API Request once (WordPress Tools/Toots) |
| 35 | +9. Activate Steady Fetch |
| 36 | +10. That's it! |
| 37 | + |
| 38 | +## CSS classes |
| 39 | + |
| 40 | +TootPress comes with basic CSS Styles. For best fit it is required to add additional styles in your theme. All TootPress UI elements can be addressed with individual CSS selectors. Please use browser debugger to find the right classes. |
| 41 | + |
| 42 | +## TootPress API |
| 43 | + |
| 44 | +WordPress Action: tootpress_toots_update (fired on toot update) |
| 45 | + |
| 46 | +## Data & Files |
| 47 | + |
| 48 | +TootPress creates 2 folders within wp-content/uploads. |
| 49 | + |
| 50 | +* tootpress-mastodonapidata = Archive of the received Mastodon API data |
| 51 | +* tootpress-images = Toot Image Folder |
| 52 | + |
| 53 | +## Supported Toot Objects |
| 54 | + |
| 55 | +Following toot objects are supported. |
| 56 | + |
| 57 | +* Text |
| 58 | +* Images |
| 59 | +* URLs |
| 60 | +* Hashtags |
| 61 | +* Mentions |
| 62 | + |
| 63 | +## Not supported Toot Objects |
| 64 | + |
| 65 | +Following toot objects are not supported. |
| 66 | + |
| 67 | +* Galleries |
| 68 | +* Audio |
| 69 | +* Video |
| 70 | +* Poll |
| 71 | +* Emojis |
| 72 | +* Teaser |
| 73 | + |
| 74 | +## Not supported Toot Types |
| 75 | + |
| 76 | +Following toot types are not supported. |
| 77 | + |
| 78 | +* Boosts |
| 79 | +* Replys |
| 80 | +* Private Toots |
| 81 | + |
| 82 | +## TootPress Cron Jobs @ WordPress |
| 83 | + |
| 84 | +* Steady Fetch (every 15 minutes, customizable) |
| 85 | +* Load Complete Timeline (every 5 minutes) |
| 86 | + |
| 87 | +## WordPress Framework |
| 88 | + |
| 89 | +Following components of WordPress are used in TootPress. |
| 90 | + |
| 91 | +* HTTP API |
| 92 | +* WP-Cron |
| 93 | +* Settings API |
| 94 | +* Options API |
| 95 | +* Rewrite API |
| 96 | +* Date Functions |
| 97 | +* MySQL Functions |
| 98 | +* URL Functions |
| 99 | +* WordPress Functions |
| 100 | +* File Functions |
| 101 | + |
| 102 | +## Frequently Asked Questions |
| 103 | + |
| 104 | +### Which Toots are displayed in the blog? |
| 105 | + |
| 106 | +Only your own toots will be displayed. Boosts (these are not your toots), Replys (these are communication, no micro-posts) and private Toots are excluded. |
| 107 | + |
| 108 | +### Can the toots be loaded automaticly? |
| 109 | + |
| 110 | +Yes. Activate Steady Fetch for this. |
| 111 | + |
| 112 | +### How many toots will be loaded with an API Request? |
| 113 | + |
| 114 | +40 toots at maximum. |
| 115 | + |
| 116 | +### How often will the toots be loaded? |
| 117 | + |
| 118 | +As Standard your toots will be fetched from Mastodon every 15 minutes. But you can define the period in minutes different in the plugin settings. |
| 119 | + |
| 120 | +### Can I load my complete Mastodon timeline? |
| 121 | + |
| 122 | +Yes. You can load your complete Mastodon timeline with this plugin. Just run the corresponding function. The Load will take some time. Every 5 minutes 40 toots will be loaded until the timeline is complete. |
| 123 | + |
| 124 | +### What do I have to do first, activate steady fetch or load the complete timeline first? |
| 125 | + |
| 126 | +All the same. It works both. |
| 127 | + |
| 128 | +### How does TootPress handle the canonical URL? |
| 129 | + |
| 130 | +TootPress does not modify the existing canonical url handling in WordPress. If you want to change the canonical url, you must control that with a SEO plugin. This is relevant for the paged TootPress subpages. |
| 131 | + |
| 132 | +### What have to be considered with the usage of caching plugins? |
| 133 | + |
| 134 | +The length of the cron period in combination with the configuration of caching determines how early a toot will be displayed within the blog. If a toot should be displayed as early as possible, the caching must be deactivated for the page including the toots. Another possibility is removing the affected page from the cache, if new toots have been loaded. For this, a WordPress Action is fired by the plugin (see above). |
| 135 | + |
| 136 | +### Why require some updates a reset of the plugin and reload of the data? |
| 137 | + |
| 138 | +The plugin does still not have a high maturity grade. It is in a early stage of development. To avoid data inconsistency and process errors some updates require a reload of the data. |
| 139 | + |
| 140 | +### Does TootPress support WordPress Multisite? |
| 141 | + |
| 142 | +No. TootPress does not support the WordPress Multisite Feature. The plugin is working on the master-site, but is not working on all other child sites within the wordpress network. |
| 143 | + |
| 144 | +### Can TootPress load toots from several Mastodon instances? |
| 145 | + |
| 146 | +No. |
| 147 | + |
| 148 | +## Live Demo |
| 149 | + |
| 150 | +[Here!](https://www.unmus.de/troets/) |
| 151 | + |
| 152 | +## Branches |
| 153 | + |
| 154 | +This repository follows the git-flow workflow to a large extent. |
| 155 | + |
| 156 | +* master branch is the latest release |
| 157 | +* develop branch is the current state of development |
| 158 | +* feature branches contain dedicated features in development |
| 159 | +* bugfix branches contain dedicated bugfixes in development |
| 160 | + |
| 161 | +Hotfix and release branches will not be applied. |
| 162 | + |
| 163 | +## Built With |
| 164 | + |
| 165 | +* [Visual Studio Code](https://code.visualstudio.com) |
| 166 | +* [JSON Viewer](https://jsonviewer.app) |
| 167 | + |
| 168 | +## License |
| 169 | + |
| 170 | +This project is licensed under the GPL3 License. |
| 171 | + |
| 172 | +## Changelog |
| 173 | + |
| 174 | +### 0.1 "Ms. Marvel" |
| 175 | + |
| 176 | +* March 2023 |
| 177 | +* Initial Release |
0 commit comments