Merge branch 'pull'

This commit is contained in:
friendica 2012-03-30 15:12:20 -07:00
commit aace55df0a
31 changed files with 398 additions and 265 deletions

View file

@ -1261,17 +1261,20 @@ function current_theme(){
$system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : ''); $system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
$theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme); $theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
if($theme_name && file_exists('view/theme/' . $theme_name . '/style.css')) if($theme_name &&
(file_exists('view/theme/' . $theme_name . '/style.css') ||
file_exists('view/theme/' . $theme_name . '/style.php')))
return($theme_name); return($theme_name);
foreach($app_base_themes as $t) { foreach($app_base_themes as $t) {
if(file_exists('view/theme/' . $t . '/style.css')) if(file_exists('view/theme/' . $t . '/style.css')||
file_exists('view/theme/' . $t . '/style.php'))
return($t); return($t);
} }
$fallback = glob('view/theme/*/style.css'); $fallback = glob('view/theme/*/style.[css|php]');
if(count($fallback)) if(count($fallback))
return (str_replace('view/theme/','', str_replace("/style.css","",$fallback[0]))); return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
}} }}
@ -1283,6 +1286,8 @@ if(! function_exists('current_theme_url')) {
function current_theme_url() { function current_theme_url() {
global $a; global $a;
$t = current_theme(); $t = current_theme();
if (file_exists('view/theme/' . $t . '/style.php'))
return($a->get_baseurl() . '/view/theme/' . $t . '/style.pcss');
return($a->get_baseurl() . '/view/theme/' . $t . '/style.css'); return($a->get_baseurl() . '/view/theme/' . $t . '/style.css');
}} }}

View file

@ -94,6 +94,7 @@ else {
// Otherwise it's probably an openid. // Otherwise it's probably an openid.
try {
require_once('library/openid.php'); require_once('library/openid.php');
$openid = new LightOpenID; $openid = new LightOpenID;
$openid->identity = $openid_url; $openid->identity = $openid_url;
@ -101,6 +102,9 @@ else {
$a = get_app(); $a = get_app();
$openid->returnUrl = $a->get_baseurl(true) . '/openid'; $openid->returnUrl = $a->get_baseurl(true) . '/openid';
goaway($openid->authUrl()); goaway($openid->authUrl());
} catch (Exception $e) {
notice( t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'<br /><br >'. t('The error message was:').' '.$e->getMessage());
}
// NOTREACHED // NOTREACHED
} }
} }

View file

