Change plugin to addon
change the use of plugin to addon where appropriate.
This commit is contained in:
parent
3bad83f24e
commit
b86b04a81a
25 changed files with 164 additions and 164 deletions
24
boot.php
24
boot.php
|
@ -798,19 +798,19 @@ function run_update_function($x)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Synchronise plugins:
|
* @brief Synchronise addons:
|
||||||
*
|
*
|
||||||
* $a->config['system']['addon'] contains a comma-separated list of names
|
* $a->config['system']['addon'] contains a comma-separated list of names
|
||||||
* of plugins/addons which are used on this system.
|
* of addons which are used on this system.
|
||||||
* Go through the database list of already installed addons, and if we have
|
* Go through the database list of already installed addons, and if we have
|
||||||
* an entry, but it isn't in the config list, call the uninstall procedure
|
* an entry, but it isn't in the config list, call the uninstall procedure
|
||||||
* and mark it uninstalled in the database (for now we'll remove it).
|
* and mark it uninstalled in the database (for now we'll remove it).
|
||||||
* Then go through the config list and if we have a plugin that isn't installed,
|
* Then go through the config list and if we have a addon that isn't installed,
|
||||||
* call the install procedure and add it to the database.
|
* call the install procedure and add it to the database.
|
||||||
*
|
*
|
||||||
* @param object $a App
|
* @param object $a App
|
||||||
*/
|
*/
|
||||||
function check_plugins(App $a)
|
function check_addons(App $a)
|
||||||
{
|
{
|
||||||
$r = q("SELECT * FROM `addon` WHERE `installed` = 1");
|
$r = q("SELECT * FROM `addon` WHERE `installed` = 1");
|
||||||
if (DBM::is_result($r)) {
|
if (DBM::is_result($r)) {
|
||||||
|
@ -819,20 +819,20 @@ function check_plugins(App $a)
|
||||||
$installed = [];
|
$installed = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$plugins = Config::get('system', 'addon');
|
$addons = Config::get('system', 'addon');
|
||||||
$plugins_arr = [];
|
$addons_arr = [];
|
||||||
|
|
||||||
if ($plugins) {
|
if ($addons) {
|
||||||
$plugins_arr = explode(',', str_replace(' ', '', $plugins));
|
$addons_arr = explode(',', str_replace(' ', '', $addons));
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->plugins = $plugins_arr;
|
$a->addons = $addons_arr;
|
||||||
|
|
||||||
$installed_arr = [];
|
$installed_arr = [];
|
||||||
|
|
||||||
if (count($installed)) {
|
if (count($installed)) {
|
||||||
foreach ($installed as $i) {
|
foreach ($installed as $i) {
|
||||||
if (!in_array($i['name'], $plugins_arr)) {
|
if (!in_array($i['name'], $addons_arr)) {
|
||||||
Addon::uninstall($i['name']);
|
Addon::uninstall($i['name']);
|
||||||
} else {
|
} else {
|
||||||
$installed_arr[] = $i['name'];
|
$installed_arr[] = $i['name'];
|
||||||
|
@ -840,8 +840,8 @@ function check_plugins(App $a)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($plugins_arr)) {
|
if (count($addons_arr)) {
|
||||||
foreach ($plugins_arr as $p) {
|
foreach ($addons_arr as $p) {
|
||||||
if (!in_array($p, $installed_arr)) {
|
if (!in_array($p, $installed_arr)) {
|
||||||
Addon::install($p);
|
Addon::install($p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,9 +213,9 @@ function api_login(App $a)
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A plugin indicates successful login by setting 'authenticated' to non-zero value and returning a user record
|
* An addon indicates successful login by setting 'authenticated' to non-zero value and returning a user record
|
||||||
* Plugins should never set 'authenticated' except to indicate success - as hooks may be chained
|
* Addons should never set 'authenticated' except to indicate success - as hooks may be chained
|
||||||
* and later plugins should not interfere with an earlier one that succeeded.
|
* and later addons should not interfere with an earlier one that succeeded.
|
||||||
*/
|
*/
|
||||||
Addon::callHooks('authenticate', $addon_auth);
|
Addon::callHooks('authenticate', $addon_auth);
|
||||||
|
|
||||||
|
|
|
@ -601,7 +601,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @TODO old-lost code?
|
/// @TODO old-lost code?
|
||||||
// Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin.
|
// Shouldn't happen but we want to make absolutely sure it doesn't leak from an addon.
|
||||||
// Deactivated, since the bbcode parser can handle with it - and it destroys posts with some smileys that contain "<"
|
// Deactivated, since the bbcode parser can handle with it - and it destroys posts with some smileys that contain "<"
|
||||||
//if ((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
|
//if ((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
|
||||||
// $arr['body'] = strip_tags($arr['body']);
|
// $arr['body'] = strip_tags($arr['body']);
|
||||||
|
@ -954,7 +954,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
|
||||||
unset($arr['api_source']);
|
unset($arr['api_source']);
|
||||||
|
|
||||||
if (x($arr, 'cancel')) {
|
if (x($arr, 'cancel')) {
|
||||||
logger('item_store: post cancelled by plugin.');
|
logger('item_store: post cancelled by addon.');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ function pop_lang() {
|
||||||
/**
|
/**
|
||||||
* load string translation table for alternate language
|
* load string translation table for alternate language
|
||||||
*
|
*
|
||||||
* first plugin strings are loaded, then globals
|
* first addon strings are loaded, then globals
|
||||||
*
|
*
|
||||||
* @param string $lang language code to load
|
* @param string $lang language code to load
|
||||||
*/
|
*/
|
||||||
|
@ -102,9 +102,9 @@ function load_translation_table($lang) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$a->strings = [];
|
$a->strings = [];
|
||||||
// load enabled plugins strings
|
// load enabled addons strings
|
||||||
$plugins = dba::select('addon', ['name'], ['installed' => true]);
|
$addons = dba::select('addon', ['name'], ['installed' => true]);
|
||||||
while ($p = dba::fetch($plugins)) {
|
while ($p = dba::fetch($addons)) {
|
||||||
$name = $p['name'];
|
$name = $p['name'];
|
||||||
if (file_exists("addon/$name/lang/$lang/strings.php")) {
|
if (file_exists("addon/$name/lang/$lang/strings.php")) {
|
||||||
include("addon/$name/lang/$lang/strings.php");
|
include("addon/$name/lang/$lang/strings.php");
|
||||||
|
|
|
@ -180,7 +180,7 @@ if (! x($_SESSION, 'last_updated')) {
|
||||||
/*
|
/*
|
||||||
* check_config() is responsible for running update scripts. These automatically
|
* check_config() is responsible for running update scripts. These automatically
|
||||||
* update the DB schema whenever we push a new one out. It also checks to see if
|
* update the DB schema whenever we push a new one out. It also checks to see if
|
||||||
* any plugins have been added or removed and reacts accordingly.
|
* any addons have been added or removed and reacts accordingly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// in install mode, any url loads install module
|
// in install mode, any url loads install module
|
||||||
|
@ -192,7 +192,7 @@ if ($install && $a->module!="view") {
|
||||||
} else {
|
} else {
|
||||||
check_url($a);
|
check_url($a);
|
||||||
check_db(false);
|
check_db(false);
|
||||||
check_plugins($a);
|
check_addons($a);
|
||||||
}
|
}
|
||||||
|
|
||||||
Nav::setSelected('nothing');
|
Nav::setSelected('nothing');
|
||||||
|
@ -228,7 +228,7 @@ if (strlen($a->module)) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We will always have a module name.
|
* We will always have a module name.
|
||||||
* First see if we have a plugin which is masquerading as a module.
|
* First see if we have an addon which is masquerading as a module.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Compatibility with the Android Diaspora client
|
// Compatibility with the Android Diaspora client
|
||||||
|
@ -243,7 +243,7 @@ if (strlen($a->module)) {
|
||||||
|
|
||||||
$privateapps = Config::get('config', 'private_addons');
|
$privateapps = Config::get('config', 'private_addons');
|
||||||
|
|
||||||
if (is_array($a->plugins) && in_array($a->module, $a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) {
|
if (is_array($a->addons) && in_array($a->module, $a->addons) && file_exists("addon/{$a->module}/{$a->module}.php")) {
|
||||||
//Check if module is an app and if public access to apps is allowed or not
|
//Check if module is an app and if public access to apps is allowed or not
|
||||||
if ((!local_user()) && Addon::isApp($a->module) && $privateapps === "1") {
|
if ((!local_user()) && Addon::isApp($a->module) && $privateapps === "1") {
|
||||||
info(t("You must be logged in to use addons. "));
|
info(t("You must be logged in to use addons. "));
|
||||||
|
|
138
mod/admin.php
138
mod/admin.php
|
@ -58,7 +58,7 @@ function admin_post(App $a)
|
||||||
case 'users':
|
case 'users':
|
||||||
admin_page_users_post($a);
|
admin_page_users_post($a);
|
||||||
break;
|
break;
|
||||||
case 'plugins':
|
case 'addons':
|
||||||
if ($a->argc > 2 &&
|
if ($a->argc > 2 &&
|
||||||
is_file("addon/" . $a->argv[2] . "/" . $a->argv[2] . ".php")) {
|
is_file("addon/" . $a->argv[2] . "/" . $a->argv[2] . ".php")) {
|
||||||
@include_once("addon/" . $a->argv[2] . "/" . $a->argv[2] . ".php");
|
@include_once("addon/" . $a->argv[2] . "/" . $a->argv[2] . ".php");
|
||||||
|
@ -67,7 +67,7 @@ function admin_post(App $a)
|
||||||
$func($a);
|
$func($a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$return_path = 'admin/plugins/' . $a->argv[2];
|
$return_path = 'admin/addons/' . $a->argv[2];
|
||||||
break;
|
break;
|
||||||
case 'themes':
|
case 'themes':
|
||||||
if ($a->argc < 2) {
|
if ($a->argc < 2) {
|
||||||
|
@ -172,7 +172,7 @@ function admin_content(App $a)
|
||||||
$aside_sub = [
|
$aside_sub = [
|
||||||
'site' => ["admin/site/" , t("Site") , "site"],
|
'site' => ["admin/site/" , t("Site") , "site"],
|
||||||
'users' => ["admin/users/" , t("Users") , "users"],
|
'users' => ["admin/users/" , t("Users") , "users"],
|
||||||
'plugins' => ["admin/plugins/" , t("Plugins") , "plugins"],
|
'addons' => ["admin/addons/" , t("Addons") , "addons"],
|
||||||
'themes' => ["admin/themes/" , t("Themes") , "themes"],
|
'themes' => ["admin/themes/" , t("Themes") , "themes"],
|
||||||
'features' => ["admin/features/" , t("Additional features") , "features"],
|
'features' => ["admin/features/" , t("Additional features") , "features"],
|
||||||
'dbsync' => ["admin/dbsync/" , t('DB updates') , "dbsync"],
|
'dbsync' => ["admin/dbsync/" , t('DB updates') , "dbsync"],
|
||||||
|
@ -183,15 +183,15 @@ function admin_content(App $a)
|
||||||
'deleteitem' => ["admin/deleteitem/" , t('Delete Item') , 'deleteitem'],
|
'deleteitem' => ["admin/deleteitem/" , t('Delete Item') , 'deleteitem'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/* get plugins admin page */
|
/* get addons admin page */
|
||||||
|
|
||||||
$r = q("SELECT `name` FROM `addon` WHERE `plugin_admin` = 1 ORDER BY `name`");
|
$r = q("SELECT `name` FROM `addon` WHERE `plugin_admin` = 1 ORDER BY `name`");
|
||||||
$aside_tools['plugins_admin'] = [];
|
$aside_tools['addons_admin'] = [];
|
||||||
foreach ($r as $h) {
|
foreach ($r as $h) {
|
||||||
$plugin = $h['name'];
|
$addon = $h['name'];
|
||||||
$aside_tools['plugins_admin'][] = ["admin/plugins/" . $plugin, $plugin, "plugin"];
|
$aside_tools['addons_admin'][] = ["admin/addons/" . $addon, $addon, "addon"];
|
||||||
// temp plugins with admin
|
// temp addons with admin
|
||||||
$a->plugins_admin[] = $plugin;
|
$a->addons_admin[] = $addon;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aside_tools['logs'] = ["admin/logs/", t("Logs"), "logs"];
|
$aside_tools['logs'] = ["admin/logs/", t("Logs"), "logs"];
|
||||||
|
@ -204,7 +204,7 @@ function admin_content(App $a)
|
||||||
'$admin' => $aside_tools,
|
'$admin' => $aside_tools,
|
||||||
'$subpages' => $aside_sub,
|
'$subpages' => $aside_sub,
|
||||||
'$admtxt' => t('Admin'),
|
'$admtxt' => t('Admin'),
|
||||||
'$plugadmtxt' => t('Plugin Features'),
|
'$plugadmtxt' => t('Addon Features'),
|
||||||
'$logtxt' => t('Logs'),
|
'$logtxt' => t('Logs'),
|
||||||
'$diagnosticstxt' => t('diagnostics'),
|
'$diagnosticstxt' => t('diagnostics'),
|
||||||
'$h_pending' => t('User registrations waiting for confirmation'),
|
'$h_pending' => t('User registrations waiting for confirmation'),
|
||||||
|
@ -222,8 +222,8 @@ function admin_content(App $a)
|
||||||
case 'users':
|
case 'users':
|
||||||
$o = admin_page_users($a);
|
$o = admin_page_users($a);
|
||||||
break;
|
break;
|
||||||
case 'plugins':
|
case 'addons':
|
||||||
$o = admin_page_plugins($a);
|
$o = admin_page_addons($a);
|
||||||
break;
|
break;
|
||||||
case 'themes':
|
case 'themes':
|
||||||
$o = admin_page_themes($a);
|
$o = admin_page_themes($a);
|
||||||
|
@ -781,7 +781,7 @@ function admin_page_summary(App $a)
|
||||||
'$platform' => FRIENDICA_PLATFORM,
|
'$platform' => FRIENDICA_PLATFORM,
|
||||||
'$codename' => FRIENDICA_CODENAME,
|
'$codename' => FRIENDICA_CODENAME,
|
||||||
'$build' => Config::get('system', 'build'),
|
'$build' => Config::get('system', 'build'),
|
||||||
'$plugins' => [t('Active plugins'), $a->plugins],
|
'$addons' => [t('Active addons'), $a->addons],
|
||||||
'$showwarning' => $showwarning,
|
'$showwarning' => $showwarning,
|
||||||
'$warningtext' => $warningtext
|
'$warningtext' => $warningtext
|
||||||
]);
|
]);
|
||||||
|
@ -1725,54 +1725,54 @@ function admin_page_users(App $a)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Plugins admin page
|
* @brief Addons admin page
|
||||||
*
|
*
|
||||||
* This function generates the admin panel page for managing plugins on the
|
* This function generates the admin panel page for managing addons on the
|
||||||
* friendica node. If a plugin name is given a single page showing the details
|
* friendica node. If an addon name is given a single page showing the details
|
||||||
* for this addon is generated. If no name is given, a list of available
|
* for this addon is generated. If no name is given, a list of available
|
||||||
* plugins is shown.
|
* addons is shown.
|
||||||
*
|
*
|
||||||
* The template used for displaying the list of plugins and the details of the
|
* The template used for displaying the list of addons and the details of the
|
||||||
* plugin are the same as used for the templates.
|
* addon are the same as used for the templates.
|
||||||
*
|
*
|
||||||
* The returned string returned hulds the HTML code of the page.
|
* The returned string returned hulds the HTML code of the page.
|
||||||
*
|
*
|
||||||
* @param App $a
|
* @param App $a
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function admin_page_plugins(App $a)
|
function admin_page_addons(App $a)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Single plugin
|
* Single addon
|
||||||
*/
|
*/
|
||||||
if ($a->argc == 3) {
|
if ($a->argc == 3) {
|
||||||
$plugin = $a->argv[2];
|
$addon = $a->argv[2];
|
||||||
if (!is_file("addon/$plugin/$plugin.php")) {
|
if (!is_file("addon/$addon/$addon.php")) {
|
||||||
notice(t("Item not found."));
|
notice(t("Item not found."));
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x($_GET, "a") && $_GET['a'] == "t") {
|
if (x($_GET, "a") && $_GET['a'] == "t") {
|
||||||
check_form_security_token_redirectOnErr('/admin/plugins', 'admin_themes', 't');
|
check_form_security_token_redirectOnErr('/admin/addons', 'admin_themes', 't');
|
||||||
|
|
||||||
// Toggle plugin status
|
// Toggle addon status
|
||||||
$idx = array_search($plugin, $a->plugins);
|
$idx = array_search($addon, $a->addons);
|
||||||
if ($idx !== false) {
|
if ($idx !== false) {
|
||||||
unset($a->plugins[$idx]);
|
unset($a->addons[$idx]);
|
||||||
Addon::uninstall($plugin);
|
Addon::uninstall($addon);
|
||||||
info(t("Plugin %s disabled.", $plugin));
|
info(t("Addon %s disabled.", $addon));
|
||||||
} else {
|
} else {
|
||||||
$a->plugins[] = $plugin;
|
$a->addons[] = $addon;
|
||||||
Addon::install($plugin);
|
Addon::install($addon);
|
||||||
info(t("Plugin %s enabled.", $plugin));
|
info(t("Addon %s enabled.", $addon));
|
||||||
}
|
}
|
||||||
Config::set("system", "addon", implode(", ", $a->plugins));
|
Config::set("system", "addon", implode(", ", $a->addons));
|
||||||
goaway('admin/plugins');
|
goaway('admin/addons');
|
||||||
return ''; // NOTREACHED
|
return ''; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
// display plugin details
|
// display addon details
|
||||||
if (in_array($plugin, $a->plugins)) {
|
if (in_array($addon, $a->addons)) {
|
||||||
$status = "on";
|
$status = "on";
|
||||||
$action = t("Disable");
|
$action = t("Disable");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1781,16 +1781,16 @@ function admin_page_plugins(App $a)
|
||||||
}
|
}
|
||||||
|
|
||||||
$readme = Null;
|
$readme = Null;
|
||||||
if (is_file("addon/$plugin/README.md")) {
|
if (is_file("addon/$addon/README.md")) {
|
||||||
$readme = Markdown::convert(file_get_contents("addon/$plugin/README.md"), false);
|
$readme = Markdown::convert(file_get_contents("addon/$addon/README.md"), false);
|
||||||
} elseif (is_file("addon/$plugin/README")) {
|
} elseif (is_file("addon/$addon/README")) {
|
||||||
$readme = "<pre>" . file_get_contents("addon/$plugin/README") . "</pre>";
|
$readme = "<pre>" . file_get_contents("addon/$addon/README") . "</pre>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$admin_form = "";
|
$admin_form = "";
|
||||||
if (in_array($plugin, $a->plugins_admin)) {
|
if (in_array($addon, $a->addons_admin)) {
|
||||||
@require_once("addon/$plugin/$plugin.php");
|
@require_once("addon/$addon/$addon.php");
|
||||||
$func = $plugin . '_plugin_admin';
|
$func = $addon . '_plugin_admin';
|
||||||
$func($a, $admin_form);
|
$func($a, $admin_form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1798,20 +1798,20 @@ function admin_page_plugins(App $a)
|
||||||
|
|
||||||
return replace_macros($t, [
|
return replace_macros($t, [
|
||||||
'$title' => t('Administration'),
|
'$title' => t('Administration'),
|
||||||
'$page' => t('Plugins'),
|
'$page' => t('Addons'),
|
||||||
'$toggle' => t('Toggle'),
|
'$toggle' => t('Toggle'),
|
||||||
'$settings' => t('Settings'),
|
'$settings' => t('Settings'),
|
||||||
'$baseurl' => System::baseUrl(true),
|
'$baseurl' => System::baseUrl(true),
|
||||||
|
|
||||||
'$plugin' => $plugin,
|
'$addon' => $addon,
|
||||||
'$status' => $status,
|
'$status' => $status,
|
||||||
'$action' => $action,
|
'$action' => $action,
|
||||||
'$info' => Addon::getInfo($plugin),
|
'$info' => Addon::getInfo($addon),
|
||||||
'$str_author' => t('Author: '),
|
'$str_author' => t('Author: '),
|
||||||
'$str_maintainer' => t('Maintainer: '),
|
'$str_maintainer' => t('Maintainer: '),
|
||||||
|
|
||||||
'$admin_form' => $admin_form,
|
'$admin_form' => $admin_form,
|
||||||
'$function' => 'plugins',
|
'$function' => 'addons',
|
||||||
'$screenshot' => '',
|
'$screenshot' => '',
|
||||||
'$readme' => $readme,
|
'$readme' => $readme,
|
||||||
|
|
||||||
|
@ -1820,36 +1820,36 @@ function admin_page_plugins(App $a)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List plugins
|
* List addons
|
||||||
*/
|
*/
|
||||||
if (x($_GET, "a") && $_GET['a'] == "r") {
|
if (x($_GET, "a") && $_GET['a'] == "r") {
|
||||||
check_form_security_token_redirectOnErr(System::baseUrl() . '/admin/plugins', 'admin_themes', 't');
|
check_form_security_token_redirectOnErr(System::baseUrl() . '/admin/addons', 'admin_themes', 't');
|
||||||
Addon::reload();
|
Addon::reload();
|
||||||
info("Plugins reloaded");
|
info("Addons reloaded");
|
||||||
goaway(System::baseUrl() . '/admin/plugins');
|
goaway(System::baseUrl() . '/admin/addons');
|
||||||
}
|
}
|
||||||
|
|
||||||
$plugins = [];
|
$addons = [];
|
||||||
$files = glob("addon/*/");
|
$files = glob("addon/*/");
|
||||||
if (is_array($files)) {
|
if (is_array($files)) {
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (is_dir($file)) {
|
if (is_dir($file)) {
|
||||||
list($tmp, $id) = array_map("trim", explode("/", $file));
|
list($tmp, $id) = array_map("trim", explode("/", $file));
|
||||||
$info = Addon::getInfo($id);
|
$info = Addon::getInfo($id);
|
||||||
$show_plugin = true;
|
$show_addon = true;
|
||||||
|
|
||||||
// If the addon is unsupported, then only show it, when it is enabled
|
// If the addon is unsupported, then only show it, when it is enabled
|
||||||
if ((strtolower($info["status"]) == "unsupported") && !in_array($id, $a->plugins)) {
|
if ((strtolower($info["status"]) == "unsupported") && !in_array($id, $a->addons)) {
|
||||||
$show_plugin = false;
|
$show_addon = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override the above szenario, when the admin really wants to see outdated stuff
|
// Override the above szenario, when the admin really wants to see outdated stuff
|
||||||
if (Config::get("system", "show_unsupported_addons")) {
|
if (Config::get("system", "show_unsupported_addons")) {
|
||||||
$show_plugin = true;
|
$show_addon = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($show_plugin) {
|
if ($show_addon) {
|
||||||
$plugins[] = [$id, (in_array($id, $a->plugins) ? "on" : "off"), $info];
|
$addons[] = [$id, (in_array($id, $a->addons) ? "on" : "off"), $info];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1858,14 +1858,14 @@ function admin_page_plugins(App $a)
|
||||||
$t = get_markup_template('admin/plugins.tpl');
|
$t = get_markup_template('admin/plugins.tpl');
|
||||||
return replace_macros($t, [
|
return replace_macros($t, [
|
||||||
'$title' => t('Administration'),
|
'$title' => t('Administration'),
|
||||||
'$page' => t('Plugins'),
|
'$page' => t('Addons'),
|
||||||
'$submit' => t('Save Settings'),
|
'$submit' => t('Save Settings'),
|
||||||
'$reload' => t('Reload active plugins'),
|
'$reload' => t('Reload active addons'),
|
||||||
'$baseurl' => System::baseUrl(true),
|
'$baseurl' => System::baseUrl(true),
|
||||||
'$function' => 'plugins',
|
'$function' => 'addons',
|
||||||
'$plugins' => $plugins,
|
'$addons' => $addons,
|
||||||
'$pcount' => count($plugins),
|
'$pcount' => count($addons),
|
||||||
'$noplugshint' => t('There are currently no plugins available on your node. You can find the official plugin repository at %1$s and might find other interesting plugins in the open plugin registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
|
'$noplugshint' => t('There are currently no addons available on your node. You can find the official addon repository at %1$s and might find other interesting addons in the open addon registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
|
||||||
'$form_security_token' => get_form_security_token("admin_themes"),
|
'$form_security_token' => get_form_security_token("admin_themes"),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -1940,7 +1940,7 @@ function rebuild_theme_table($themes)
|
||||||
* themes is generated.
|
* themes is generated.
|
||||||
*
|
*
|
||||||
* The template used for displaying the list of themes and the details of the
|
* The template used for displaying the list of themes and the details of the
|
||||||
* themes are the same as used for the plugins.
|
* themes are the same as used for the addons.
|
||||||
*
|
*
|
||||||
* The returned string contains the HTML code of the admin panel page.
|
* The returned string contains the HTML code of the admin panel page.
|
||||||
*
|
*
|
||||||
|
@ -2071,7 +2071,7 @@ function admin_page_themes(App $a)
|
||||||
'$toggle' => t('Toggle'),
|
'$toggle' => t('Toggle'),
|
||||||
'$settings' => t('Settings'),
|
'$settings' => t('Settings'),
|
||||||
'$baseurl' => System::baseUrl(true),
|
'$baseurl' => System::baseUrl(true),
|
||||||
'$plugin' => $theme,
|
'$addon' => $theme,
|
||||||
'$status' => $status,
|
'$status' => $status,
|
||||||
'$action' => $action,
|
'$action' => $action,
|
||||||
'$info' => Theme::getInfo($theme),
|
'$info' => Theme::getInfo($theme),
|
||||||
|
@ -2103,9 +2103,9 @@ function admin_page_themes(App $a)
|
||||||
* List themes
|
* List themes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$plugins = [];
|
$addons = [];
|
||||||
foreach ($themes as $th) {
|
foreach ($themes as $th) {
|
||||||
$plugins[] = [$th['name'], (($th['allowed']) ? "on" : "off"), Theme::getInfo($th['name'])];
|
$addons[] = [$th['name'], (($th['allowed']) ? "on" : "off"), Theme::getInfo($th['name'])];
|
||||||
}
|
}
|
||||||
|
|
||||||
$t = get_markup_template('admin/plugins.tpl');
|
$t = get_markup_template('admin/plugins.tpl');
|
||||||
|
@ -2116,7 +2116,7 @@ function admin_page_themes(App $a)
|
||||||
'$reload' => t('Reload active themes'),
|
'$reload' => t('Reload active themes'),
|
||||||
'$baseurl' => System::baseUrl(true),
|
'$baseurl' => System::baseUrl(true),
|
||||||
'$function' => 'themes',
|
'$function' => 'themes',
|
||||||
'$plugins' => $plugins,
|
'$addons' => $addons,
|
||||||
'$pcount' => count($themes),
|
'$pcount' => count($themes),
|
||||||
'$noplugshint' => t('No themes found on the system. They should be placed in %1$s', '<code>/view/themes</code>'),
|
'$noplugshint' => t('No themes found on the system. They should be placed in %1$s', '<code>/view/themes</code>'),
|
||||||
'$experimental' => t('[Experimental]'),
|
'$experimental' => t('[Experimental]'),
|
||||||
|
|
|
@ -26,12 +26,12 @@ function friendica_init(App $a) {
|
||||||
$admin = false;
|
$admin = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$visible_plugins = [];
|
$visible_addons = [];
|
||||||
if (is_array($a->plugins) && count($a->plugins)) {
|
if (is_array($a->addons) && count($a->addons)) {
|
||||||
$r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
|
$r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
|
||||||
if (DBM::is_result($r)) {
|
if (DBM::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$visible_plugins[] = $rr['name'];
|
$visible_addons[] = $rr['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ function friendica_init(App $a) {
|
||||||
$data = [
|
$data = [
|
||||||
'version' => FRIENDICA_VERSION,
|
'version' => FRIENDICA_VERSION,
|
||||||
'url' => System::baseUrl(),
|
'url' => System::baseUrl(),
|
||||||
'plugins' => $visible_plugins,
|
'addons' => $visible_addons,
|
||||||
'locked_features' => $locked_features,
|
'locked_features' => $locked_features,
|
||||||
'register_policy' => $register_policy[$a->config['register_policy']],
|
'register_policy' => $register_policy[$a->config['register_policy']],
|
||||||
'admin' => $admin,
|
'admin' => $admin,
|
||||||
|
@ -84,19 +84,19 @@ function friendica_content(App $a) {
|
||||||
$o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com');
|
$o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com');
|
||||||
$o .= '</p>' . PHP_EOL;
|
$o .= '</p>' . PHP_EOL;
|
||||||
|
|
||||||
$visible_plugins = [];
|
$visible_addons = [];
|
||||||
if (is_array($a->plugins) && count($a->plugins)) {
|
if (is_array($a->addons) && count($a->addons)) {
|
||||||
$r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
|
$r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
|
||||||
if (DBM::is_result($r)) {
|
if (DBM::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$visible_plugins[] = $rr['name'];
|
$visible_addons[] = $rr['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($visible_plugins)) {
|
if (count($visible_addons)) {
|
||||||
$o .= '<p>' . t('Installed plugins/addons/apps:') . '</p>' . PHP_EOL;
|
$o .= '<p>' . t('Installed addons/addons/apps:') . '</p>' . PHP_EOL;
|
||||||
$sorted = $visible_plugins;
|
$sorted = $visible_addons;
|
||||||
$s = '';
|
$s = '';
|
||||||
sort($sorted);
|
sort($sorted);
|
||||||
foreach ($sorted as $p) {
|
foreach ($sorted as $p) {
|
||||||
|
@ -109,7 +109,7 @@ function friendica_content(App $a) {
|
||||||
}
|
}
|
||||||
$o .= '<div style="margin-left: 25px; margin-right: 25px;">' . $s . '</div>' . PHP_EOL;
|
$o .= '<div style="margin-left: 25px; margin-right: 25px;">' . $s . '</div>' . PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
$o .= '<p>' . t('No installed plugins/addons/apps') . '</p>' . PHP_EOL;
|
$o .= '<p>' . t('No installed addons/addons/apps') . '</p>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$blocklist = Config::get('system', 'blocklist');
|
$blocklist = Config::get('system', 'blocklist');
|
||||||
|
|
|
@ -731,7 +731,7 @@ function item_post(App $a) {
|
||||||
$datarray['object'] = $object;
|
$datarray['object'] = $object;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These fields are for the convenience of plugins...
|
* These fields are for the convenience of addons...
|
||||||
* 'self' if true indicates the owner is posting on their own wall
|
* 'self' if true indicates the owner is posting on their own wall
|
||||||
* If parent is 0 it is a top-level post.
|
* If parent is 0 it is a top-level post.
|
||||||
*/
|
*/
|
||||||
|
@ -776,7 +776,7 @@ function item_post(App $a) {
|
||||||
Addon::callHooks('post_local',$datarray);
|
Addon::callHooks('post_local',$datarray);
|
||||||
|
|
||||||
if (x($datarray, 'cancel')) {
|
if (x($datarray, 'cancel')) {
|
||||||
logger('mod_item: post cancelled by plugin.');
|
logger('mod_item: post cancelled by addon.');
|
||||||
if ($return_path) {
|
if ($return_path) {
|
||||||
goaway($return_path);
|
goaway($return_path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,22 +152,22 @@ function nodeinfo_cron() {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
// If the plugin 'statistics_json' is enabled then disable it and actrivate nodeinfo.
|
// If the addon 'statistics_json' is enabled then disable it and actrivate nodeinfo.
|
||||||
if (Addon::isEnabled('statistics_json')) {
|
if (Addon::isEnabled('statistics_json')) {
|
||||||
Config::set('system', 'nodeinfo', true);
|
Config::set('system', 'nodeinfo', true);
|
||||||
|
|
||||||
$plugin = 'statistics_json';
|
$addon = 'statistics_json';
|
||||||
$plugins = Config::get('system', 'addon');
|
$addons = Config::get('system', 'addon');
|
||||||
$plugins_arr = [];
|
$addons_arr = [];
|
||||||
|
|
||||||
if ($plugins) {
|
if ($addons) {
|
||||||
$plugins_arr = explode(',',str_replace(' ', '',$plugins));
|
$addons_arr = explode(',',str_replace(' ', '',$addons));
|
||||||
|
|
||||||
$idx = array_search($plugin, $plugins_arr);
|
$idx = array_search($addon, $addons_arr);
|
||||||
if ($idx !== false) {
|
if ($idx !== false) {
|
||||||
unset($plugins_arr[$idx]);
|
unset($addons_arr[$idx]);
|
||||||
Addon::uninstall($plugin);
|
Addon::uninstall($addon);
|
||||||
Config::set('system', 'addon', implode(', ',$plugins_arr));
|
Config::set('system', 'addon', implode(', ',$addons_arr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* If the required arguments aren't present, we'll display a simple form to choose a recipient and a verb.
|
* If the required arguments aren't present, we'll display a simple form to choose a recipient and a verb.
|
||||||
* parent is a special argument which let's you attach this activity as a comment to an existing conversation, which
|
* parent is a special argument which let's you attach this activity as a comment to an existing conversation, which
|
||||||
* may have started with somebody else poking (etc.) somebody, but this isn't necessary. This can be used in the more pokes
|
* may have started with somebody else poking (etc.) somebody, but this isn't necessary. This can be used in the more pokes
|
||||||
* plugin version to have entire conversations where Alice poked Bob, Bob fingered Alice, Alice hugged Bob, etc.
|
* addon version to have entire conversations where Alice poked Bob, Bob fingered Alice, Alice hugged Bob, etc.
|
||||||
*
|
*
|
||||||
* private creates a private conversation with the recipient. Otherwise your profile's default post privacy is used.
|
* private creates a private conversation with the recipient. Otherwise your profile's default post privacy is used.
|
||||||
*
|
*
|
||||||
|
|
|
@ -77,7 +77,7 @@ function settings_init(App $a)
|
||||||
];
|
];
|
||||||
|
|
||||||
$tabs[] = [
|
$tabs[] = [
|
||||||
'label' => t('Plugins'),
|
'label' => t('Addons'),
|
||||||
'url' => 'settings/addon',
|
'url' => 'settings/addon',
|
||||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
|
'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
|
||||||
'accesskey' => 'l',
|
'accesskey' => 'l',
|
||||||
|
@ -751,7 +751,7 @@ function settings_content(App $a)
|
||||||
|
|
||||||
$r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' ");
|
$r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' ");
|
||||||
if (!DBM::is_result($r)) {
|
if (!DBM::is_result($r)) {
|
||||||
$settings_addons = t('No Plugin settings configured');
|
$settings_addons = t('No Addon settings configured');
|
||||||
}
|
}
|
||||||
|
|
||||||
Addon::callHooks('plugin_settings', $settings_addons);
|
Addon::callHooks('plugin_settings', $settings_addons);
|
||||||
|
@ -760,7 +760,7 @@ function settings_content(App $a)
|
||||||
$tpl = get_markup_template('settings/addons.tpl');
|
$tpl = get_markup_template('settings/addons.tpl');
|
||||||
$o .= replace_macros($tpl, [
|
$o .= replace_macros($tpl, [
|
||||||
'$form_security_token' => get_form_security_token("settings_addon"),
|
'$form_security_token' => get_form_security_token("settings_addon"),
|
||||||
'$title' => t('Plugin Settings'),
|
'$title' => t('Addon Settings'),
|
||||||
'$settings_addons' => $settings_addons
|
'$settings_addons' => $settings_addons
|
||||||
]);
|
]);
|
||||||
return $o;
|
return $o;
|
||||||
|
|
|
@ -56,8 +56,8 @@ class App
|
||||||
public $hooks;
|
public $hooks;
|
||||||
public $timezone;
|
public $timezone;
|
||||||
public $interactive = true;
|
public $interactive = true;
|
||||||
public $plugins;
|
public $addons;
|
||||||
public $plugins_admin = [];
|
public $addons_admin = [];
|
||||||
public $apps = [];
|
public $apps = [];
|
||||||
public $identities;
|
public $identities;
|
||||||
public $is_mobile = false;
|
public $is_mobile = false;
|
||||||
|
|
|
@ -969,7 +969,7 @@ class GContact
|
||||||
/**
|
/**
|
||||||
* @brief Fetches users of given GNU Social server
|
* @brief Fetches users of given GNU Social server
|
||||||
*
|
*
|
||||||
* If the "Statistics" plugin is enabled (See http://gstools.org/ for details) we query user data with this.
|
* If the "Statistics" addon is enabled (See http://gstools.org/ for details) we query user data with this.
|
||||||
*
|
*
|
||||||
* @param string $server Server address
|
* @param string $server Server address
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
@ -390,7 +390,7 @@ class User
|
||||||
$photo = avatar_img($email);
|
$photo = avatar_img($email);
|
||||||
}
|
}
|
||||||
|
|
||||||
// unless there is no avatar-plugin loaded
|
// unless there is no avatar-addon loaded
|
||||||
if (strlen($photo)) {
|
if (strlen($photo)) {
|
||||||
$photo_failure = false;
|
$photo_failure = false;
|
||||||
|
|
||||||
|
|
|
@ -89,9 +89,9 @@ class Login extends BaseModule
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A plugin indicates successful login by setting 'authenticated' to non-zero value and returning a user record
|
* An addon indicates successful login by setting 'authenticated' to non-zero value and returning a user record
|
||||||
* Plugins should never set 'authenticated' except to indicate success - as hooks may be chained
|
* Addons should never set 'authenticated' except to indicate success - as hooks may be chained
|
||||||
* and later plugins should not interfere with an earlier one that succeeded.
|
* and later addons should not interfere with an earlier one that succeeded.
|
||||||
*/
|
*/
|
||||||
Addon::callHooks('authenticate', $addon_auth);
|
Addon::callHooks('authenticate', $addon_auth);
|
||||||
|
|
||||||
|
|
|
@ -759,10 +759,10 @@ class Post extends BaseObject
|
||||||
$qc = $qcomment = null;
|
$qc = $qcomment = null;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hmmm, code depending on the presence of a particular plugin?
|
* Hmmm, code depending on the presence of a particular addon?
|
||||||
* This should be better if done by a hook
|
* This should be better if done by a hook
|
||||||
*/
|
*/
|
||||||
if (in_array('qcomment', $a->plugins)) {
|
if (in_array('qcomment', $a->addons)) {
|
||||||
$qc = ((local_user()) ? PConfig::get(local_user(), 'qcomment', 'words') : null);
|
$qc = ((local_user()) ? PConfig::get(local_user(), 'qcomment', 'words') : null);
|
||||||
$qcomment = (($qc) ? explode("\n", $qc) : null);
|
$qcomment = (($qc) ? explode("\n", $qc) : null);
|
||||||
}
|
}
|
||||||
|
|
16
update.php
16
update.php
|
@ -85,21 +85,21 @@ function update_1191() {
|
||||||
Config::set('system', 'maintenance', 1);
|
Config::set('system', 'maintenance', 1);
|
||||||
|
|
||||||
if (Addon::isEnabled('forumlist')) {
|
if (Addon::isEnabled('forumlist')) {
|
||||||
$plugin = 'forumlist';
|
$addon = 'forumlist';
|
||||||
$plugins = Config::get('system','addon');
|
$addons = Config::get('system', 'addon');
|
||||||
$plugins_arr = [];
|
$addons_arr = [];
|
||||||
|
|
||||||
if ($plugins) {
|
if ($addons) {
|
||||||
$plugins_arr = explode(",",str_replace(" ", "",$plugins));
|
$addons_arr = explode(",",str_replace(" ", "", $addons));
|
||||||
|
|
||||||
$idx = array_search($plugin, $plugins_arr);
|
$idx = array_search($addon, $addons_arr);
|
||||||
if ($idx !== false){
|
if ($idx !== false){
|
||||||
unset($plugins_arr[$idx]);
|
unset($addons_arr[$idx]);
|
||||||
//delete forumlist manually from addon and hook table
|
//delete forumlist manually from addon and hook table
|
||||||
// since Addon::uninstall() don't work here
|
// since Addon::uninstall() don't work here
|
||||||
q("DELETE FROM `addon` WHERE `name` = 'forumlist' ");
|
q("DELETE FROM `addon` WHERE `name` = 'forumlist' ");
|
||||||
q("DELETE FROM `hook` WHERE `file` = 'addon/forumlist/forumlist.php' ");
|
q("DELETE FROM `hook` WHERE `file` = 'addon/forumlist/forumlist.php' ");
|
||||||
Config::set('system','addon', implode(", ",$plugins_arr));
|
Config::set('system','addon', implode(", ", $addons_arr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,12 +386,12 @@ $a->strings["Contacts who are not members of a group"] = "";
|
||||||
$a->strings["Theme settings updated."] = "";
|
$a->strings["Theme settings updated."] = "";
|
||||||
$a->strings["Site"] = "";
|
$a->strings["Site"] = "";
|
||||||
$a->strings["Users"] = "";
|
$a->strings["Users"] = "";
|
||||||
$a->strings["Plugins"] = "";
|
$a->strings["Addons"] = "";
|
||||||
$a->strings["Themes"] = "";
|
$a->strings["Themes"] = "";
|
||||||
$a->strings["DB updates"] = "";
|
$a->strings["DB updates"] = "";
|
||||||
$a->strings["Logs"] = "";
|
$a->strings["Logs"] = "";
|
||||||
$a->strings["Admin"] = "";
|
$a->strings["Admin"] = "";
|
||||||
$a->strings["Plugin Features"] = "";
|
$a->strings["Addon Features"] = "";
|
||||||
$a->strings["User registrations waiting for confirmation"] = "";
|
$a->strings["User registrations waiting for confirmation"] = "";
|
||||||
$a->strings["Normal Account"] = "";
|
$a->strings["Normal Account"] = "";
|
||||||
$a->strings["Soapbox Account"] = "";
|
$a->strings["Soapbox Account"] = "";
|
||||||
|
@ -405,7 +405,7 @@ $a->strings["Summary"] = "";
|
||||||
$a->strings["Registered users"] = "";
|
$a->strings["Registered users"] = "";
|
||||||
$a->strings["Pending registrations"] = "";
|
$a->strings["Pending registrations"] = "";
|
||||||
$a->strings["Version"] = "";
|
$a->strings["Version"] = "";
|
||||||
$a->strings["Active plugins"] = "";
|
$a->strings["Active addons"] = "";
|
||||||
$a->strings["Can not parse base url. Must have at least <scheme>://<domain>"] = "";
|
$a->strings["Can not parse base url. Must have at least <scheme>://<domain>"] = "";
|
||||||
$a->strings["Site settings updated."] = "";
|
$a->strings["Site settings updated."] = "";
|
||||||
$a->strings["No special theme for mobile devices"] = "";
|
$a->strings["No special theme for mobile devices"] = "";
|
||||||
|
@ -579,8 +579,8 @@ $a->strings["Name of the new user."] = "";
|
||||||
$a->strings["Nickname"] = "";
|
$a->strings["Nickname"] = "";
|
||||||
$a->strings["Nickname of the new user."] = "";
|
$a->strings["Nickname of the new user."] = "";
|
||||||
$a->strings["Email address of the new user."] = "";
|
$a->strings["Email address of the new user."] = "";
|
||||||
$a->strings["Plugin %s disabled."] = "";
|
$a->strings["Addon %s disabled."] = "";
|
||||||
$a->strings["Plugin %s enabled."] = "";
|
$a->strings["Addon %s enabled."] = "";
|
||||||
$a->strings["Disable"] = "";
|
$a->strings["Disable"] = "";
|
||||||
$a->strings["Enable"] = "";
|
$a->strings["Enable"] = "";
|
||||||
$a->strings["Toggle"] = "";
|
$a->strings["Toggle"] = "";
|
||||||
|
@ -812,8 +812,8 @@ $a->strings["Connected Apps"] = "";
|
||||||
$a->strings["Client key starts with"] = "";
|
$a->strings["Client key starts with"] = "";
|
||||||
$a->strings["No name"] = "";
|
$a->strings["No name"] = "";
|
||||||
$a->strings["Remove authorization"] = "";
|
$a->strings["Remove authorization"] = "";
|
||||||
$a->strings["No Plugin settings configured"] = "";
|
$a->strings["No Addon settings configured"] = "";
|
||||||
$a->strings["Plugin Settings"] = "";
|
$a->strings["Addon Settings"] = "";
|
||||||
$a->strings["Off"] = "";
|
$a->strings["Off"] = "";
|
||||||
$a->strings["On"] = "";
|
$a->strings["On"] = "";
|
||||||
$a->strings["Additional Features"] = "";
|
$a->strings["Additional Features"] = "";
|
||||||
|
@ -1128,8 +1128,8 @@ $a->strings["running at web location"] = "";
|
||||||
$a->strings["Please visit <a href=\"http://friendica.com\">Friendica.com</a> to learn more about the Friendica project."] = "";
|
$a->strings["Please visit <a href=\"http://friendica.com\">Friendica.com</a> to learn more about the Friendica project."] = "";
|
||||||
$a->strings["Bug reports and issues: please visit"] = "";
|
$a->strings["Bug reports and issues: please visit"] = "";
|
||||||
$a->strings["Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - dot com"] = "";
|
$a->strings["Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - dot com"] = "";
|
||||||
$a->strings["Installed plugins/addons/apps:"] = "";
|
$a->strings["Installed addons/addons/apps:"] = "";
|
||||||
$a->strings["No installed plugins/addons/apps"] = "";
|
$a->strings["No installed addons/addons/apps"] = "";
|
||||||
$a->strings["Authorize application connection"] = "";
|
$a->strings["Authorize application connection"] = "";
|
||||||
$a->strings["Return to your app and insert this Securty Code:"] = "";
|
$a->strings["Return to your app and insert this Securty Code:"] = "";
|
||||||
$a->strings["Please login to continue."] = "";
|
$a->strings["Please login to continue."] = "";
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
{{if $admin.plugins_admin}}<h4>{{$plugadmtxt}}</h4>{{/if}}
|
{{if $admin.addons_admin}}<h4>{{$plugadmtxt}}</h4>{{/if}}
|
||||||
<ul class='admin linklist'>
|
<ul class='admin linklist'>
|
||||||
{{foreach $admin.plugins_admin as $l}}
|
{{foreach $admin.addons_admin as $l}}
|
||||||
<li class='admin link button {{$l.2}}'><a href='{{$l.0}}'>{{$l.1}}</a></li>
|
<li class='admin link button {{$l.2}}'><a href='{{$l.0}}'>{{$l.1}}</a></li>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="btn" href="{{$baseurl}}/admin/{{$function}}?a=r&t={{$form_security_token}}">{{$reload}}</a>
|
<a class="btn" href="{{$baseurl}}/admin/{{$function}}?a=r&t={{$form_security_token}}">{{$reload}}</a>
|
||||||
<ul id='pluginslist'>
|
<ul id='pluginslist'>
|
||||||
{{foreach $plugins as $p}}
|
{{foreach $addons as $p}}
|
||||||
<li class='plugin {{$p.1}}'>
|
<li class='plugin {{$p.1}}'>
|
||||||
<a class='toggleplugin' href='{{$baseurl}}/admin/{{$function}}/{{$p.0}}?a=t&t={{$form_security_token}}' title="{{if $p.1==on}}Disable{{else}}Enable{{/if}}" ><span class='icon {{$p.1}}'></span></a>
|
<a class='toggleplugin' href='{{$baseurl}}/admin/{{$function}}/{{$p.0}}?a=t&t={{$form_security_token}}' title="{{if $p.1==on}}Disable{{else}}Enable{{/if}}" ><span class='icon {{$p.1}}'></span></a>
|
||||||
<a href='{{$baseurl}}/admin/{{$function}}/{{$p.0}}'><span class='name'>{{$p.2.name}}</span></a> - <span class="version">{{$p.2.version}}</span>
|
<a href='{{$baseurl}}/admin/{{$function}}/{{$p.0}}'><span class='name'>{{$p.2.name}}</span></a> - <span class="version">{{$p.2.version}}</span>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div id='adminpage'>
|
<div id='adminpage'>
|
||||||
<h1>{{$title}} - {{$page}}</h1>
|
<h1>{{$title}} - {{$page}}</h1>
|
||||||
|
|
||||||
<p><span class='toggleplugin icon {{$status}}'></span> {{$info.name}} - {{$info.version}} : <a href="{{$baseurl}}/admin/{{$function}}/{{$plugin}}/?a=t&t={{$form_security_token}}">{{$action}}</a></p>
|
<p><span class='toggleplugin icon {{$status}}'></span> {{$info.name}} - {{$info.version}} : <a href="{{$baseurl}}/admin/{{$function}}/{{$addon}}/?a=t&t={{$form_security_token}}">{{$action}}</a></p>
|
||||||
<p>{{$info.description}}</p>
|
<p>{{$info.description}}</p>
|
||||||
|
|
||||||
<p class="author">{{$str_author}}
|
<p class="author">{{$str_author}}
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
{{if $admin_form}}
|
{{if $admin_form}}
|
||||||
<h3>{{$settings}}</h3>
|
<h3>{{$settings}}</h3>
|
||||||
<form method="post" action="{{$baseurl}}/admin/{{$function}}/{{$plugin}}/">
|
<form method="post" action="{{$baseurl}}/admin/{{$function}}/{{$addon}}/">
|
||||||
{{$admin_form}}
|
{{$admin_form}}
|
||||||
</form>
|
</form>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
|
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{{$plugins.0}}</dt>
|
<dt>{{$addons.0}}</dt>
|
||||||
|
|
||||||
{{foreach $plugins.1 as $p}}
|
{{foreach $addons.1 as $p}}
|
||||||
<dd><a href="/admin/plugins/{{$p}}/">{{$p}}</a></dd>
|
<dd><a href="/admin/addons/{{$p}}/">{{$p}}</a></dd>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -37,11 +37,11 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if $admin.plugins_admin}}
|
{{if $admin.addons_admin}}
|
||||||
<div class="widget">
|
<div class="widget">
|
||||||
<h3>{{$plugadmtxt}}</h3>
|
<h3>{{$plugadmtxt}}</h3>
|
||||||
<ul role="menu">
|
<ul role="menu">
|
||||||
{{foreach $admin.plugins_admin as $name => $item}}
|
{{foreach $admin.addons_admin as $name => $item}}
|
||||||
<li role="menuitem" class="{{$item.2}}">
|
<li role="menuitem" class="{{$item.2}}">
|
||||||
<a href="{{$item.0}}" {{if $item.accesskey}}accesskey="{{$item.accesskey}}"{{/if}}>
|
<a href="{{$item.0}}" {{if $item.accesskey}}accesskey="{{$item.accesskey}}"{{/if}}>
|
||||||
{{$item.1}}
|
{{$item.1}}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<ul class='admin linklist'>
|
<ul class='admin linklist'>
|
||||||
<li class='admin button {{$admin.site.2}}'><a href='{{$admin.site.0}}'>{{$admin.site.1}}</a></li>
|
<li class='admin button {{$admin.site.2}}'><a href='{{$admin.site.0}}'>{{$admin.site.1}}</a></li>
|
||||||
<li class='admin button {{$admin.users.2}}'><a href='{{$admin.users.0}}'>{{$admin.users.1}}</a><span id='pending-update' title='{{$h_pending}}'></span></li>
|
<li class='admin button {{$admin.users.2}}'><a href='{{$admin.users.0}}'>{{$admin.users.1}}</a><span id='pending-update' title='{{$h_pending}}'></span></li>
|
||||||
<li class='admin button {{$admin.plugins.2}}'><a href='{{$admin.plugins.0}}'>{{$admin.plugins.1}}</a></li>
|
<li class='admin button {{$admin.addons.2}}'><a href='{{$admin.addons.0}}'>{{$admin.addons.1}}</a></li>
|
||||||
<li class='admin button {{$admin.themes.2}}'><a href='{{$admin.themes.0}}'>{{$admin.themes.1}}</a></li>
|
<li class='admin button {{$admin.themes.2}}'><a href='{{$admin.themes.0}}'>{{$admin.themes.1}}</a></li>
|
||||||
<li class='admin button {{$admin.dbsync.2}}'><a href='{{$admin.dbsync.0}}'>{{$admin.dbsync.1}}</a></li>
|
<li class='admin button {{$admin.dbsync.2}}'><a href='{{$admin.dbsync.0}}'>{{$admin.dbsync.1}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
{{if $admin.plugins_admin}}<h4>{{$plugadmtxt}}</h4>{{/if}}
|
{{if $admin.addons_admin}}<h4>{{$plugadmtxt}}</h4>{{/if}}
|
||||||
<ul class='admin linklist'>
|
<ul class='admin linklist'>
|
||||||
{{foreach $admin.plugins_admin as $l}}
|
{{foreach $admin.addons_admin as $l}}
|
||||||
<li class='admin button {{$l.2}}'><a href='{{$l.0}}'>{{$l.1}}</a></li>
|
<li class='admin button {{$l.2}}'><a href='{{$l.0}}'>{{$l.1}}</a></li>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<ul class='admin linklist'>
|
<ul class='admin linklist'>
|
||||||
<li class='admin button {{$admin.site.2}}'><a href='{{$admin.site.0}}'>{{$admin.site.1}}</a></li>
|
<li class='admin button {{$admin.site.2}}'><a href='{{$admin.site.0}}'>{{$admin.site.1}}</a></li>
|
||||||
<li class='admin button {{$admin.users.2}}'><a href='{{$admin.users.0}}'>{{$admin.users.1}}</a><span id='pending-update' title='{{$h_pending}}'></span></li>
|
<li class='admin button {{$admin.users.2}}'><a href='{{$admin.users.0}}'>{{$admin.users.1}}</a><span id='pending-update' title='{{$h_pending}}'></span></li>
|
||||||
<li class='admin button {{$admin.plugins.2}}'><a href='{{$admin.plugins.0}}'>{{$admin.plugins.1}}</a></li>
|
<li class='admin button {{$admin.addons.2}}'><a href='{{$admin.addons.0}}'>{{$admin.addons.1}}</a></li>
|
||||||
<li class='admin button {{$admin.themes.2}}'><a href='{{$admin.themes.0}}'>{{$admin.themes.1}}</a></li>
|
<li class='admin button {{$admin.themes.2}}'><a href='{{$admin.themes.0}}'>{{$admin.themes.1}}</a></li>
|
||||||
<li class='admin button {{$admin.dbsync.2}}'><a href='{{$admin.dbsync.0}}'>{{$admin.dbsync.1}}</a></li>
|
<li class='admin button {{$admin.dbsync.2}}'><a href='{{$admin.dbsync.0}}'>{{$admin.dbsync.1}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
{{if $admin.plugins_admin}}<h4>{{$plugadmtxt}}</h4>{{/if}}
|
{{if $admin.addons_admin}}<h4>{{$plugadmtxt}}</h4>{{/if}}
|
||||||
<ul class='admin linklist'>
|
<ul class='admin linklist'>
|
||||||
{{foreach $admin.plugins_admin as $l}}
|
{{foreach $admin.addons_admin as $l}}
|
||||||
<li class='admin button {{$l.2}}'><a href='{{$l.0}}'>{{$l.1}}</a></li>
|
<li class='admin button {{$l.2}}'><a href='{{$l.0}}'>{{$l.1}}</a></li>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue