diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-02-03 09:24:09 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-02-03 09:24:09 +0100 |
commit | dd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc (patch) | |
tree | cd4aa364519bee76e1cbec9d5f776bb494fc543f /Zotlabs/Module | |
parent | 028b2a655de8c9d7b1f0de05a869e59c2b219818 (diff) | |
parent | 7e1e9ac94a1cf2fb01a3052f7fd9d0f2049079b5 (diff) | |
download | volse-hubzilla-dd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc.tar.gz volse-hubzilla-dd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc.tar.bz2 volse-hubzilla-dd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc.zip |
Merge branch 'dev' into wip-app-bin
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Ffsapi.php | 71 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Match.php | 84 | ||||
-rw-r--r-- | Zotlabs/Module/Opensearch.php | 24 | ||||
-rw-r--r-- | Zotlabs/Module/Rsd_xml.php | 17 | ||||
-rw-r--r-- | Zotlabs/Module/Settings/Channel.php | 9 |
6 files changed, 9 insertions, 198 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/Item.php b/Zotlabs/Module/Item.php index 48992a676..4725ecb38 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -523,7 +523,7 @@ class Item extends \Zotlabs\Web\Controller { // <img src="javascript:alert('hacked');" /> // if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) { - // require_once('include/bb2diaspora.php'); + // require_once('include/markdown.php'); // $body = escape_tags(trim($body)); // $body = str_replace("\n",'<br />', $body); // $body = preg_replace_callback('/\[share(.*?)\]/ism','\share_shield',$body); diff --git a/Zotlabs/Module/Match.php b/Zotlabs/Module/Match.php deleted file mode 100644 index 63bdb60a4..000000000 --- a/Zotlabs/Module/Match.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -namespace Zotlabs\Module; - -/** - * @brief Controller for /match. - * - * It takes keywords from your profile and queries the directory server for - * matching keywords from other profiles. - * - * @FIXME this has never been properly ported from Friendica. - * - * @param App &$a - * @return void|string - */ - -class Match extends \Zotlabs\Web\Controller { - - function get() { - - $o = ''; - if (! local_channel()) - return; - - $_SESSION['return_url'] = z_root() . '/' . \App::$cmd; - - $o .= '<h2>' . t('Profile Match') . '</h2>'; - - $r = q("SELECT keywords FROM profile WHERE is_default = 1 AND uid = %d LIMIT 1", - intval(local_channel()) - ); - if (! count($r)) - return; - - if (! $r[0]['keywords']) { - notice( t('No keywords to match. Please add keywords to your default profile.') . EOL); - return; - } - - $params = array(); - $tags = trim($r[0]['keywords']); - - if ($tags) { - $params['s'] = $tags; - if (\App::$pager['page'] != 1) - $params['p'] = \App::$pager['page']; - - // if(strlen(get_config('system','directory_submit_url'))) - // $x = post_url('http://dir.friendica.com/msearch', $params); - // else - // $x = post_url(z_root() . '/msearch', $params); - - $j = json_decode($x); - - if ($j->total) { - \App::set_pager_total($j->total); - \App::set_pager_itemspage($j->items_page); - } - - if (count($j->results)) { - $tpl = get_markup_template('match.tpl'); - foreach ($j->results as $jj) { - $connlnk = z_root() . '/follow/?url=' . $jj->url; - $o .= replace_macros($tpl,array( - '$url' => zid($jj->url), - '$name' => $jj->name, - '$photo' => $jj->photo, - '$inttxt' => ' ' . t('is interested in:'), - '$conntxt' => t('Connect'), - '$connlnk' => $connlnk, - '$tags' => $jj->tags - )); - } - } else { - info( t('No matches') . EOL); - } - } - - $o .= cleardiv(); - $o .= paginate($a); - - return $o; - } - -} diff --git a/Zotlabs/Module/Opensearch.php b/Zotlabs/Module/Opensearch.php deleted file mode 100644 index 8e76038c9..000000000 --- a/Zotlabs/Module/Opensearch.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -namespace Zotlabs\Module; - - -class Opensearch extends \Zotlabs\Web\Controller { - - function init() { - - $tpl = get_markup_template('opensearch.tpl'); - - header("Content-type: application/opensearchdescription+xml"); - - $o = replace_macros($tpl, array( - '$baseurl' => z_root(), - '$nodename' => \App::get_hostname(), - )); - - echo $o; - - killme(); - - } - -} diff --git a/Zotlabs/Module/Rsd_xml.php b/Zotlabs/Module/Rsd_xml.php deleted file mode 100644 index e5059834b..000000000 --- a/Zotlabs/Module/Rsd_xml.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -namespace Zotlabs\Module; - -class Rsd_xml extends \Zotlabs\Web\Controller { - - function init() { - header ("Content-Type: text/xml"); - echo replace_macros(get_markup_template('rsd.tpl'),array( - '$project' => \Zotlabs\Lib\System::get_platform_name(), - '$baseurl' => z_root(), - '$apipath' => z_root() . '/api/' - )); - killme(); - } - -} - 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'), |