@ -1,6 +1,19 @@
<?php <?php
function get_theme_config_file($theme){
$a = get_app();
$base_theme = $a->theme_info['extends'];
if (file_exists("view/theme/$theme/config.php")){
return "view/theme/$theme/config.php";
}
if (file_exists("view/theme/$base_theme/config.php")){
return "view/theme/$base_theme/config.php";
}
return null;
}
function settings_init(&$a) { function settings_init(&$a) {
if(local_user()) { if(local_user()) {
profile_load($a,$a->user['nickname']); profile_load($a,$a->user['nickname']);
@ -194,6 +207,45 @@ function settings_post(&$a) {
return; return;
} }
if(($a->argc > 1) && ($a->argv[1] == 'display')) {
check_form_security_token_redirectOnErr('/settings/display', 'settings_display');
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->user['theme']);
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
$browser_update = $browser_update * 1000;
if($browser_update < 10000)
$browser_update = 40000;
$itemspage_network = ((x($_POST,'itemspage_network')) ? intval($_POST['itemspage_network']) : 40);
if($itemspage_network > 100)
$itemspage_network = 40;
set_pconfig(local_user(),'system','update_interval', $browser_update);
set_pconfig(local_user(),'system','itemspage_network', $itemspage_network);
set_pconfig(local_user(),'system','no_smilies',$nosmile);
if ($theme == $a->user['theme']){
// call theme_post only if theme has not benn changed
if( ($themeconfigfile = get_theme_config_file($theme)) != null){
require_once($themeconfigfile);
theme_post($a);
}
}
$r = q("UPDATE `user` SET `theme` = '%s' WHERE `uid` = %d LIMIT 1",
dbesc($theme),
intval(local_user())
);
goaway($a->get_baseurl(true) . '/settings/display' );
return; // NOTREACHED
}
check_form_security_token_redirectOnErr('/settings', 'settings'); check_form_security_token_redirectOnErr('/settings', 'settings');
call_hooks('settings_post', $_POST); call_hooks('settings_post', $_POST);
@ -227,7 +279,7 @@ function settings_post(&$a) {
} }
} }
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->user['theme']);
$username = ((x($_POST,'username')) ? notags(trim($_POST['username'])) : ''); $username = ((x($_POST,'username')) ? notags(trim($_POST['username'])) : '');
$email = ((x($_POST,'email')) ? notags(trim($_POST['email'])) : ''); $email = ((x($_POST,'email')) ? notags(trim($_POST['email'])) : '');
$timezone = ((x($_POST,'timezone')) ? notags(trim($_POST['timezone'])) : ''); $timezone = ((x($_POST,'timezone')) ? notags(trim($_POST['timezone'])) : '');
@ -242,14 +294,6 @@ function settings_post(&$a) {
$expire_starred = ((x($_POST,'expire_starred')) ? intval($_POST['expire_starred']) : 0); $expire_starred = ((x($_POST,'expire_starred')) ? intval($_POST['expire_starred']) : 0);
$expire_photos = ((x($_POST,'expire_photos'))? intval($_POST['expire_photos']) : 0); $expire_photos = ((x($_POST,'expire_photos'))? intval($_POST['expire_photos']) : 0);
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
$browser_update = $browser_update * 1000;
if($browser_update < 10000)
$browser_update = 40000;
$itemspage_network = ((x($_POST,'itemspage_network')) ? intval($_POST['itemspage_network']) : 40);
if($itemspage_network > 100)
$itemspage_network = 40;
$allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0); $allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0);
@ -263,7 +307,7 @@ function settings_post(&$a) {
$suggestme = ((x($_POST,'suggestme')) ? intval($_POST['suggestme']) : 0); $suggestme = ((x($_POST,'suggestme')) ? intval($_POST['suggestme']) : 0);
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0); $hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
$hidewall = (($_POST['hidewall'] == 1) ? 1: 0); $hidewall = (($_POST['hidewall'] == 1) ? 1: 0);
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
$notify = 0; $notify = 0;
@ -345,11 +389,9 @@ function settings_post(&$a) {
set_pconfig(local_user(),'expire','photos', $expire_photos); set_pconfig(local_user(),'expire','photos', $expire_photos);
set_pconfig(local_user(),'system','suggestme', $suggestme); set_pconfig(local_user(),'system','suggestme', $suggestme);
set_pconfig(local_user(),'system','update_interval', $browser_update);
set_pconfig(local_user(),'system','itemspage_network', $itemspage_network);
set_pconfig(local_user(),'system','no_smilies',$nosmile);
$r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d, `blocktags` = %d WHERE `uid` = %d LIMIT 1",
$r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d, `blocktags` = %d WHERE `uid` = %d LIMIT 1",
dbesc($username), dbesc($username),
dbesc($email), dbesc($email),
dbesc($openid), dbesc($openid),
@ -362,7 +404,6 @@ function settings_post(&$a) {
intval($page_flags), intval($page_flags),
dbesc($defloc), dbesc($defloc),
intval($allow_location), intval($allow_location),
dbesc($theme),
intval($maxreq), intval($maxreq),
intval($expire), intval($expire),
dbesc($openidserver), dbesc($openidserver),
@ -440,6 +481,12 @@ function settings_content(&$a) {
'url' => $a->get_baseurl(true).'/settings', 'url' => $a->get_baseurl(true).'/settings',
'sel' => (($a->argc == 1)?'active':''), 'sel' => (($a->argc == 1)?'active':''),
), ),
array(
'label' => t('Display settings'),
'url' => $a->get_baseurl(true).'/settings/display',
'sel' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''),
),
array( array(
'label' => t('Connector settings'), 'label' => t('Connector settings'),
'url' => $a->get_baseurl(true).'/settings/connectors', 'url' => $a->get_baseurl(true).'/settings/connectors',
@ -632,6 +679,78 @@ function settings_content(&$a) {
return $o; return $o;
} }
/*
* DISPLAY SETTINGS
*/
if(($a->argc > 1) && ($a->argv[1] === 'display')) {
$default_theme = get_config('system','theme');
if(! $default_theme)
$default_theme = 'default';
$allowed_themes_str = get_config('system','allowed_themes');
$allowed_themes_raw = explode(',',$allowed_themes_str);
$allowed_themes = array();
if(count($allowed_themes_raw))
foreach($allowed_themes_raw as $x)
if(strlen(trim($x)))
$allowed_themes[] = trim($x);
$themes = array();
$files = glob('view/theme/*');
if($allowed_themes) {
foreach($allowed_themes as $th) {
$f = $th;
$is_experimental = file_exists('view/theme/' . $th . '/experimental');
$unsupported = file_exists('view/theme/' . $th . '/unsupported');
if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
$theme_name = (($is_experimental) ? sprintf("%s - \x28Experimental\x29", $f) : $f);
$themes[$f]=$theme_name;
}
}
}
$theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);
$browser_update = intval(get_pconfig(local_user(), 'system','update_interval'));
$browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds
$itemspage_network = intval(get_pconfig(local_user(), 'system','itemspage_network'));
$itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : 40); // default if not set: 40 items
$nosmile = get_pconfig(local_user(),'system','no_smilies');
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
$theme_config = "";
if( ($themeconfigfile = get_theme_config_file($theme_selected)) != null){
require_once($themeconfigfile);
$theme_config = theme_content($a);
}
$tpl = get_markup_template("settings_display.tpl");
$o = replace_macros($tpl, array(
'$tabs' => $tabs,
'$ptitle' => t('Display Settings'),
'$form_security_token' => get_form_security_token("settings_display"),
'$submit' => t('Submit'),
'$baseurl' => $a->get_baseurl(true),
'$uid' => local_user(),
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display on the network page:"), $itemspage_network, t('Maximum of 100 items')),
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
'$theme_config' => $theme_config,
));
return $o;
}
/*
* ACCOUNT SETTINGS
*/
require_once('include/acl_selectors.php'); require_once('include/acl_selectors.php');
@ -669,14 +788,7 @@ function settings_content(&$a) {
$suggestme = get_pconfig(local_user(), 'system','suggestme'); $suggestme = get_pconfig(local_user(), 'system','suggestme');
$suggestme = (($suggestme===false)? '0': $suggestme); // default if not set: 0 $suggestme = (($suggestme===false)? '0': $suggestme); // default if not set: 0
$browser_update = intval(get_pconfig(local_user(), 'system','update_interval'));
$browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds
$itemspage_network = intval(get_pconfig(local_user(), 'system','itemspage_network'));
$itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : 40); // default if not set: 40 items
$nosmile = get_pconfig(local_user(),'system','no_smilies');
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
if(! strlen($a->user['timezone'])) if(! strlen($a->user['timezone']))
$timezone = date_default_timezone_get(); $timezone = date_default_timezone_get();
@ -765,33 +877,7 @@ function settings_content(&$a) {
info( t('Profile is <strong>not published</strong>.') . EOL ); info( t('Profile is <strong>not published</strong>.') . EOL );
$default_theme = get_config('system','theme');
if(! $default_theme)
$default_theme = 'default';
$allowed_themes_str = get_config('system','allowed_themes');
$allowed_themes_raw = explode(',',$allowed_themes_str);
$allowed_themes = array();
if(count($allowed_themes_raw))
foreach($allowed_themes_raw as $x)
if(strlen(trim($x)))
$allowed_themes[] = trim($x);
$themes = array();
$files = glob('view/theme/*');
if($allowed_themes) {
foreach($allowed_themes as $th) {
$f = $th;
$is_experimental = file_exists('view/theme/' . $th . '/experimental');
$unsupported = file_exists('view/theme/' . $th . '/unsupported');
if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
$theme_name = (($is_experimental) ? sprintf("%s - \x28Experimental\x29", $f) : $f);
$themes[$f]=$theme_name;
}
}
}
$theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);
$subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : ''); $subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : '');
@ -842,10 +928,7 @@ function settings_content(&$a) {
'$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''), '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''),
'$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''), '$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''),
'$allowloc' => array('allow_location', t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''), '$allowloc' => array('allow_location', t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''),
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display on the network page:"), $itemspage_network, t('Maximum of 100 items')),
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
'$h_prv' => t('Security and Privacy Settings'), '$h_prv' => t('Security and Privacy Settings'),

