aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-02 17:19:52 -0800
committerzotlabs <mike@macgirvin.com>2017-02-02 17:23:58 -0800
commitc62df39ce3a7797c5e49cdc6e498b42a27abbd97 (patch)
tree3fa2cc71f2179d1a448c227a9863a8349585ed31 /Zotlabs/Module
parenta91e7cbe8d2f29bd73145b9a545b56e5dda95e18 (diff)
downloadvolse-hubzilla-c62df39ce3a7797c5e49cdc6e498b42a27abbd97.tar.gz
volse-hubzilla-c62df39ce3a7797c5e49cdc6e498b42a27abbd97.tar.bz2
volse-hubzilla-c62df39ce3a7797c5e49cdc6e498b42a27abbd97.zip
move firefox social api configuration to plugin
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Ffsapi.php71
-rw-r--r--Zotlabs/Module/Settings/Channel.php9
2 files changed, 8 insertions, 72 deletions
diff --git a/Zotlabs/Module/Ffsapi.php b/Zotlabs/Module/Ffsapi.php
deleted file mode 100644
index f3ade73c2..000000000
--- a/Zotlabs/Module/Ffsapi.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-namespace Zotlabs\Module;
-
-
-
-class Ffsapi extends \Zotlabs\Web\Controller {
-
- function get() {
-
- $baseurl = z_root();
- $name = get_config('system','sitename');
- $description = t('Share content from Firefox to $Projectname');
- $author = 'Mike Macgirvin';
- $homepage = 'http://hubzilla.org';
- $activate = t('Activate the Firefox $Projectname provider');
-
- $s = <<< EOT
-
- <script>
-
- var baseurl = '$baseurl';
-
- var data = {
- "origin": baseurl,
- // currently required
- "name": '$name',
- "iconURL": baseurl+"/images/hz-16.png",
- "icon32URL": baseurl+"/images/hz-32.png",
- "icon64URL": baseurl+"/images/hz-64.png",
-
- // at least one of these must be defined
- // "workerURL": baseurl+"/worker.js",
- // "sidebarURL": baseurl+"/sidebar.htm",
- "shareURL": baseurl+"/rpost?f=&url=%{url}",
-
- // status buttons are scheduled for Firefox 26 or 27
- //"statusURL": baseurl+"/statusPanel.html",
-
- // social bookmarks are available in Firefox 26
- "markURL": baseurl+"/rbmark?f=&url=%{url}&title=%{title}",
- // icons should be 32x32 pixels
- // "markedIcon": baseurl+"/images/checkbox-checked-32.png",
- // "unmarkedIcon": baseurl+"/images/checkbox-unchecked-32.png",
- "unmarkedIcon": baseurl+"/images/hz-bookmark-32.png",
-
- // should be available for display purposes
- "description": "$description",
- "author": "$author",
- "homepageURL": "$homepage",
-
- // optional
- "version": "1.0"
- }
-
- function activate(node) {
- var event = new CustomEvent("ActivateSocialFeature");
- var jdata = JSON.stringify(data);
- node.setAttribute("data-service", JSON.stringify(data));
- node.dispatchEvent(event);
- }
- </script>
-
- <button onclick="activate(this)" title="$activate" class="btn btn-primary">$activate</button>
-
-EOT;
-
- return $s;
-
- }
-
-}
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index a73aa2e60..a89d83544 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -448,7 +448,10 @@ class Channel {
$always_show_in_notices = get_pconfig(local_channel(),'system','always_show_in_notices');
if($vnotify === false)
$vnotify = (-1);
-
+
+ $plugin = [ 'basic' => '', 'security' => '', 'notify' => '', 'misc' => '' ];
+ call_hooks('channel_settings',$plugin);
+
$o .= replace_macros($stpl,array(
'$ptitle' => t('Channel Settings'),
@@ -537,6 +540,10 @@ class Channel {
'$always_show_in_notices' => array('always_show_in_notices', t('Also show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, '', $yes_no),
'$evdays' => array('evdays', t('Notify me of events this many days in advance'), $evdays, t('Must be greater than 0')),
+ '$basic_addon' => $plugin['basic'],
+ '$sec_addon' => $plugin['security'],
+ '$notify_addon' => $plugin['notify'],
+ '$misc_addon' => $plugin['misc'],
'$h_advn' => t('Advanced Account/Page Type Settings'),
'$h_descadvn' => t('Change the behaviour of this account for special situations'),