mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Update Addon functions and calls
Update function names and calls for Addon class.
This commit is contained in:
parent
213f6ae1a1
commit
11cf36105c
73 changed files with 544 additions and 464 deletions
|
@ -5,7 +5,7 @@
|
|||
* @brief: Get info header of the shema
|
||||
*
|
||||
* This function parses the header of the shemename.php file for inormations like
|
||||
* Author, Description and Overwrites. Most of the code comes from the get_plugin_info()
|
||||
* Author, Description and Overwrites. Most of the code comes from the Addon::getInfo()
|
||||
* function. We use this to get the variables which get overwritten through the shema.
|
||||
* All color variables which get overwritten through the theme have to be
|
||||
* listed (comma seperated) in the shema header under Overwrites:
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
@ -52,24 +53,24 @@ EOT;
|
|||
|
||||
function frio_install()
|
||||
{
|
||||
register_hook('prepare_body_final', 'view/theme/frio/theme.php', 'frio_item_photo_links');
|
||||
register_hook('item_photo_menu', 'view/theme/frio/theme.php', 'frio_item_photo_menu');
|
||||
register_hook('contact_photo_menu', 'view/theme/frio/theme.php', 'frio_contact_photo_menu');
|
||||
register_hook('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
|
||||
register_hook('acl_lookup_end', 'view/theme/frio/theme.php', 'frio_acl_lookup');
|
||||
register_hook('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
|
||||
Addon::registerHook('prepare_body_final', 'view/theme/frio/theme.php', 'frio_item_photo_links');
|
||||
Addon::registerHook('item_photo_menu', 'view/theme/frio/theme.php', 'frio_item_photo_menu');
|
||||
Addon::registerHook('contact_photo_menu', 'view/theme/frio/theme.php', 'frio_contact_photo_menu');
|
||||
Addon::registerHook('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
|
||||
Addon::registerHook('acl_lookup_end', 'view/theme/frio/theme.php', 'frio_acl_lookup');
|
||||
Addon::registerHook('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
|
||||
|
||||
logger("installed theme frio");
|
||||
}
|
||||
|
||||
function frio_uninstall()
|
||||
{
|
||||
unregister_hook('prepare_body_final', 'view/theme/frio/theme.php', 'frio_item_photo_links');
|
||||
unregister_hook('item_photo_menu', 'view/theme/frio/theme.php', 'frio_item_photo_menu');
|
||||
unregister_hook('contact_photo_menu', 'view/theme/frio/theme.php', 'frio_contact_photo_menu');
|
||||
unregister_hook('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
|
||||
unregister_hook('acl_lookup_end', 'view/theme/frio/theme.php', 'frio_acl_lookup');
|
||||
unregister_hook('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
|
||||
Addon::unregisterHook('prepare_body_final', 'view/theme/frio/theme.php', 'frio_item_photo_links');
|
||||
Addon::unregisterHook('item_photo_menu', 'view/theme/frio/theme.php', 'frio_item_photo_menu');
|
||||
Addon::unregisterHook('contact_photo_menu', 'view/theme/frio/theme.php', 'frio_contact_photo_menu');
|
||||
Addon::unregisterHook('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
|
||||
Addon::unregisterHook('acl_lookup_end', 'view/theme/frio/theme.php', 'frio_acl_lookup');
|
||||
Addon::unregisterHook('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
|
||||
|
||||
logger("uninstalled theme frio");
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Object\Image;
|
||||
|
||||
|
@ -35,13 +36,13 @@ function frost_content_loaded(App $a) {
|
|||
}
|
||||
|
||||
function frost_install() {
|
||||
register_hook('prepare_body_final', 'view/theme/frost/theme.php', 'frost_item_photo_links');
|
||||
Addon::registerHook('prepare_body_final', 'view/theme/frost/theme.php', 'frost_item_photo_links');
|
||||
|
||||
logger("installed theme frost");
|
||||
}
|
||||
|
||||
function frost_uninstall() {
|
||||
unregister_hook('bbcode', 'view/theme/frost/theme.php', 'frost_bbcode');
|
||||
Addon::unregisterHook('bbcode', 'view/theme/frost/theme.php', 'frost_bbcode');
|
||||
|
||||
logger("uninstalled theme frost");
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\ForumManager;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
@ -313,64 +314,64 @@ function vier_community_info() {
|
|||
/// @TODO This whole thing is hard-coded, better rewrite to Intercepting Filter Pattern (future-todo)
|
||||
$r = [];
|
||||
|
||||
if (plugin_enabled("appnet")) {
|
||||
if (Addon::isEnabled("appnet")) {
|
||||
$r[] = ["photo" => "images/appnet.png", "name" => "App.net"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("buffer")) {
|
||||
if (Addon::isEnabled("buffer")) {
|
||||
$r[] = ["photo" => "images/buffer.png", "name" => "Buffer"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("blogger")) {
|
||||
if (Addon::isEnabled("blogger")) {
|
||||
$r[] = ["photo" => "images/blogger.png", "name" => "Blogger"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("dwpost")) {
|
||||
if (Addon::isEnabled("dwpost")) {
|
||||
$r[] = ["photo" => "images/dreamwidth.png", "name" => "Dreamwidth"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("fbpost")) {
|
||||
if (Addon::isEnabled("fbpost")) {
|
||||
$r[] = ["photo" => "images/facebook.png", "name" => "Facebook"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("ifttt")) {
|
||||
if (Addon::isEnabled("ifttt")) {
|
||||
$r[] = ["photo" => "addon/ifttt/ifttt.png", "name" => "IFTTT"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("statusnet")) {
|
||||
if (Addon::isEnabled("statusnet")) {
|
||||
$r[] = ["photo" => "images/gnusocial.png", "name" => "GNU Social"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("gpluspost")) {
|
||||
if (Addon::isEnabled("gpluspost")) {
|
||||
$r[] = ["photo" => "images/googleplus.png", "name" => "Google+"];
|
||||
}
|
||||
|
||||
/// @TODO old-lost code (and below)?
|
||||
//if (plugin_enabled("ijpost")) {
|
||||
//if (Addon::isEnabled("ijpost")) {
|
||||
// $r[] = array("photo" => "images/", "name" => "");
|
||||
//}
|
||||
|
||||
if (plugin_enabled("libertree")) {
|
||||
if (Addon::isEnabled("libertree")) {
|
||||
$r[] = ["photo" => "images/libertree.png", "name" => "Libertree"];
|
||||
}
|
||||
|
||||
//if (plugin_enabled("ljpost")) {
|
||||
//if (Addon::isEnabled("ljpost")) {
|
||||
// $r[] = array("photo" => "images/", "name" => "");
|
||||
//}
|
||||
|
||||
if (plugin_enabled("pumpio")) {
|
||||
if (Addon::isEnabled("pumpio")) {
|
||||
$r[] = ["photo" => "images/pumpio.png", "name" => "pump.io"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("tumblr")) {
|
||||
if (Addon::isEnabled("tumblr")) {
|
||||
$r[] = ["photo" => "images/tumblr.png", "name" => "Tumblr"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("twitter")) {
|
||||
if (Addon::isEnabled("twitter")) {
|
||||
$r[] = ["photo" => "images/twitter.png", "name" => "Twitter"];
|
||||
}
|
||||
|
||||
if (plugin_enabled("wppost")) {
|
||||
if (Addon::isEnabled("wppost")) {
|
||||
$r[] = ["photo" => "images/wordpress.png", "name" => "Wordpress"];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue