]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #792 from annando/master
authorfabrixxm <fabrix.xm@gmail.com>
Wed, 23 Oct 2013 07:02:51 +0000 (00:02 -0700)
committerfabrixxm <fabrix.xm@gmail.com>
Wed, 23 Oct 2013 07:02:51 +0000 (00:02 -0700)
Bugfix: The function "exif_imagetype" doesn't seem to be available at every system. So we emulate it.

16 files changed:
boot.php
mod/admin.php
view/templates/admin_site.tpl
view/theme/quattro/dark/style.css
view/theme/quattro/green/style.css
view/theme/quattro/icons.less
view/theme/quattro/icons/contacts3.png [new file with mode: 0644]
view/theme/quattro/icons/contacts_off.png [new file with mode: 0644]
view/theme/quattro/icons/contacts_on.png [new file with mode: 0644]
view/theme/quattro/icons/messages_off.png [new file with mode: 0644]
view/theme/quattro/icons/messages_on.png [new file with mode: 0644]
view/theme/quattro/lilac/style.css
view/theme/quattro/quattro.less
view/theme/quattro/templates/nav.tpl
view/theme/quattro/templates/profile_vcard.tpl
view/theme/quattro/theme.php

index af164ec4249caf90b71badd2601806106f584abe..e94cdcd9007fae6b3de8f8c8d977fbc1735a7577 100644 (file)
--- 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') {
index 3a3fe6632ad4d8caee129d16e91bd131503e4266..9215eed82eaee1145f368f20c6b530d36579fb79 100644 (file)
@@ -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 = '<a href="http://friendica.com"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="http://friendica.com">Friendica</a></span>';
        $banner = htmlspecialchars($banner);
+       $info = get_config('config','info');
+       $info = htmlspecialchars($info);
 
        //echo "<pre>"; var_dump($lang_choices); die("</pre>");
 
@@ -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 - <a href='#' id='cnftheme'>change theme settings</a>"), $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."),
index bc7ed79377c78d6abafee1f9efc940c8c9c2dcc8..68ba5b32ce307e20f3ca580482bcd71867a9b51a 100644 (file)
@@ -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}}
        {{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}}
 
        <h3>{{$performance}}</h3>
        {{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
index 02d18d23755bd595549c95ad2f428a32bb547674..e72e557038b602618d6ffa6df8b106e8621037bc 100644 (file)
 .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");
 }
 .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");
 }
 .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");
 }
 .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");
 }
 .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;
 }
index 1f1d85e80600edfb2dc63fb79e711ce11d00285e..8e6a020b8ae9f02e5c91e1b86420ab23a9214d32 100644 (file)
 .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");
 }
 .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");
 }
 .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");
 }
 .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");
 }
 .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;
 }
index f9be4cc7237a722d4390733c56ae062c18b913ff..13a2b49bbab5603e51e205933ad215c72a2c4508 100644 (file)
@@ -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 (file)
index 0000000..8a3e69e
Binary files /dev/null and b/view/theme/quattro/icons/contacts3.png differ
diff --git a/view/theme/quattro/icons/contacts_off.png b/view/theme/quattro/icons/contacts_off.png
new file mode 100644 (file)
index 0000000..4345d47
Binary files /dev/null and b/view/theme/quattro/icons/contacts_off.png differ
diff --git a/view/theme/quattro/icons/contacts_on.png b/view/theme/quattro/icons/contacts_on.png
new file mode 100644 (file)
index 0000000..e7f2a39
Binary files /dev/null and b/view/theme/quattro/icons/contacts_on.png differ
diff --git a/view/theme/quattro/icons/messages_off.png b/view/theme/quattro/icons/messages_off.png
new file mode 100644 (file)
index 0000000..70ab1c7
Binary files /dev/null and b/view/theme/quattro/icons/messages_off.png differ
diff --git a/view/theme/quattro/icons/messages_on.png b/view/theme/quattro/icons/messages_on.png
new file mode 100644 (file)
index 0000000..f831813
Binary files /dev/null and b/view/theme/quattro/icons/messages_on.png differ
index 2dce3ee1a306f619e3b08dfe94339539b24e8063..d35ad52ed092920fce8ef4f8c41f97e3e22e8f48 100644 (file)
 .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");
 }
 .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");
 }
 .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");
 }
 .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");
 }
 .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: #cbd38d;
 }
index f13ae9064768bddb601a1f262ea6737eb5773355..6287a05ef8f6d204bc1b509983ce03be7c838f83 100644 (file)
@@ -215,7 +215,11 @@ nav {
                }
        
                #nav-notifications-linkmenu.on .icon.s22.notify,