16
mod/view.php Normal file
View file

@ -0,0 +1,16 @@
<?php
/**
* load view/theme/$current_theme/style.php with friendica contex
*/
function view_init($a){
header("Content-Type: text/css");
if ($a->argc == 4){
$theme = $a->argv[2];
$THEMEPATH = "view/theme/$theme";
require_once("view/theme/$theme/style.php");
}
killme();
}

View file

@ -28,10 +28,7 @@ $nickname_block
{{inc field_custom.tpl with $field=$timezone }}{{endinc}} {{inc field_custom.tpl with $field=$timezone }}{{endinc}}
{{inc field_input.tpl with $field=$defloc }}{{endinc}} {{inc field_input.tpl with $field=$defloc }}{{endinc}}
{{inc field_checkbox.tpl with $field=$allowloc }}{{endinc}} {{inc field_checkbox.tpl with $field=$allowloc }}{{endinc}}
{{inc field_themeselect.tpl with $field=$theme }}{{endinc}}
{{inc field_input.tpl with $field=$ajaxint }}{{endinc}}
{{inc field_input.tpl with $field=$itemspage_network }}{{endinc}}
{{inc field_checkbox.tpl with $field=$nosmile}}{{endinc}}
<div class="settings-submit-wrapper" > <div class="settings-submit-wrapper" >
<input type="submit" name="submit" class="settings-submit" value="$submit" /> <input type="submit" name="submit" class="settings-submit" value="$submit" />

23
view/settings_display.tpl Normal file
View file

@ -0,0 +1,23 @@
$tabs
<h1>$ptitle</h1>
<form action="settings/display" id="settings-form" method="post" autocomplete="off" >
<input type='hidden' name='form_security_token' value='$form_security_token'>
{{inc field_themeselect.tpl with $field=$theme }}{{endinc}}
{{inc field_input.tpl with $field=$ajaxint }}{{endinc}}
{{inc field_input.tpl with $field=$itemspage_network }}{{endinc}}
{{inc field_checkbox.tpl with $field=$nosmile}}{{endinc}}
<div class="settings-submit-wrapper" >
<input type="submit" name="submit" class="settings-submit" value="$submit" />
</div>
{{ if $theme_config }}
<h2>Theme settings</h2>
$theme_config
{{ endif }}
</form>

View file

@ -17,7 +17,7 @@
<div id="close_services"> <div id="close_services">
{{ if $lastusers_title }} {{ if $lastusers_title }}
<h3>Connectable Services<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3> <h3>Connectable Services<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3>
<div id="right_service_icons" style="margin-left: 11px; margin-top: 5px;"> <div id="right_service_icons" style="margin-left: 16px; margin-top: 5px;">
<a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook-blue/icons/facebook.png" title="Facebook"></a> <a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook-blue/icons/facebook.png" title="Facebook"></a>
<a href="$url/settings/connectors"><img alt="StatusNet" src="view/theme/diabook-blue/icons/StatusNet.png?" title="StatusNet"></a> <a href="$url/settings/connectors"><img alt="StatusNet" src="view/theme/diabook-blue/icons/StatusNet.png?" title="StatusNet"></a>
<a href="$url/settings/connectors"><img alt="LiveJournal" src="view/theme/diabook-blue/icons/livejournal.png?" title="LiveJournal"></a> <a href="$url/settings/connectors"><img alt="LiveJournal" src="view/theme/diabook-blue/icons/livejournal.png?" title="LiveJournal"></a>

View file

