-require_once 'library/OAuth1.php';
-require_once 'addon/tumblr/tumblroauth/tumblroauth.php';
-
-use Friendica\Core\Addon;
-use Friendica\Core\Config;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
-
-function tumblr_install() {
- Addon::registerHook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
- Addon::registerHook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
- Addon::registerHook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
- Addon::registerHook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
- Addon::registerHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
-
-}
-function tumblr_uninstall() {
- Addon::unregisterHook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
- Addon::unregisterHook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
- Addon::unregisterHook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
- Addon::unregisterHook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
- Addon::unregisterHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'tumblroauth.php';
+
+use Friendica\App;
+use Friendica\Content\Text\BBCode;
+use Friendica\Core\Hook;
+use Friendica\Core\Logger;
+use Friendica\Core\Renderer;
+use Friendica\Database\DBA;
+use Friendica\DI;
+use Friendica\Model\Tag;
+use Friendica\Util\Strings;
+
+function tumblr_install()
+{
+ Hook::register('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
+ Hook::register('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
+ Hook::register('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
+ Hook::register('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
+ Hook::register('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
+ Hook::register('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');