mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Update function calls
update function calls to use profile class
This commit is contained in:
parent
4cfa46186a
commit
4fb2547df8
45 changed files with 360 additions and 294 deletions
|
@ -1,31 +1,48 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file view/theme/duepuntozero/style.php
|
||||
*/
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Model\Profile;
|
||||
|
||||
if (file_exists("$THEMEPATH/style.css")){
|
||||
echo file_get_contents("$THEMEPATH/style.css");
|
||||
if (file_exists("$THEMEPATH/style.css")) {
|
||||
echo file_get_contents("$THEMEPATH/style.css");
|
||||
}
|
||||
$uid = get_theme_uid();
|
||||
|
||||
$s_colorset = Config::get('duepuntozero','colorset');
|
||||
$colorset = PConfig::get( $uid, 'duepuntozero', 'colorset');
|
||||
if (!x($colorset))
|
||||
$colorset = $s_colorset;
|
||||
$uid = Profile::getThemeUid();
|
||||
|
||||
$s_colorset = Config::get('duepuntozero', 'colorset');
|
||||
$colorset = PConfig::get($uid, 'duepuntozero', 'colorset');
|
||||
|
||||
if (!x($colorset)) {
|
||||
$colorset = $s_colorset;
|
||||
}
|
||||
|
||||
if ($colorset) {
|
||||
if ($colorset == 'greenzero')
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/greenzero.css');
|
||||
if ($colorset == 'purplezero')
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/purplezero.css');
|
||||
if ($colorset == 'easterbunny')
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/easterbunny.css');
|
||||
if ($colorset == 'darkzero')
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/darkzero.css');
|
||||
if ($colorset == 'comix')
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/comix.css');
|
||||
if ($colorset == 'slackr')
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/slackr.css');
|
||||
if ($colorset == 'greenzero') {
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/greenzero.css');
|
||||
}
|
||||
|
||||
if ($colorset == 'purplezero') {
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/purplezero.css');
|
||||
}
|
||||
|
||||
if ($colorset == 'easterbunny') {
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/easterbunny.css');
|
||||
}
|
||||
|
||||
if ($colorset == 'darkzero') {
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/darkzero.css');
|
||||
}
|
||||
|
||||
if ($colorset == 'comix') {
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/comix.css');
|
||||
}
|
||||
|
||||
if ($colorset == 'slackr') {
|
||||
$setcss = file_get_contents('view/theme/duepuntozero/deriv/slackr.css');
|
||||
}
|
||||
}
|
||||
|
||||
echo $setcss;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Profile;
|
||||
|
||||
require_once 'view/theme/frio/php/frio_boot.php';
|
||||
|
||||
|
@ -38,7 +39,7 @@ if (!isset($minimal)) {
|
|||
// It makes mobile Chrome UI match Frio's top bar color.
|
||||
$uid = $a->profile_uid;
|
||||
if (is_null($uid)) {
|
||||
$uid = get_theme_uid();
|
||||
$uid = Profile::getThemeUid();
|
||||
}
|
||||
$schema = PConfig::get($uid, 'frio', 'schema');
|
||||
if (($schema) && ($schema != '---')) {
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
<?php
|
||||
require_once 'view/theme/frio/php/PHPColors/Color.php';
|
||||
/**
|
||||
* @file view/theme/frio/style.php
|
||||
*/
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
require_once 'view/theme/frio/php/PHPColors/Color.php';
|
||||
|
||||
$schemecss = "";
|
||||
$schemecssfile = false;
|
||||
$scheme_modified = 0;
|
||||
|
||||
if ($a->module !== 'install') {
|
||||
// Get the UID of the profile owner.
|
||||
$uid = get_theme_uid();
|
||||
$uid = Profile::getThemeUid();
|
||||
if ($uid) {
|
||||
PConfig::load($uid, 'frio');
|
||||
|
||||
|
@ -80,11 +84,11 @@ if (($schema) && ($schema != '---')) {
|
|||
// should leave it for admins to define for themselves.
|
||||
// default.php and default.css MUST be symlinks to existing schema files.
|
||||
if (! $schema) {
|
||||
if(file_exists('view/theme/frio/schema/default.php')) {
|
||||
if (file_exists('view/theme/frio/schema/default.php')) {
|
||||
$schemefile = 'view/theme/frio/schema/default.php';
|
||||
require_once $schemefile;
|
||||
}
|
||||
if(file_exists('view/theme/frio/schema/default.css')) {
|
||||
if (file_exists('view/theme/frio/schema/default.css')) {
|
||||
$schemecssfile = 'view/theme/frio/schema/default.css';
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +139,6 @@ if (!isset($link_hover_color)) {
|
|||
} else {
|
||||
$link_hover_color = '#' . $lhc->lighten(5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Convert $bg_image_options into css.
|
||||
|
|
|
@ -13,6 +13,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Object\Image;
|
||||
|
||||
$frio = "view/theme/frio";
|
||||
|
@ -197,7 +198,7 @@ function frio_contact_photo_menu(App $a, &$args)
|
|||
function frio_remote_nav($a, &$nav)
|
||||
{
|
||||
// get the homelink from $_XSESSION
|
||||
$homelink = get_my_url();
|
||||
$homelink = Profile::getMyURL();
|
||||
if (!$homelink) {
|
||||
$homelink = defaults($_SESSION, 'visitor_home', '');
|
||||
}
|
||||
|
@ -234,7 +235,7 @@ function frio_remote_nav($a, &$nav)
|
|||
} elseif (!local_user() && remote_user()) {
|
||||
$r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));
|
||||
$nav['remote'] = t("Guest");
|
||||
} elseif (get_my_url()) {
|
||||
} elseif (Profile::getMyURL()) {
|
||||
$r = q("SELECT `name`, `nick`, `photo` FROM `gcontact`
|
||||
WHERE `addr` = '%s' AND `network` = 'dfrn'",
|
||||
dbesc($webbie));
|
||||
|
|
|
@ -1,65 +1,68 @@
|
|||
<?php
|
||||
/**
|
||||
* @file view/theme/quattro/style.php
|
||||
*/
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Model\Profile;
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
$uid = Profile::getThemeUid();
|
||||
|
||||
$uid = get_theme_uid();
|
||||
$color = false;
|
||||
$quattro_align = false;
|
||||
$site_color = Config::get("quattro", "color", "dark");
|
||||
$site_quattro_align = Config::get("quattro", "align", false);
|
||||
|
||||
$color = false;
|
||||
$quattro_align = false;
|
||||
$site_color = Config::get("quattro", "color", "dark");
|
||||
$site_quattro_align = Config::get("quattro", "align", false);
|
||||
if ($uid) {
|
||||
$color = PConfig::get($uid, "quattro", "color", false);
|
||||
$quattro_align = PConfig::get($uid, 'quattro', 'align', false);
|
||||
}
|
||||
|
||||
if ($uid) {
|
||||
$color = PConfig::get($uid, "quattro", "color", false);
|
||||
$quattro_align = PConfig::get($uid, 'quattro', 'align', false);
|
||||
}
|
||||
if ($color === false) {
|
||||
$color = $site_color;
|
||||
}
|
||||
|
||||
if ($color === false) {
|
||||
$color = $site_color;
|
||||
}
|
||||
if ($quattro_align === false) {
|
||||
$quattro_align = $site_quattro_align;
|
||||
}
|
||||
|
||||
if ($quattro_align === false) {
|
||||
$quattro_align = $site_quattro_align;
|
||||
}
|
||||
|
||||
if (file_exists("$THEMEPATH/$color/style.css")){
|
||||
echo file_get_contents("$THEMEPATH/$color/style.css");
|
||||
}
|
||||
if (file_exists("$THEMEPATH/$color/style.css")) {
|
||||
echo file_get_contents("$THEMEPATH/$color/style.css");
|
||||
}
|
||||
|
||||
|
||||
if ($quattro_align == "center"){
|
||||
echo "
|
||||
html { width: 100%; margin:0px; padding:0px; }
|
||||
body {
|
||||
margin: 50px auto;
|
||||
width: 900px;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
$textarea_font_size = false;
|
||||
$post_font_size = false;
|
||||
|
||||
$site_textarea_font_size = Config::get("quattro", "tfs", "20");
|
||||
$site_post_font_size = Config::get("quattro", "pfs", "12");
|
||||
|
||||
if ($uid) {
|
||||
$textarea_font_size = PConfig::get($uid, "quattro", "tfs", false);
|
||||
$post_font_size = PConfig::get($uid, "quattro", "pfs", false);
|
||||
}
|
||||
|
||||
if ($textarea_font_size === false) {
|
||||
$textarea_font_size = $site_textarea_font_size;
|
||||
}
|
||||
if ($post_font_size === false) {
|
||||
$post_font_size = $site_post_font_size;
|
||||
}
|
||||
|
||||
if ($quattro_align == "center") {
|
||||
echo "
|
||||
textarea { font-size: ${textarea_font_size}px; }
|
||||
.wall-item-comment-wrapper .comment-edit-text-full { font-size: ${textarea_font_size}px; }
|
||||
#jot .profile-jot-text:focus { font-size: ${textarea_font_size}px; }
|
||||
.wall-item-container .wall-item-content { font-size: ${post_font_size}px; }
|
||||
html { width: 100%; margin:0px; padding:0px; }
|
||||
body {
|
||||
margin: 50px auto;
|
||||
width: 900px;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
$textarea_font_size = false;
|
||||
$post_font_size = false;
|
||||
|
||||
$site_textarea_font_size = Config::get("quattro", "tfs", "20");
|
||||
$site_post_font_size = Config::get("quattro", "pfs", "12");
|
||||
|
||||
if ($uid) {
|
||||
$textarea_font_size = PConfig::get($uid, "quattro", "tfs", false);
|
||||
$post_font_size = PConfig::get($uid, "quattro", "pfs", false);
|
||||
}
|
||||
|
||||
if ($textarea_font_size === false) {
|
||||
$textarea_font_size = $site_textarea_font_size;
|
||||
}
|
||||
if ($post_font_size === false) {
|
||||
$post_font_size = $site_post_font_size;
|
||||
}
|
||||
|
||||
echo "
|
||||
textarea { font-size: ${textarea_font_size}px; }
|
||||
.wall-item-comment-wrapper .comment-edit-text-full { font-size: ${textarea_font_size}px; }
|
||||
#jot .profile-jot-text:focus { font-size: ${textarea_font_size}px; }
|
||||
.wall-item-container .wall-item-content { font-size: ${post_font_size}px; }
|
||||
";
|
||||
|
|
|
@ -1,30 +1,36 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file view/theme/vier/style.php
|
||||
*/
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Model\Profile;
|
||||
|
||||
$uid = get_theme_uid();
|
||||
$uid = Profile::getThemeUid();
|
||||
|
||||
$style = PConfig::get($uid, 'vier', 'style');
|
||||
|
||||
if ($style == "")
|
||||
if ($style == "") {
|
||||
$style = Config::get('vier', 'style');
|
||||
}
|
||||
|
||||
if ($style == "")
|
||||
if ($style == "") {
|
||||
$style = "plus";
|
||||
}
|
||||
|
||||
if ($style == "flat")
|
||||
if ($style == "flat") {
|
||||
$stylecssfile = 'view/theme/vier/flat.css';
|
||||
else if ($style == "netcolour")
|
||||
} else if ($style == "netcolour") {
|
||||
$stylecssfile = 'view/theme/vier/netcolour.css';
|
||||
else if ($style == "breathe")
|
||||
} else if ($style == "breathe") {
|
||||
$stylecssfile = 'view/theme/vier/breathe.css';
|
||||
else if ($style == "plus")
|
||||
} else if ($style == "plus") {
|
||||
$stylecssfile = 'view/theme/vier/plus.css';
|
||||
else if ($style == "dark")
|
||||
} else if ($style == "dark") {
|
||||
$stylecssfile = 'view/theme/vier/dark.css';
|
||||
else if ($style == "plusminus")
|
||||
} else if ($style == "plusminus") {
|
||||
$stylecssfile = 'view/theme/vier/plusminus.css';
|
||||
}
|
||||
|
||||
if (file_exists($THEMEPATH."//style.css")) {
|
||||
$stylecss = file_get_contents($THEMEPATH."//style.css")."\n";
|
||||
|
@ -34,8 +40,9 @@ if (file_exists($THEMEPATH."//style.css")) {
|
|||
$stylemodified = filemtime($stylecssfile);
|
||||
$stylecss .= file_get_contents($stylecssfile);
|
||||
|
||||
if ($stylemodified > $modified)
|
||||
if ($stylemodified > $modified) {
|
||||
$modified = $stylemodified;
|
||||
}
|
||||
|
||||
$modified = gmdate('r', $modified);
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
|
||||
require_once "include/plugin.php";
|
||||
require_once "mod/proxy.php";
|
||||
|
@ -150,7 +151,7 @@ function vier_community_info() {
|
|||
foreach ($r as $rr) {
|
||||
$entry = replace_macros($tpl,array(
|
||||
'$id' => $rr['id'],
|
||||
//'$profile_link' => zrl($rr['url']),
|
||||
//'$profile_link' => Profile::zrl($rr['url']),
|
||||
'$profile_link' => 'follow/?url='.urlencode($rr['url']),
|
||||
'$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_MICRO),
|
||||
'$alt_text' => $rr['name'],
|
||||
|
@ -280,7 +281,7 @@ function vier_community_info() {
|
|||
}
|
||||
|
||||
foreach ($r AS $index => $helper)
|
||||
$r[$index]["url"] = zrl($helper["url"]);
|
||||
$r[$index]["url"] = Profile::zrl($helper["url"]);
|
||||
|
||||
$r[] = array("url" => "help/Quick-Start-guide", "name" => t("Quick Start"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue