Removed deprecated addons

This commit is contained in:
Michael 2017-10-19 06:40:00 +00:00
parent 18784a484b
commit 936afb42c4
247 changed files with 13 additions and 17479 deletions

View file

@ -1,7 +0,0 @@
Default Features Plugin
This plugin allows the site admin to choose which Additional Features
are on by default for newly created users on the site. The defaults
apply to all new users upon registration, but do not impact a user's
ability to turn features on/off once their account has been created.
These default settings do not impact existing users.

View file

@ -1,60 +0,0 @@
<?php
/**
* Name: Default Features
* Description: Choose which Additional Features are on by default for new users on the site.
* Version: 1.0
* Author: Michael Johnston
* Status: Unsupported
*/
function defaultfeatures_install() {
register_hook('register_account', 'addon/defaultfeatures/defaultfeatures.php', 'defaultfeatures_register');
logger("installed defaultfeatures plugin");
}
function defaultfeatures_uninstall() {
unregister_hook('register_account', 'addon/defaultfeatures/defaultfeatures.php', 'defaultfeatures_register');
logger("uninstalled defaultfeatures plugin");
}
function defaultfeatures_register($a, $newuid) {
$arr = array();
$features = get_features();
foreach($features as $fname => $fdata) {
foreach(array_slice($fdata,1) as $f) {
set_pconfig($newuid,'feature',$f[0],((intval(get_config('defaultfeatures',$f[0]))) ? "1" : "0"));
}
}
}
function defaultfeatures_plugin_admin_post (&$a) {
check_form_security_token_redirectOnErr('/admin/plugins/defaultfeatures', 'defaultfeaturessave');
foreach($_POST as $k => $v) {
if(strpos($k,'feature_') === 0) {
set_config('defaultfeatures',substr($k,8),((intval($v)) ? 1 : 0));
}
}
info( t('Features updated') . EOL);
}
function defaultfeatures_plugin_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/defaultfeatures/" );
$token = get_form_security_token("defaultfeaturessave");
$arr = array();
$features = get_features();
foreach($features as $fname => $fdata) {
$arr[$fname] = array();
$arr[$fname][0] = $fdata[0];
foreach(array_slice($fdata,1) as $f) {
$arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(get_config('defaultfeatures',$f[0]))) ? "1" : "0"),$f[2],array(t('Off'),t('On')));
}
}
//logger("Features: " . print_r($arr,true));
$o = replace_macros($t, array(
'$submit' => t('Save Settings'),
'$features' => $arr,
'$form_security_token' => $token
));
}

View file

@ -1,34 +0,0 @@
# ADDON defaultfeatures
# Copyright (C)
# This file is distributed under the same license as the Friendica defaultfeatures addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-23 14:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: defaultfeatures.php:36
msgid "Features updated"
msgstr ""
#: defaultfeatures.php:48
msgid "Off"
msgstr ""
#: defaultfeatures.php:48
msgid "On"
msgstr ""
#: defaultfeatures.php:55
msgid "Save Settings"
msgstr ""

View file

@ -1,14 +0,0 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
{{foreach $features as $f}}
<h3 class="settings-heading">{{$f.0}}</h3>
{{foreach $f.1 as $fcat}}
{{include file="field_yesno.tpl" field=$fcat}}
{{/foreach}}
{{/foreach}}
<div class="submit"><input type="submit" name="defaultfeatures-submit" value="{{$submit}}" /></div>