From 8faeee9965f2579c3c0b2e2b0f7ad1ac5f8e24f0 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 20 Oct 2013 16:17:39 +0200 Subject: [PATCH 1/4] added config->info and system-suppress_language options to the admin panel --- mod/admin.php | 11 +++++++++++ view/templates/admin_site.tpl | 2 ++ 2 files changed, 13 insertions(+) diff --git a/mod/admin.php b/mod/admin.php index 3a3fe663..9215eed8 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -239,6 +239,7 @@ function admin_page_site_post(&$a){ $sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : ''); $banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false); + $info = ((x($_POST,'info')) ? trim($_POST['info']) : false); $language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : ''); $theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : ''); $theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : ''); @@ -284,6 +285,7 @@ function admin_page_site_post(&$a){ $ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0); $old_share = ((x($_POST,'old_share')) ? True : False); $hide_help = ((x($_POST,'hide_help')) ? True : False); + $suppress_language = ((x($_POST,'suppress_language')) ? True : False); $use_fulltext_engine = ((x($_POST,'use_fulltext_engine')) ? True : False); $itemcache = ((x($_POST,'itemcache')) ? notags(trim($_POST['itemcache'])) : ''); $itemcache_duration = ((x($_POST,'itemcache_duration')) ? intval($_POST['itemcache_duration']) : 0); @@ -345,6 +347,11 @@ function admin_page_site_post(&$a){ } else { set_config('system','banner', $banner); } + if ($info=="") { + del_config('config','info'); + } else { + set_config('config','info',$info); + } set_config('system','language', $language); set_config('system','theme', $theme); if ( $theme_mobile === '---' ) { @@ -473,6 +480,8 @@ function admin_page_site(&$a) { if($banner == false) $banner = 'logoFriendica'; $banner = htmlspecialchars($banner); + $info = get_config('config','info'); + $info = htmlspecialchars($info); //echo "
"; var_dump($lang_choices); die("
"); @@ -504,6 +513,7 @@ function admin_page_site(&$a) { // name, label, value, help string, extra data... '$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'), '$banner' => array('banner', t("Banner/Logo"), $banner, ""), + '$info' => array('info',t('Additional Info'), $info, t('For public servers: you can add additional information here that will be listed at dir.friendica.com/siteinfo.')), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - change theme settings"), $theme_choices), '$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile-theme'), t("Theme for mobile devices"), $theme_choices_mobile), @@ -548,6 +558,7 @@ function admin_page_site(&$a) { '$maxloadavg' => array('maxloadavg', t("Maximum Load Average"), ((intval(get_config('system','maxloadavg')) > 0)?get_config('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")), '$use_fulltext_engine' => array('use_fulltext_engine', t("Use MySQL full text engine"), get_config('system','use_fulltext_engine'), t("Activates the full text engine. Speeds up search - but can only search for four and more characters.")), + '$suppress_language' => array('suppress_language', t("Suppress Language"), get_config('system','suppress_language'), t("Suppress language information in meta information about a posting.")), '$itemcache' => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), "The item caches buffers generated bbcode and external images."), '$itemcache_duration' => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day).")), '$lockpath' => array('lockpath', t("Path for lock file"), get_config('system','lockpath'), "The lock file is used to avoid multiple pollers at one time. Only define a folder here."), diff --git a/view/templates/admin_site.tpl b/view/templates/admin_site.tpl index bc7ed793..68ba5b32 100644 --- a/view/templates/admin_site.tpl +++ b/view/templates/admin_site.tpl @@ -51,6 +51,7 @@ {{include file="field_input.tpl" field=$sitename}} {{include file="field_textarea.tpl" field=$banner}} + {{include file="field_textarea.tpl" field=$info}} {{include file="field_select.tpl" field=$language}} {{include file="field_select.tpl" field=$theme}} {{include file="field_select.tpl" field=$theme_mobile}} @@ -108,6 +109,7 @@ {{include file="field_input.tpl" field=$lockpath}} {{include file="field_input.tpl" field=$temppath}} {{include file="field_input.tpl" field=$basepath}} + {{include file="field_checkbox.tpl" field=$suppress_language}}

{{$performance}}

{{include file="field_checkbox.tpl" field=$use_fulltext_engine}} From 008eef17c09cc7f9ab9c8d474de744679bd8a45d Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Mon, 21 Oct 2013 14:03:01 -0400 Subject: [PATCH 2/4] clear_cache() check if cache dir is writable before opening it --- boot.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boot.php b/boot.php index 57414e8f..2b58d805 100644 --- a/boot.php +++ b/boot.php @@ -2156,6 +2156,7 @@ function clear_cache($basepath = "", $path = "") { if ($cachetime == 0) $cachetime = 86400; + if (is_writable($path)){ if ($dh = opendir($path)) { while (($file = readdir($dh)) !== false) { $fullpath = $path."/".$file; @@ -2166,6 +2167,7 @@ function clear_cache($basepath = "", $path = "") { } closedir($dh); } + } } function set_template_engine(&$a, $engine = 'internal') { From 900b90ad85b51a44c3c1a426dbe8930cb25bd38e Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Tue, 22 Oct 2013 13:53:12 -0400 Subject: [PATCH 3/4] quattro theme update: icon and notification for introductions icon and notification for private messages correct link to edit profile with single profile enabled --- view/theme/quattro/dark/style.css | 38 ++++++++++++++++++ view/theme/quattro/green/style.css | 38 ++++++++++++++++++ view/theme/quattro/icons.less | 2 + view/theme/quattro/icons/contacts3.png | Bin 0 -> 559 bytes view/theme/quattro/icons/contacts_off.png | Bin 0 -> 424 bytes view/theme/quattro/icons/contacts_on.png | Bin 0 -> 383 bytes view/theme/quattro/icons/messages_off.png | Bin 0 -> 452 bytes view/theme/quattro/icons/messages_on.png | Bin 0 -> 376 bytes view/theme/quattro/lilac/style.css | 38 ++++++++++++++++++ view/theme/quattro/quattro.less | 6 ++- view/theme/quattro/templates/nav.tpl | 25 +++++++++--- .../theme/quattro/templates/profile_vcard.tpl | 19 ++++++--- view/theme/quattro/theme.php | 18 +++++++++ 13 files changed, 172 insertions(+), 12 deletions(-) create mode 100644 view/theme/quattro/icons/contacts3.png create mode 100644 view/theme/quattro/icons/contacts_off.png create mode 100644 view/theme/quattro/icons/contacts_on.png create mode 100644 view/theme/quattro/icons/messages_off.png create mode 100644 view/theme/quattro/icons/messages_on.png diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 02d18d23..e72e5570 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -19,6 +19,12 @@ .icon.notify { background-image: url("../../../images/icons/22/notify_off.png"); } +.icon.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.mail { + background-image: url("icons/messages_off.png"); +} .icon.gear { background-image: url("../../../images/icons/22/gear.png"); } @@ -83,6 +89,12 @@ .icon.s10.notify { background-image: url("../../../images/icons/10/notify_off.png"); } +.icon.s10.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s10.mail { + background-image: url("icons/messages_off.png"); +} .icon.s10.gear { background-image: url("../../../images/icons/10/gear.png"); } @@ -147,6 +159,12 @@ .icon.s16.notify { background-image: url("../../../images/icons/16/notify_off.png"); } +.icon.s16.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s16.mail { + background-image: url("icons/messages_off.png"); +} .icon.s16.gear { background-image: url("../../../images/icons/16/gear.png"); } @@ -211,6 +229,12 @@ .icon.s22.notify { background-image: url("../../../images/icons/22/notify_off.png"); } +.icon.s22.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s22.mail { + background-image: url("icons/messages_off.png"); +} .icon.s22.gear { background-image: url("../../../images/icons/22/gear.png"); } @@ -275,6 +299,12 @@ .icon.s48.notify { background-image: url("../../../images/icons/48/notify_off.png"); } +.icon.s48.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s48.mail { + background-image: url("icons/messages_off.png"); +} .icon.s48.gear { background-image: url("../../../images/icons/48/gear.png"); } @@ -589,6 +619,14 @@ 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"); } +nav #nav-introductions-link.on .icon.s22.intro, +nav #nav-introductions-link.selected .icon.s22.intro { + background-image: url("icons/contacts_on.png"); +} +nav #nav-messages-link.on .icon.s22.mail, +nav #nav-messages-link.selected .icon.s22.mail { + background-image: url("icons/messages_on.png"); +} nav #nav-apps-link.selected { background-color: #364e59; } diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 1f1d85e8..8e6a020b 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -19,6 +19,12 @@ .icon.notify { background-image: url("../../../images/icons/22/notify_off.png"); } +.icon.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.mail { + background-image: url("icons/messages_off.png"); +} .icon.gear { background-image: url("../../../images/icons/22/gear.png"); } @@ -83,6 +89,12 @@ .icon.s10.notify { background-image: url("../../../images/icons/10/notify_off.png"); } +.icon.s10.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s10.mail { + background-image: url("icons/messages_off.png"); +} .icon.s10.gear { background-image: url("../../../images/icons/10/gear.png"); } @@ -147,6 +159,12 @@ .icon.s16.notify { background-image: url("../../../images/icons/16/notify_off.png"); } +.icon.s16.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s16.mail { + background-image: url("icons/messages_off.png"); +} .icon.s16.gear { background-image: url("../../../images/icons/16/gear.png"); } @@ -211,6 +229,12 @@ .icon.s22.notify { background-image: url("../../../images/icons/22/notify_off.png"); } +.icon.s22.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s22.mail { + background-image: url("icons/messages_off.png"); +} .icon.s22.gear { background-image: url("../../../images/icons/22/gear.png"); } @@ -275,6 +299,12 @@ .icon.s48.notify { background-image: url("../../../images/icons/48/notify_off.png"); } +.icon.s48.intro { + background-image: url("icons/contacts_off.png"); +} +.icon.s48.mail { + background-image: url("icons/messages_off.png"); +} .icon.s48.gear { background-image: url("../../../images/icons/48/gear.png"); } @@ -589,6 +619,14 @@ 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"); } +nav #nav-introductions-link.on .icon.s22.intro, +nav #nav-introductions-link.selected .icon.s22.intro { + background-image: url("icons/contacts_on.png"); +} +nav #nav-messages-link.on .icon.s22.mail, +nav #nav-messages-link.selected .icon.s22.mail { + background-image: url("icons/messages_on.png"); +} nav #nav-apps-link.selected { background-color: #364e59; } diff --git a/view/theme/quattro/icons.less b/view/theme/quattro/icons.less index f9be4cc7..13a2b49b 100644 --- a/view/theme/quattro/icons.less +++ b/view/theme/quattro/icons.less @@ -3,6 +3,8 @@ .icons(@size: 22) { &.notify { background-image: url("../../../images/icons/@{size}/notify_off.png"); } + &.intro { background-image: url("icons/contacts_off.png"); } + &.mail { background-image: url("icons/messages_off.png"); } &.gear { background-image: url("../../../images/icons/@{size}/gear.png"); } &.like { background-image: url("icons/like.png"); } diff --git a/view/theme/quattro/icons/contacts3.png b/view/theme/quattro/icons/contacts3.png new file mode 100644 index 0000000000000000000000000000000000000000..8a3e69ec1f55d283e7e352b723e0b3ca66877b0e GIT binary patch literal 559 zcmV+~0?_@5P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyYz z5i&XXrG9?^00FN_L_t(I%k7oFYZPG^gr6sO3GoMrh<2tG45Sk*L<#_V3+9y;4d!IF)!;i_uH{ zQIcco?9_}K1psMPH(A?pHR!yyIFRJ$c8Y%i8~rGNhfTg`)W!6&0fy@8PIbEn-0!J6 zkz`JNpJd)~$!Q{41?~=~WH^|x&{=h^c{;xH&9pw%b)8{P=~4AslIz{Pn=X%%JXVhY z7n7{0CmYuScYv35U4PsXMJeT``T#iGDBP6Lk&`6f)T>Dbz(#v{RaIMDSV}poK1#CG zYsDlaNqgXxx&}N=vZ($5ZYNo<>-x8)l<(?%w_ZD;Q;4tXvxX2gz`G>ph7BpZCGEM| x2YhHqTaMGfmzjV0G&afy6Y6nj@5k}~@dq9uzLjY7>6icj002ovPDHLkV1h8h?m++m literal 0 HcmV?d00001 diff --git a/view/theme/quattro/icons/contacts_off.png b/view/theme/quattro/icons/contacts_off.png new file mode 100644 index 0000000000000000000000000000000000000000..4345d473afe89bb703f8a4c915c61866e5160155 GIT binary patch literal 424 zcmV;Z0ayNsP)@;wfzp!r>DUR?y28ksb55OeEGQ7?08N;vK z`9(}(^FA|9N_^NT6qR8GLk|^iIa0(c^xg-YmH5yd**}QuyTCU=km4wIgFlxOwy4+k zUEn5;Bk?^<<7YwGd{-Z^g`{j0u~vK07rrrQD|XsQ>sb*zf=^g4srWTsVhw+C<4D3) zn`orJ3HKG}Ed;9C&$3LmlG zNbAj{QmtL0zeJFBc8-GpY$g7Ug{}bgA5a*;-@>(ggR{qYHoGI^dg0kRZvOylu1B^B S7FkCC0000}U=DE| zmJJc3l3F>$By34)81Vy=-s^hofpdQ1AUvNpW>Dg&+W>csLzBQ1&`yw+zCFODT49yi zl2nAdGul@A9-VVkm5u=0z`dd95?BL~dxPpcyx3LQxpW2(z=Gp!z%Kyxm>>72RFDG&GOVo70#pco&n* z<7z$Yth2j4HZjhPx(Kt5NwUJ)EZD=fh&L;E_YcqyxQo4lW$a)p;whAk1KzG*Xu9w-bwaE z@0)Juv5rOD!hWOI(EWH8lj&={Z=T{foBth4c!I+UK7}4eTZ(rl*^_qdo2S^uo4nQ- zL)^nrwZBKH4ddBJX1jj7QbFJ2IiBKb>Z53D_*AX8qLp}mrYkN)@22hc84vL?eLUTs z5xk)bMpI6s+J~4n^Be)8GL2QyZM(>8ew^ uQtn5@MB0000F(FVg zgg~ckeW*e~Z2WcTXM2^ZG2qq%2e0S*BVNzBMu3Kh8x0hL8Yhx)7Qwo2hT25H2-xr& z1^pw`Y=Dt~BXA3(SDJ_1)Luuq@B)mlFt3}A?S%qh4NOfaE-(){skQ48R871B9)N9! zd5CSTS%tW2#51r29)W$sD~Id7xl3z*aQz{82WI{VhZ-K59?Y3pQ+a4PAV`Ybi_elW zNl%jIl3vY;oN{e$PG(JE{QHb(*yA1W0W5%f;1qC9t}V>jwe4|JSL8OB0B_ETYk5~! zboFr##K4_1u9-IWaogmT*H0V9UenNymC5TmE6V%K*~Y1y70Cr-T=e85(f=Q0aN{rH W9%m!!sJh4i0000 {{* {{$langselector}} *}} @@ -44,6 +39,26 @@ {{/if}} + {{if $nav.introductions}} + + {{/if}} + + {{if $nav.messages}} + + {{/if}} + + + {{if $nav.notifications}}