-               #nav-notifications-linkmenu.selected .icon.s22.notify { background-image: url("../../../images/icons/22/notify_on.png") }
+               #nav-notifications-linkmenu.selected .icon.s22.notify   { background-image: url("../../../images/icons/22/notify_on.png") }
+        #nav-introductions-link.on .icon.s22.intro,
+               #nav-introductions-link.selected .icon.s22.intro        { background-image: url("icons/contacts_on.png") }
+               #nav-messages-link.on .icon.s22.mail,
+               #nav-messages-link.selected .icon.s22.mail              { background-image: url("icons/messages_on.png") }              
                #nav-apps-link.selected { background-color: @NavbarSelectedBg; }
 }
 
index 2118c1e348d7cb8ea583b3109a5d1a32f52ef66f..2c646306ad3b2f014cbe8d3052f3ece7a8056342 100644 (file)
@@ -1,8 +1,3 @@
-{{*
- *     AUTOMATICALLY GENERATED TEMPLATE
- *     DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
 <header>
        {{* {{$langselector}} *}}
 
                        </li>
                {{/if}}
                
+               {{if $nav.introductions}}
+                       <li id="nav-introductions-link" class="nav-menu-icon {{$sel.introductions}}">
+                               <a class="{{$nav.introductions.2}}" href="{{$nav.introductions.0}}" title="{{$nav.introductions.3}}" >
+                                   <span class="icon s22 intro">{{$nav.introductions.1}}</a>
+                               </a>
+                               <span id="intro-update" class="nav-notify"></span>
+                       </li>
+               {{/if}}
+               
+               {{if $nav.messages}}
+                       <li id="nav-messages-link" class="nav-menu-icon {{$sel.messages}}">
+                               <a class="{{$nav.messages.2}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" >
+                                   <span class="icon s22 mail">{{$nav.messages.1}}</a>
+                               </a>
+                               <span id="mail-update" class="nav-notify"></span>
+                       </li>
+               {{/if}}
+
+
+               
                {{if $nav.notifications}}
                        <li  id="nav-notifications-linkmenu" class="nav-menu-icon"><a href="{{$nav.notifications.0}}" rel="#nav-notifications-menu" title="{{$nav.notifications.1}}"><span class="icon s22 notify">{{$nav.notifications.1}}</span></a>
                                <span id="notify-update" class="nav-notify"></span>
index 4b1ddb6e6ec637e28cf3017ee673ed119544d905..8213a108f77d983590b2c1f67f9e24ae3ebf857a 100644 (file)
                        <div class="action">
                        <a class="icon s16 edit ttright" href="#" rel="#profiles-menu" title="{{$profile.edit.3}}"><span>{{$profile.edit.1}}</span></a>
                        <ul id="profiles-menu" class="menu-popup">
-                               {{foreach $profile.menu.entries as $e}}
-                               <li>
-                                       <a href="profiles/{{$e.id}}"><img src='{{$e.photo}}'>{{$e.profile_name}}</a>
-                               </li>
-                               {{/foreach}}
+                           {{if $profile.menu.entries}}
+                               {{foreach $profile.menu.entries as $e}}
+                               <li>
+                                       <a href="profiles/{{$e.id}}"><img src='{{$e.photo}}'>{{$e.profile_name}}</a>
+                               </li>
+                               {{/foreach}}
+                       {{else}}
+                               <li>
+                                       <a href="{{$profile.edit.0}}">{{$profile.edit.1}}</a>
+                               </li>
+                       {{/if}}
                                <li><a href="profile_photo" >{{$profile.menu.chg_photo}}</a></li>
+                               {{if $profile.menu.cr_new }}
                                <li><a href="profiles/new" id="profile-listing-new-link">{{$profile.menu.cr_new}}</a></li>
-                               
+                               {{/if}}
                        </ul>
                        </div>
                {{/if}}
index d89890da0bf934df08ff0ab17a003601407180b6..167ebc75383f1e86c13349f38c4a773273da13b5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Quattro
- * Version: 0.5
+ * Version: 0.6
  * Author: Fabio <http://kirgroup.com/profile/fabrixxm>
  * Maintainer: Fabio <http://kirgroup.com/profile/fabrixxm>
  * Maintainer: Tobias <https://diekershoff.homeunix.net/friendica/profile/tobias>
@@ -18,11 +18,29 @@ $a->page['htmlhead'] .= <<< EOT
 $(document).ready(function(){
     $('nav').bind('nav-update', function(e,data){
         var notifCount = $(data).find('notif').attr('count');
+        var intro = $(data).find('intro').text();
+        var mail = $(data).find('mail').text();
+        
+        console.log(intro,mail);
+        
         if (notifCount > 0 ) {
             Tinycon.setBubble(notifCount);
         } else {
             Tinycon.setBubble('');
         }
+        
+        if (intro>0){
+                       $("#nav-introductions-link").addClass("on");
+               } else {
+                       $("#nav-introductions-link").removeClass("on");
+               }
+               
+        if (mail>0){
+                       $("#nav-messages-link").addClass("on");
+               } else {
+                       $("#nav-messages-link").removeClass("on");
+               }
+               
     });
 });