1
0
Fork 0

Merge branch 'develop' into issue/#3062

This commit is contained in:
Hypolite Petovan 2017-01-08 11:44:45 +11:00
commit 479180ca8e
162 changed files with 766 additions and 683 deletions

View file

@ -3,9 +3,7 @@
* Theme settings
*/
function theme_content(&$a){
function theme_content(App &$a){
if (!local_user()) {
return;
}
@ -16,8 +14,7 @@ function theme_content(&$a){
return clean_form($a, $colorset, $user);
}
function theme_post(&$a){
function theme_post(App &$a){
if (! local_user()) {
return;
}
@ -27,15 +24,14 @@ function theme_post(&$a){
}
}
function theme_admin(&$a){
function theme_admin(App &$a){
$colorset = get_config( 'duepuntozero', 'colorset');
$user = false;
return clean_form($a, $colorset, $user);
}
function theme_admin_post(&$a){
function theme_admin_post(App &$a){
if (isset($_POST['duepuntozero-settings-submit'])){
set_config('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
}
@ -44,13 +40,13 @@ function theme_admin_post(&$a){
/// @TODO $a is no longer used
function clean_form(&$a, &$colorset, $user){
$colorset = array(
'default'=>t('default'),
'greenzero'=>t('greenzero'),
'purplezero'=>t('purplezero'),
'easterbunny'=>t('easterbunny'),
'darkzero'=>t('darkzero'),
'comix'=>t('comix'),
'slackr'=>t('slackr'),
'default' =>t('default'),
'greenzero' =>t('greenzero'),
'purplezero' =>t('purplezero'),
'easterbunny' =>t('easterbunny'),
'darkzero' =>t('darkzero'),
'comix' =>t('comix'),
'slackr' =>t('slackr'),
);
if ($user) {
@ -64,7 +60,7 @@ function clean_form(&$a, &$colorset, $user){
$o .= replace_macros($t, array(
'$submit' => t('Submit'),
'$baseurl' => App::get_baseurl(),
'$title'=> t("Theme settings"),
'$title' => t("Theme settings"),
'$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
));

View file

@ -1,6 +1,6 @@
<?php
function duepuntozero_init(&$a) {
function duepuntozero_init(App &$a) {
set_template_engine($a, 'smarty3');

View file

@ -1,7 +1,7 @@
<?php
require_once('view/theme/frio/php/Image.php');
function theme_content(&$a) {
function theme_content(App &$a) {
if (!local_user()) {
return;
}
@ -19,7 +19,7 @@ function theme_content(&$a) {
return frio_form($a, $arr);
}
function theme_post(&$a) {
function theme_post(App &$a) {
if (!local_user()) {
return;
}

View file

@ -13,7 +13,7 @@
*
* @todo Check if this is really needed.
*/
function load_page(&$a) {
function load_page(App &$a) {
if(isset($_GET["mode"]) AND ($_GET["mode"] == "minimal")) {
require "view/theme/frio/minimal.php";
} elseif((isset($_GET["mode"]) AND ($_GET["mode"] == "none"))) {

View file

@ -11,7 +11,7 @@ $frio = "view/theme/frio";
global $frio;
function frio_init(&$a) {
function frio_init(App &$a) {
// disable the events module link in the profile tab
$a->theme_events_in_profile = false;

View file

@ -9,7 +9,7 @@
* Maintainer: Zach P <techcity@f.shmuz.in>
*/
function frost_mobile_init(&$a) {
function frost_mobile_init(App &$a) {
$a->sourcename = 'Friendica mobile web';
$a->videowidth = 250;
$a->videoheight = 200;
@ -18,7 +18,7 @@ function frost_mobile_init(&$a) {
set_template_engine($a, 'smarty3');
}
function frost_mobile_content_loaded(&$a) {
function frost_mobile_content_loaded(App &$a) {
// I could do this in style.php, but by having the CSS in a file the browser will cache it,
// making pages load faster

View file

@ -9,14 +9,14 @@
* Maintainer: Zach P <techcity@f.shmuz.in>
*/
function frost_init(&$a) {
function frost_init(App &$a) {
$a->videowidth = 400;
$a->videoheight = 330;
$a->theme_thread_allow = false;
set_template_engine($a, 'smarty3');
}
function frost_content_loaded(&$a) {
function frost_content_loaded(App &$a) {
// I could do this in style.php, but by having the CSS in a file the browser will cache it,
// making pages load faster

View file

@ -3,9 +3,7 @@
* Theme settings
*/
function theme_content(&$a){
function theme_content(App &$a){
if (!local_user()) {
return;
}
@ -18,7 +16,7 @@ function theme_content(&$a){
return quattro_form($a,$align, $color, $tfs, $pfs);
}
function theme_post(&$a){
function theme_post(App &$a){
if (! local_user()) {
return;
}
@ -31,45 +29,48 @@ function theme_post(&$a){
}
}
function theme_admin(&$a){
function theme_admin(App &$a){
$align = get_config('quattro', 'align' );
$color = get_config('quattro', 'color' );
$tfs = get_config("quattro","tfs");
$pfs = get_config("quattro","pfs");
$tfs = get_config("quattro","tfs");
$pfs = get_config("quattro","pfs");
return quattro_form($a,$align, $color, $tfs, $pfs);
}
function theme_admin_post(&$a){
function theme_admin_post(App &$a){
if (isset($_POST['quattro-settings-submit'])){
set_config('quattro', 'align', $_POST['quattro_align']);
set_config('quattro', 'color', $_POST['quattro_color']);
set_config('quattro', 'tfs', $_POST['quattro_tfs']);
set_config('quattro', 'tfs', $_POST['quattro_tfs']);
set_config('quattro', 'pfs', $_POST['quattro_pfs']);
}
}
/// @TODO $a is no longer used here
function quattro_form(&$a, $align, $color, $tfs, $pfs){
function quattro_form(App &$a, $align, $color, $tfs, $pfs){
$colors = array(
"dark"=>"Quattro",
"lilac"=>"Lilac",
"green"=>"Green"
"dark" => "Quattro",
"lilac" => "Lilac",
"green" => "Green",
);
if ($tfs===false) $tfs="20";
if ($pfs===false) $pfs="12";
if ($tfs === false) {
$tfs = "20";
}
if ($pfs === false) {
$pfs = "12";
}
$t = get_markup_template("theme_settings.tpl" );
$o .= replace_macros($t, array(
'$submit' => t('Submit'),
'$submit' => t('Submit'),
'$baseurl' => App::get_baseurl(),
'$title' => t("Theme settings"),
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
'$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
'$pfs' => array('quattro_pfs', t('Posts font size'), $pfs),
'$tfs' => array('quattro_tfs',t('Textareas font size'), $tfs),
'$title' => t("Theme settings"),
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
'$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
'$pfs' => array('quattro_pfs', t('Posts font size'), $pfs),
'$tfs' => array('quattro_tfs',t('Textareas font size'), $tfs),
));
return $o;
}

View file

@ -7,7 +7,7 @@
* Maintainer: Tobias <https://diekershoff.homeunix.net/friendica/profile/tobias>
*/
function quattro_init(&$a) {
function quattro_init(App &$a) {
$a->page['htmlhead'] .= '<script src="'.App::get_baseurl().'/view/theme/quattro/tinycon.min.js"></script>';
$a->page['htmlhead'] .= '<script src="'.App::get_baseurl().'/view/theme/quattro/js/quattro.js"></script>';;
}

View file

@ -10,7 +10,7 @@
* Screenshot: <a href="screenshot.png">Screenshot</a>
*/
function smoothly_init(&$a) {
function smoothly_init(App &$a) {
set_template_engine($a, 'smarty3');
$cssFile = null;

View file

@ -5,7 +5,7 @@
function theme_content(&$a){
function theme_content(App &$a){
if (!local_user()) {
return;
}
@ -35,7 +35,7 @@ function theme_content(&$a){
$show_services, $show_friends, $show_lastusers);
}
function theme_post(&$a){
function theme_post(App &$a){
if (! local_user()) {
return;
}
@ -52,7 +52,7 @@ function theme_post(&$a){
}
function theme_admin(&$a){
function theme_admin(App &$a){
if (!function_exists('get_vier_config'))
return;
@ -81,7 +81,7 @@ function theme_admin(&$a){
return $o;
}
function theme_admin_post(&$a){
function theme_admin_post(App &$a){
if (isset($_POST['vier-settings-submit'])){
set_config('vier', 'style', $_POST['vier_style']);
set_config('vier', 'show_pages', $_POST['vier_show_pages']);

View file

@ -13,7 +13,7 @@ require_once("include/plugin.php");
require_once("include/socgraph.php");
require_once("mod/proxy.php");
function vier_init(&$a) {
function vier_init(App &$a) {
$a->theme_events_in_profile = false;