@ -557,13 +557,14 @@ header #banner a:hover {
outline: none; outline: none;
vertical-align: middle; vertical-align: middle;
font-weight: bolder; font-weight: bolder;
margin-left: 3px;
} }
header #banner #logo-img { header #banner #logo-img {
height: 25px; height: 25px;
margin-top: 3px; margin-top: 3px;
} }
header #banner #logo-text { header #banner #logo-text {
font-size: 21px; font-size: 20px;
position: absolute; position: absolute;
top: 10%; top: 10%;
} }
@ -718,7 +719,7 @@ nav .nav-menu.selected {
nav .nav-notify { nav .nav-notify {
display: none; display: none;
position: absolute; position: absolute;
background-color: #ff0000; background-color: #fff;
/* background-color: #19aeff; */ /* background-color: #19aeff; */
-moz-border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px;
@ -730,6 +731,7 @@ nav .nav-notify {
right: -6px; right: -6px;
min-width: 10px; min-width: 10px;
text-align: center; text-align: center;
border: 1px solid black;
} }
nav .nav-notify.show { nav .nav-notify.show {
display: block; display: block;
@ -752,7 +754,7 @@ nav #nav-home-link, #nav-directory-link, #nav-apps-link{
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
font-size: 15px; font-size: 14px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 0px;
@ -1037,6 +1039,8 @@ aside #profiles-menu {
} }
aside #search-text { aside #search-text {
width: 150px; width: 150px;
height: 17px;
padding-left: 10px;
border-top-left-radius: 15px; border-top-left-radius: 15px;
border-top-right-radius: 15px; border-top-right-radius: 15px;
border-bottom-right-radius: 15px; border-bottom-right-radius: 15px;
@ -1259,6 +1263,7 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; } right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;} #page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;} #page-sidebar-right_aside ul {margin-top: 0px;}
#page-sidebar-right_aside .label {max-width: 128px;}
right_aside .icon {width: 10px; height: 10px;} right_aside .icon {width: 10px; height: 10px;}
.close_box { .close_box {
background-image: url("../../../view/theme/diabook-aerith/icons/close_box.png"); background-image: url("../../../view/theme/diabook-aerith/icons/close_box.png");
@ -1744,6 +1749,7 @@ transition: all 0.2s ease-in-out;
#profile-jot-submit { #profile-jot-submit {
float: right; float: right;
margin-top: 2px; margin-top: 2px;
font-size: 14px;
} }
#profile-upload-wrapper { #profile-upload-wrapper {
@ -1796,7 +1802,7 @@ transition: all 0.2s ease-in-out;
float: right; float: right;
margin-left: 10px; margin-left: 10px;
margin-top: 2px; margin-top: 2px;
font-size: 10px; font-size: 9px;
font-weight: bolder; font-weight: bolder;
cursor: pointer; cursor: pointer;
} }
@ -1809,7 +1815,6 @@ transition: all 0.2s ease-in-out;
.button.creation1 { .button.creation1 {
background-color: #fff; background-color: #fff;
border: 1px solid #777777; border: 1px solid #777777;
background-image: -moz-linear-gradient(center top , white 0%, #DDDDDD 100%);
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
box-shadow: 0 1px 1px #CFCFCF; box-shadow: 0 1px 1px #CFCFCF;
cursor: pointer; cursor: pointer;
@ -1817,7 +1822,6 @@ transition: all 0.2s ease-in-out;
} }
.button.creation2 { .button.creation2 {
background-color: #3465A4; background-color: #3465A4;
background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
border: 1px solid #777777; border: 1px solid #777777;
color: white; color: white;
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;

View file

@ -558,13 +558,14 @@ header #banner a:hover {
outline: none; outline: none;
vertical-align: middle; vertical-align: middle;
font-weight: bolder; font-weight: bolder;
margin-left: 3px;
} }
header #banner #logo-img { header #banner #logo-img {
height: 25px; height: 25px;
margin-top: 3px; margin-top: 3px;
} }
header #banner #logo-text { header #banner #logo-text {
font-size: 21px; font-size: 20px;
position: absolute; position: absolute;
top: 10%; top: 10%;
} }
@ -719,7 +720,7 @@ nav .nav-menu.selected {
nav .nav-notify { nav .nav-notify {
display: none; display: none;
position: absolute; position: absolute;
background-color: #ff0000; background-color: #fff;
/* background-color: #19aeff; */ /* background-color: #19aeff; */
-moz-border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px;
@ -731,6 +732,7 @@ nav .nav-notify {
right: -6px; right: -6px;
min-width: 10px; min-width: 10px;
text-align: center; text-align: center;
border: 1px solid black;
} }
nav .nav-notify.show { nav .nav-notify.show {
display: block; display: block;
@ -753,7 +755,7 @@ nav #nav-home-link, #nav-directory-link, #nav-apps-link{
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
font-size: 15px; font-size: 14px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 0px;
@ -1036,6 +1038,8 @@ aside #profiles-menu {
} }
aside #search-text { aside #search-text {
width: 150px; width: 150px;
height: 17px;
padding-left: 10px;
border-top-left-radius: 15px; border-top-left-radius: 15px;
border-top-right-radius: 15px; border-top-right-radius: 15px;
border-bottom-right-radius: 15px; border-bottom-right-radius: 15px;
@ -1258,6 +1262,7 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; } right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;} #page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;} #page-sidebar-right_aside ul {margin-top: 0px;}
#page-sidebar-right_aside .label {max-width: 128px;}
right_aside .icon {width: 10px; height: 10px;} right_aside .icon {width: 10px; height: 10px;}
.close_box { .close_box {
background-image: url("../../../view/theme/diabook-aerith/icons/close_box.png"); background-image: url("../../../view/theme/diabook-aerith/icons/close_box.png");
@ -1738,7 +1743,7 @@ transition: all 0.2s ease-in-out;
#profile-jot-submit { #profile-jot-submit {
float: right; float: right;
margin-top: 2px; margin-top: 2px;
font-size: 14px;
} }
#profile-upload-wrapper { #profile-upload-wrapper {
float: left; float: left;
@ -1790,7 +1795,7 @@ transition: all 0.2s ease-in-out;
float: right; float: right;
margin-left: 10px; margin-left: 10px;
margin-top: 2px; margin-top: 2px;
font-size: 10px; font-size: 9px;
font-weight: bolder; font-weight: bolder;
cursor: pointer; cursor: pointer;
} }
@ -1803,7 +1808,6 @@ transition: all 0.2s ease-in-out;
.button.creation1 { .button.creation1 {
background-color: #fff; background-color: #fff;
border: 1px solid #777777; border: 1px solid #777777;
background-image: -moz-linear-gradient(center top , white 0%, #DDDDDD 100%);
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
box-shadow: 0 1px 1px #CFCFCF; box-shadow: 0 1px 1px #CFCFCF;
font-weight: bolder; font-weight: bolder;
@ -1811,7 +1815,6 @@ transition: all 0.2s ease-in-out;
} }
.button.creation2 { .button.creation2 {
background-color: #3465A4; background-color: #3465A4;
background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
border: 1px solid #777777; border: 1px solid #777777;
color: white; color: white;
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;

View file

@ -555,13 +555,14 @@ header #banner a:hover {
outline: none; outline: none;
vertical-align: middle; vertical-align: middle;
font-weight: bolder; font-weight: bolder;
margin-left: 3px;
} }
header #banner #logo-img { header #banner #logo-img {
height: 25px; height: 25px;
margin-top: 3px; margin-top: 3px;
} }
header #banner #logo-text { header #banner #logo-text {
font-size: 21px; font-size: 20px;
position: absolute; position: absolute;
top: 10%; top: 10%;
} }
@ -716,7 +717,7 @@ nav .nav-menu.selected {
nav .nav-notify { nav .nav-notify {
display: none; display: none;
position: absolute; position: absolute;
background-color: #ff0000; background-color: #fff;
/* background-color: #19aeff; */ /* background-color: #19aeff; */
-moz-border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px;
@ -728,6 +729,7 @@ nav .nav-notify {
right: -6px; right: -6px;
min-width: 10px; min-width: 10px;
text-align: center; text-align: center;
border: 1px solid black;
} }
nav .nav-notify.show { nav .nav-notify.show {
display: block; display: block;
@ -750,7 +752,7 @@ nav #nav-home-link, #nav-directory-link, #nav-apps-link{
margin-right: 0px; margin-right: 0px;
font-weight: bold; font-weight: bold;
margin: 3px 5px; margin: 3px 5px;
font-size: 15px; font-size: 14px;
} }
nav #nav-directory-link{ nav #nav-directory-link{
margin-right: 0px; margin-right: 0px;
@ -1034,6 +1036,8 @@ aside #profiles-menu {
} }
aside #search-text { aside #search-text {
width: 173px; width: 173px;
height: 17px;
padding-left: 10px;
border-top-left-radius: 15px; border-top-left-radius: 15px;
border-top-right-radius: 15px; border-top-right-radius: 15px;
border-bottom-right-radius: 15px; border-bottom-right-radius: 15px;
@ -1669,6 +1673,7 @@ body .pageheader{
#profile-jot-submit { #profile-jot-submit {
float: right; float: right;
margin-top: 2px; margin-top: 2px;
font-size: 14px;
} }
#profile-upload-wrapper { #profile-upload-wrapper {
@ -1721,7 +1726,7 @@ body .pageheader{
float: right; float: right;
margin-left: 10px; margin-left: 10px;
margin-top: 2px; margin-top: 2px;
font-size: 10px; font-size: 9px;
font-weight: bolder; font-weight: bolder;
cursor: pointer; cursor: pointer;
} }
@ -1734,7 +1739,6 @@ body .pageheader{
.button.creation1 { .button.creation1 {
background-color: #fff; background-color: #fff;
border: 1px solid #777777; border: 1px solid #777777;
background-image: -moz-linear-gradient(center top , white 0%, #DDDDDD 100%);
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
box-shadow: 0 1px 1px #CFCFCF; box-shadow: 0 1px 1px #CFCFCF;
font-weight: bolder; font-weight: bolder;
@ -1742,7 +1746,6 @@ body .pageheader{
} }
.button.creation2 { .button.creation2 {
background-color: #3465A4; background-color: #3465A4;
background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
border: 1px solid #777777; border: 1px solid #777777;
color: white; color: white;
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;

View file

@ -17,7 +17,7 @@
<div id="close_services"> <div id="close_services">
{{ if $lastusers_title }} {{ if $lastusers_title }}
<h3>Connectable Services<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3> <h3>Connectable Services<a id="close_services_icon" onClick="close_services()" class="icon close_box" title="close"></a></h3>
<div id="right_service_icons" style="margin-left: 11px; margin-top: 5px;"> <div id="right_service_icons" style="margin-left: 16px; margin-top: 5px;">
<a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook-blue/icons/facebook.png" title="Facebook"></a> <a href="$url/facebook"><img alt="Facebook" src="view/theme/diabook-blue/icons/facebook.png" title="Facebook"></a>
<a href="$url/settings/connectors"><img alt="StatusNet" src="view/theme/diabook-blue/icons/StatusNet.png?" title="StatusNet"></a> <a href="$url/settings/connectors"><img alt="StatusNet" src="view/theme/diabook-blue/icons/StatusNet.png?" title="StatusNet"></a>
<a href="$url/settings/connectors"><img alt="LiveJournal" src="view/theme/diabook-blue/icons/livejournal.png?" title="LiveJournal"></a> <a href="$url/settings/connectors"><img alt="LiveJournal" src="view/theme/diabook-blue/icons/livejournal.png?" title="LiveJournal"></a>

View file

@ -557,15 +557,17 @@ header #banner a:hover {
outline: none; outline: none;
vertical-align: middle; vertical-align: middle;
font-weight: bolder; font-weight: bolder;
} }
header #banner #logo-img { header #banner #logo-img {
height: 25px; height: 25px;
margin-top: 3px; margin-top: 3px;
} }
header #banner #logo-text { header #banner #logo-text {
font-size: 21px; font-size: 20px;
position: absolute; position: absolute;
top: 10%; top: 10%;
margin-left: 3px;
} }
/* nav */ /* nav */
nav { nav {
@ -657,7 +659,7 @@ nav #logo-text {
nav .nav-menu-search { nav .nav-menu-search {
position: relative; position: relative;
margin: 3px 17px; margin: 4px 17px;
margin-right: 0px; margin-right: 0px;
height: 17px; height: 17px;
width: 180px; width: 180px;
@ -1037,6 +1039,8 @@ aside #profiles-menu {
} }
aside #search-text { aside #search-text {
width: 150px; width: 150px;
height: 17px;
padding-left: 10px;
border-top-left-radius: 15px; border-top-left-radius: 15px;
border-top-right-radius: 15px; border-top-right-radius: 15px;
border-bottom-right-radius: 15px; border-bottom-right-radius: 15px;
@ -1244,7 +1248,7 @@ right_aside {
/* background: #F1F1F1; */ /* background: #F1F1F1; */
} }
right_aside a{color: #ff500f;} right_aside a{color: red;}
right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px;
margin-top:30px;} margin-top:30px;}
right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; }
@ -1256,6 +1260,7 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; } right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;} #page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;} #page-sidebar-right_aside ul {margin-top: 0px;}
#page-sidebar-right_aside .label {max-width: 128px;}
right_aside .icon {width: 10px; height: 10px;} right_aside .icon {width: 10px; height: 10px;}
.close_box { .close_box {
background-image: url("../../../view/theme/diabook-red/icons/close_box.png"); background-image: url("../../../view/theme/diabook-red/icons/close_box.png");
@ -1741,7 +1746,7 @@ transition: all 0.2s ease-in-out;
#profile-jot-submit { #profile-jot-submit {
float: right; float: right;
margin-top: 2px; margin-top: 2px;
font-size: 14px;
} }
#profile-upload-wrapper { #profile-upload-wrapper {
float: left; float: left;
@ -1793,7 +1798,7 @@ transition: all 0.2s ease-in-out;
float: right; float: right;
margin-left: 10px; margin-left: 10px;
margin-top: 2px; margin-top: 2px;
font-size: 10px; font-size: 9px;
font-weight: bolder; font-weight: bolder;
cursor: pointer; cursor: pointer;
} }
@ -1806,7 +1811,6 @@ transition: all 0.2s ease-in-out;
.button.creation1 { .button.creation1 {
background-color: #fff; background-color: #fff;
border: 1px solid #777777; border: 1px solid #777777;
background-image: -moz-linear-gradient(center top , white 0%, #DDDDDD 100%);
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
box-shadow: 0 1px 1px #CFCFCF; box-shadow: 0 1px 1px #CFCFCF;
cursor: pointer; cursor: pointer;
@ -1814,7 +1818,6 @@ transition: all 0.2s ease-in-out;
} }
.button.creation2 { .button.creation2 {
background-color: #FF500F; background-color: #FF500F;
background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
border: 1px solid #777777; border: 1px solid #777777;
color: white; color: white;
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
@ -1824,12 +1827,14 @@ transition: all 0.2s ease-in-out;
font-weight: bolder; font-weight: bolder;
} }
/*input[type="submit"] { /*input[type="submit"] {
border: 0px; background-color: #FF500F;
background-color: @ButtonBackgroundColor; border: 1px solid #777777;
color: @ButtonColor; color: white;
padding: 0px 10px; border-radius: 3px 3px 3px 3px;
.rounded(5px); box-shadow: 0 1px 1px #CFCFCF;
height: 18px; margin-left: 5px;
cursor: pointer;
font-weight: bolder;
}*/ }*/
/** acl **/ /** acl **/
#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper { #photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper {

View file

@ -556,9 +556,10 @@ header #banner #logo-img {
margin-top: 3px; margin-top: 3px;
} }
header #banner #logo-text { header #banner #logo-text {
font-size: 21px; font-size: 20px;
position: absolute; position: absolute;
top: 10%; top: 10%;
margin-left: 3px;
} }
/* nav */ /* nav */
nav { nav {
@ -642,7 +643,7 @@ nav #logo-text {
nav .nav-menu-search { nav .nav-menu-search {
position: relative; position: relative;
margin: 3px 17px; margin: 4px 17px;
margin-right: 0px; margin-right: 0px;
height: 17px; height: 17px;
width: 180px; width: 180px;
@ -1020,6 +1021,8 @@ aside #profiles-menu {
} }
aside #search-text { aside #search-text {
width: 150px; width: 150px;
height: 17px;
padding-left: 10px;
border-top-left-radius: 15px; border-top-left-radius: 15px;
border-top-right-radius: 15px; border-top-right-radius: 15px;
border-bottom-right-radius: 15px; border-bottom-right-radius: 15px;
@ -1227,7 +1230,7 @@ right_aside {
/* background: #F1F1F1; */ /* background: #F1F1F1; */
} }
right_aside a{color: #ff500f;} right_aside a{color: red;}
right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px;
margin-top:30px;} margin-top:30px;}
right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; }
@ -1239,6 +1242,7 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow:
right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; } right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; }
#page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;} #page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;}
#page-sidebar-right_aside ul {margin-top: 0px;} #page-sidebar-right_aside ul {margin-top: 0px;}
#page-sidebar-right_aside .label {max-width: 128px;}
right_aside .icon {width: 10px; height: 10px;} right_aside .icon {width: 10px; height: 10px;}
.close_box { .close_box {
background-image: url("../../../view/theme/diabook-red/icons/close_box.png"); background-image: url("../../../view/theme/diabook-red/icons/close_box.png");
@ -1719,6 +1723,7 @@ transition: all 0.2s ease-in-out;
#profile-jot-submit { #profile-jot-submit {
float: right; float: right;
margin-top: 2px; margin-top: 2px;
font-size: 14px;
} }
#profile-upload-wrapper { #profile-upload-wrapper {
@ -1771,7 +1776,7 @@ transition: all 0.2s ease-in-out;
float: right; float: right;
margin-left: 10px; margin-left: 10px;
margin-top: 2px; margin-top: 2px;
font-size: 10px; font-size: 9px;
font-weight: bolder; font-weight: bolder;
cursor: pointer; cursor: pointer;
} }
@ -1784,7 +1789,6 @@ transition: all 0.2s ease-in-out;
.button.creation1 { .button.creation1 {
background-color: #fff; background-color: #fff;
border: 1px solid #777777; border: 1px solid #777777;
background-image: -moz-linear-gradient(center top , white 0%, #DDDDDD 100%);
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
box-shadow: 0 1px 1px #CFCFCF; box-shadow: 0 1px 1px #CFCFCF;
font-weight: bolder; font-weight: bolder;
@ -1792,7 +1796,6 @@ transition: all 0.2s ease-in-out;
} }
.button.creation2 { .button.creation2 {
background-color: #FF500F; background-color: #FF500F;
background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
border: 1px solid #777777; border: 1px solid #777777;
color: white; color: white;
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;

View file

@ -561,9 +561,10 @@ header #banner #logo-img {
margin-top: 3px; margin-top: 3px;
} }
header #banner #logo-text { header #banner #logo-text {
font-size: 21px; font-size: 20px;
position: absolute; position: absolute;
top: 10%; top: 10%;
margin-left: 3px;
} }
/* nav */ /* nav */
nav { nav {
@ -655,7 +656,7 @@ nav #logo-text {
nav .nav-menu-search { nav .nav-menu-search {
position: relative; position: relative;
margin: 3px 17px; margin: 4px 17px;
margin-right: 0px; margin-right: 0px;
height: 17px; height: 17px;
width: 180px; width: 180px;
@ -1034,6 +1035,8 @@ aside #profiles-menu {
} }
aside #search-text { aside #search-text {
width: 173px; width: 173px;
height: 17px;
padding-left: 10px;
border-top-left-radius: 15px; border-top-left-radius: 15px;
border-top-right-radius: 15px; border-top-right-radius: 15px;
border-bottom-right-radius: 15px; border-bottom-right-radius: 15px;
@ -1665,7 +1668,7 @@ body .pageheader{
#profile-jot-submit { #profile-jot-submit {
float: right; float: right;
margin-top: 2px; margin-top: 2px;
font-size: 14px;
} }
#profile-upload-wrapper { #profile-upload-wrapper {
float: left; float: left;
@ -1717,7 +1720,7 @@ body .pageheader{
float: right; float: right;
margin-left: 10px; margin-left: 10px;
margin-top: 2px; margin-top: 2px;
font-size: 10px; font-size: 9px;
font-weight: bolder; font-weight: bolder;
cursor: pointer; cursor: pointer;
} }
@ -1730,7 +1733,6 @@ body .pageheader{
.button.creation1 { .button.creation1 {
background-color: #fff; background-color: #fff;
border: 1px solid #777777; border: 1px solid #777777;
background-image: -moz-linear-gradient(center top , white 0%, #DDDDDD 100%);
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
box-shadow: 0 1px 1px #CFCFCF; box-shadow: 0 1px 1px #CFCFCF;
font-weight: bolder; font-weight: bolder;
@ -1738,7 +1740,6 @@ body .pageheader{
} }
.button.creation2 { .button.creation2 {
background-color: #FF500F; background-color: #FF500F;
background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
border: 1px solid #777777; border: 1px solid #777777;
color: white; color: white;
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

View file

@ -1,56 +0,0 @@
<?php
/*
* Name: quattro-green
* Description: Green variation of the quattro theme
* Version: 1.0
* Author: Fabio Communi <fabrix.xm@gmail.com>
* Maintainer: Tobias Diekershoff
*/
$a->theme_info = array(
'extends' => 'quattro',
);
$a->hooks[] = array('plugin_settings', 'view/theme/quattro-green/theme.php', 'quattro_green_settings');
$a->hooks[] = array('plugin_settings_post', 'view/theme/quattro-green/theme.php', 'quattro_green_settings_post');
function quattro_green_settings(&$a, &$o){
if(!local_user())
return;
$align = get_pconfig(local_user(), 'quattro', 'align' );
$t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
$o .= replace_macros($t, array(
'$submit' => t('Submit'),
'$baseurl' => $a->get_baseurl(),
'$title' => t("Theme settings"),
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
));
}
function quattro_green_settings_post(&$a){
if(! local_user())
return;
if (isset($_POST['quattro-settings-submit'])){
set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
}
goaway($a->get_baseurl()."/settings/addon");
}
$quattro_align = get_pconfig(local_user(), 'quattro', 'align' );
if(local_user() && $quattro_align=="center"){
$a->page['htmlhead'].="
<style>
html { width: 100%; margin:0px; padding:0px; }
body {
margin: 50px auto;
width: 900px;
}
</style>
";
}

View file

@ -1,11 +0,0 @@
<div class="settings-block">
<h3 class="settings-heading">$title</h3>
{{inc field_select.tpl with $field=$align}}{{endinc}}
<div class="settings-submit-wrapper">
<input type="submit" value="$submit" class="settings-submit" name="quattro-settings-submit" />
</div>
</div>

View file

@ -0,0 +1,39 @@
<?php
/**
* Theme settings
*/
function theme_content(&$a){
if(!local_user())
return;
$align = get_pconfig(local_user(), 'quattro', 'align' );
$color = get_pconfig(local_user(), 'quattro', 'color' );
$colors = array(
"dark"=>"Quattro",
"green"=>"Green"
);
$t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
$o .= replace_macros($t, array(
'$submit' => t('Submit'),
'$baseurl' => $a->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),
));
return $o;
}
function theme_post(&$a){
if(! local_user())
return;
if (isset($_POST['quattro-settings-submit'])){
set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
}
}

View file

@ -0,0 +1,4 @@
##
style.css : style.less colors.less ../icons.less ../quattro.less
lessc style.less > style.css

View file

@ -231,7 +231,8 @@ body {
h4 { h4 {
font-size: 1.1em; font-size: 1.1em;
} }
a, a:link { a,
a:link {
color: #005c94; color: #005c94;
text-decoration: none; text-decoration: none;
} }
@ -449,7 +450,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px; right: 0px;
left: auto; left: auto;
} }
nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify { nav #nav-notifications-linkmenu.on .icon.s22.notify,
nav #nav-notifications-linkmenu.selected .icon.s22.notify {
background-image: url("../../../images/icons/22/notify_on.png"); background-image: url("../../../images/icons/22/notify_on.png");
} }
nav #nav-apps-link.selected { nav #nav-apps-link.selected {
@ -627,11 +629,15 @@ aside #profiles-menu {
height: 48px; height: 48px;
} }
/* group member */ /* group member */
#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper { #contact-edit-drop-link,
.mail-list-delete-wrapper,
.group-delete-wrapper {
float: right; float: right;
margin-right: 50px; margin-right: 50px;
} }
#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide { #contact-edit-drop-link .drophide,
.mail-list-delete-wrapper .drophide,
.group-delete-wrapper .drophide {
background-image: url('../../../images/icons/22/delete.png'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -640,7 +646,9 @@ aside #profiles-menu {
position: relative; position: relative;
top: -50px; top: -50px;
} }
#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop { #contact-edit-drop-link .drop,
.mail-list-delete-wrapper .drop,
.group-delete-wrapper .drop {
background-image: url('../../../images/icons/22/delete.png'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -769,7 +777,8 @@ section {
display: table; display: table;
width: 780px; width: 780px;
} }
.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom { .wall-item-container .wall-item-item,
.wall-item-container .wall-item-bottom {
display: table-row; display: table-row;
} }
.wall-item-container .wall-item-bottom { .wall-item-container .wall-item-bottom {
@ -807,11 +816,13 @@ section {
.wall-item-container .wall-item-content img { .wall-item-container .wall-item-content img {
max-width: 710px; max-width: 710px;
} }
.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions { .wall-item-container .wall-item-links,
.wall-item-container .wall-item-actions {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }
.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon { .wall-item-container .wall-item-links .icon,
.wall-item-container .wall-item-actions .icon {
opacity: 0.5; opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out;
@ -819,7 +830,8 @@ section {
-ms-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
} }
.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover { .wall-item-container .wall-item-links .icon:hover,
.wall-item-container .wall-item-actions .icon:hover {
opacity: 1; opacity: 1;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out;
@ -944,9 +956,6 @@ section {
opacity: 0.5; opacity: 0.5;
} }
.wwto { .wwto {
position: absolute !important;
width: 25px;
height: 25px;
background: #FFFFFF; background: #FFFFFF;
border: 2px solid #364e59; border: 2px solid #364e59;
height: 25px; height: 25px;
@ -1164,7 +1173,9 @@ section {
height: 18px; height: 18px;
}*/ }*/
/** acl **/ /** acl **/
#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper { #photo-edit-perms-select,
#photos-upload-permissions-wrapper,
#profile-jot-acl-wrapper {
display: block!important; display: block!important;
} }
#acl-wrapper { #acl-wrapper {
@ -1323,10 +1334,12 @@ ul.tabs li .active {
float: left; float: left;
width: 200px; width: 200px;
} }
.field input, .field textarea { .field input,
.field textarea {
width: 400px; width: 400px;
} }
.field input[type="checkbox"], .field input[type="radio"] { .field input[type="checkbox"],
.field input[type="radio"] {
width: auto; width: auto;
} }
.field textarea { .field textarea {

View file

@ -6,8 +6,8 @@
// $ lessc style.less > style.css // $ lessc style.less > style.css
@import "colors"; @import "colors";
@import "icons"; @import "../icons";
@import "quattro"; @import "../quattro";

View file

@ -0,0 +1,4 @@
##
style.css : style.less colors.less ../icons.less ../quattro.less
lessc style.less > style.css

View file

@ -231,7 +231,8 @@ body {
h4 { h4 {
font-size: 1.1em; font-size: 1.1em;
} }
a, a:link { a,
a:link {
color: #009100; color: #009100;
text-decoration: none; text-decoration: none;
} }
@ -449,7 +450,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px; right: 0px;
left: auto; left: auto;
} }
nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify { nav #nav-notifications-linkmenu.on .icon.s22.notify,
nav #nav-notifications-linkmenu.selected .icon.s22.notify {
background-image: url("../../../images/icons/22/notify_on.png"); background-image: url("../../../images/icons/22/notify_on.png");
} }
nav #nav-apps-link.selected { nav #nav-apps-link.selected {
@ -627,11 +629,15 @@ aside #profiles-menu {
height: 48px; height: 48px;
} }
/* group member */ /* group member */
#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper { #contact-edit-drop-link,
.mail-list-delete-wrapper,
.group-delete-wrapper {
float: right; float: right;
margin-right: 50px; margin-right: 50px;
} }
#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide { #contact-edit-drop-link .drophide,
.mail-list-delete-wrapper .drophide,
.group-delete-wrapper .drophide {
background-image: url('../../../images/icons/22/delete.png'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -640,7 +646,9 @@ aside #profiles-menu {
position: relative; position: relative;
top: -50px; top: -50px;
} }
#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop { #contact-edit-drop-link .drop,
.mail-list-delete-wrapper .drop,
.group-delete-wrapper .drop {
background-image: url('../../../images/icons/22/delete.png'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -769,7 +777,8 @@ section {
display: table; display: table;
width: 780px; width: 780px;
} }
.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom { .wall-item-container .wall-item-item,
.wall-item-container .wall-item-bottom {
display: table-row; display: table-row;
} }
.wall-item-container .wall-item-bottom { .wall-item-container .wall-item-bottom {
@ -807,11 +816,13 @@ section {
.wall-item-container .wall-item-content img { .wall-item-container .wall-item-content img {
max-width: 710px; max-width: 710px;
} }
.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions { .wall-item-container .wall-item-links,
.wall-item-container .wall-item-actions {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }
.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon { .wall-item-container .wall-item-links .icon,
.wall-item-container .wall-item-actions .icon {
opacity: 0.5; opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out;
@ -819,7 +830,8 @@ section {
-ms-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
} }
.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover { .wall-item-container .wall-item-links .icon:hover,
.wall-item-container .wall-item-actions .icon:hover {
opacity: 1; opacity: 1;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out;
@ -944,9 +956,6 @@ section {
opacity: 0.5; opacity: 0.5;
} }
.wwto { .wwto {
position: absolute !important;
width: 25px;
height: 25px;
background: #FFFFFF; background: #FFFFFF;
border: 2px solid #364e59; border: 2px solid #364e59;
height: 25px; height: 25px;
@ -1164,7 +1173,9 @@ section {
height: 18px; height: 18px;
}*/ }*/
/** acl **/ /** acl **/
#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper { #photo-edit-perms-select,
#photos-upload-permissions-wrapper,
#profile-jot-acl-wrapper {
display: block!important; display: block!important;
} }
#acl-wrapper { #acl-wrapper {
@ -1323,10 +1334,12 @@ ul.tabs li .active {
float: left; float: left;
width: 200px; width: 200px;
} }
.field input, .field textarea { .field input,
.field textarea {
width: 400px; width: 400px;
} }
.field input[type="checkbox"], .field input[type="radio"] { .field input[type="checkbox"],
.field input[type="radio"] {
width: auto; width: auto;
} }
.field textarea { .field textarea {

View file

@ -6,8 +6,8 @@
// $ lessc style.less > style.css // $ lessc style.less > style.css
@import "colors"; @import "colors";
@import "../quattro/icons"; @import "../icons";
@import "../quattro/quattro"; @import "../quattro";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -0,0 +1,9 @@
<?php
$color = get_pconfig(local_user(), "quattro","color");
if ($color===false) $color="dark";
if (file_exists("$THEMEPATH/$color/style.css")){
echo file_get_contents("$THEMEPATH/$color/style.css");
}

View file

@ -1,33 +1,7 @@
<?php <?php
$a->hooks[] = array('plugin_settings', 'view/theme/quattro/theme.php', 'quattro_settings');
$a->hooks[] = array('plugin_settings_post', 'view/theme/quattro/theme.php', 'quattro_settings_post');
function quattro_settings(&$a, &$o){
if(!local_user())
return;
$align = get_pconfig(local_user(), 'quattro', 'align' );
$t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
$o .= replace_macros($t, array(
'$submit' => t('Submit'),
'$baseurl' => $a->get_baseurl(),
'$title' => t("Theme settings"),
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
));
}
function quattro_settings_post(&$a){
if(! local_user())
return;
if (isset($_POST['quattro-settings-submit'])){
set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
}
goaway($a->get_baseurl()."/settings/addon");
}
$quattro_align = get_pconfig(local_user(), 'quattro', 'align' ); $quattro_align = get_pconfig(local_user(), 'quattro', 'align' );

View file

@ -1,11 +1,8 @@
<div class="settings-block"> {{inc field_select.tpl with $field=$color}}{{endinc}}
<h3 class="settings-heading">$title</h3>
{{inc field_select.tpl with $field=$align}}{{endinc}} {{inc field_select.tpl with $field=$align}}{{endinc}}
<div class="settings-submit-wrapper"> <div class="settings-submit-wrapper">
<input type="submit" value="$submit" class="settings-submit" name="quattro-settings-submit" /> <input type="submit" value="$submit" class="settings-submit" name="quattro-settings-submit" />
</div>
</div> </div>