]> git.mxchange.org Git - friendica.git/commitdiff
proxy: Added support for long addresses. "vier": New style "Plus"
authorMichael Vogel <icarus@dabo.de>
Fri, 15 Aug 2014 23:40:38 +0000 (01:40 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 15 Aug 2014 23:40:38 +0000 (01:40 +0200)
mod/proxy.php
view/theme/vier/config.php
view/theme/vier/css/font2.css
view/theme/vier/plus.css [new file with mode: 0644]
view/theme/vier/style.css
view/theme/vier/templates/comment_item.tpl
view/theme/vier/theme.php

index 77515bb8881030e2526824b6d7abdae6fa54d4e6..d82d334cec360b8d4e79ceabe601a9fbc4408fda 100644 (file)
@@ -47,7 +47,7 @@ function proxy_init() {
        $direct_cache = (is_dir($_SERVER["DOCUMENT_ROOT"]."/proxy") AND is_writable($_SERVER["DOCUMENT_ROOT"]."/proxy"));
 
        // Look for filename in the arguments
-       if (isset($a->argv[1]) OR isset($a->argv[2]) OR isset($a->argv[3])) {
+       if ((isset($a->argv[1]) OR isset($a->argv[2]) OR isset($a->argv[3])) AND !isset($_REQUEST["url"])) {
                if (isset($a->argv[3]))
                        $url = $a->argv[3];
                elseif (isset($a->argv[2]))
@@ -78,7 +78,8 @@ function proxy_init() {
 
                if ($url)
                        $_REQUEST['url'] = $url;
-       }
+       } else
+               $direct_cache = false;
 
        if (!$direct_cache) {
                $urlhash = 'pic:' . sha1($_REQUEST['url']);
@@ -210,11 +211,16 @@ function proxy_init() {
 function proxy_url($url, $writemode = false) {
        global $_SERVER;
 
+       $a = get_app();
+
        // Only continue if it isn't a local image and the isn't deactivated
-       if (get_config("system", "proxy_disabled") OR proxy_is_local_image($url))
+       if (proxy_is_local_image($url)) {
+               $url = str_replace(normalise_link($a->get_baseurl())."/", $a->get_baseurl()."/", $url);
                return($url);
+       }
 
-       $a = get_app();
+       if (get_config("system", "proxy_disabled"))
+               return($url);
 
        // Creating a sub directory to reduce the amount of files in the cache directory
        $basepath = $_SERVER["DOCUMENT_ROOT"]."/proxy";
@@ -246,8 +252,11 @@ function proxy_url($url, $writemode = false) {
        $proxypath = $a->get_baseurl()."/proxy/".$path;
 
        // Too long files aren't supported by Apache
-       if (strlen($proxypath) > 250)
-               return ($url);
+       // Writemode in combination with long files shouldn't be possible
+       if ((strlen($proxypath) > 250) AND $writemode)
+               return (hash("md5", $url));
+       elseif (strlen($proxypath) > 250)
+               return ($a->get_baseurl()."/proxy/".hash("md5", $url)."?url=".urlencode($url));
        elseif ($writemode)
                return ($path);
        else
@@ -303,5 +312,8 @@ function proxy_img_cb($matches) {
 }
 
 function proxy_parse_html($html) {
+       $a = get_app();
+       $html = str_replace(normalise_link($a->get_baseurl())."/", $a->get_baseurl()."/", $html);
+
        return preg_replace_callback("/(<img [^>]*src *= *[\"'])([^\"']+)([\"'][^>]*>)/siU", "proxy_img_cb", $html);
 }
index 8736dfe840fe76429dc7154dbab1a5acc2091ac1..286639d2858dec8a77dee78ced7d690187978bb8 100644 (file)
@@ -44,7 +44,8 @@ function vier_form(&$a, $style){
                "shadow"=>"Shadow",
                "flat"=>"Flat",
                "netcolour"=>"Coloured Networks",
-               "breathe"=>"Breathe"
+               "breathe"=>"Breathe",
+               "plus"=>"Plus"
        );
        $t = get_markup_template("theme_settings.tpl" );
        $o .= replace_macros($t, array(
index a0afe8c045e692774f3882155bb1256ef3a9368f..093982508bc729c0e3d97516f7689b75ffb29088 100644 (file)
@@ -140,7 +140,8 @@ li.icon.icon-large:before {
 .icon-bookmark:before             { content: "\f02e"; }
 .icon-print:before                { content: "\f02f"; }
 
-.icon.camera:before               { content: "\f030"; }
+.icon-camera:before               { content: "\f030"; }
+.icon.camera:before               { content: "\f03e"; }
 .icon-font:before                 { content: "\f031"; }
 .icon-bold:before                 { content: "\f032"; }
 .icon-italic:before               { content: "\f033"; }
@@ -198,7 +199,7 @@ li.icon.icon-large:before {
 .icon.add:before                  { content: "\f067"; }
 .icon-minus:before                { content: "\f068"; }
 .icon-asterisk:before             { content: "\f069"; }
-.icon.notify:before               { content: "\f06a"; }
+.icon.exclamation:before          { content: "\f06a"; }
 .icon-gift:before                 { content: "\f06b"; }
 .icon-leaf:before                 { content: "\f06c"; }
 .icon-fire:before                 { content: "\f06d"; }
@@ -254,7 +255,7 @@ li.icon.icon-large:before {
 
 .icon-hdd:before                  { content: "\f0a0"; }
 .icon-bullhorn:before             { content: "\f0a1"; }
-.icon-bell:before                 { content: "\f0a2"; }
+.icon.notify:before               { content: "\f0a2"; }
 .icon-certificate:before          { content: "\f0a3"; }
 .icon-hand-right:before           { content: "\f0a4"; }
 .icon-hand-left:before            { content: "\f0a5"; }
diff --git a/view/theme/vier/plus.css b/view/theme/vier/plus.css
new file mode 100644 (file)
index 0000000..baaffb8
--- /dev/null
@@ -0,0 +1,141 @@
+nav {
+  background: #fff;
+  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15);
+  padding-top: 6px;
+  padding-bottom: 6px;
+}
+
+nav a:active,
+nav a:link,
+nav a:visited,
+nav a {
+  color: #737373;
+}
+
+nav a:hover,
+#nav-messages-see-all a:hover {
+  color: #000;
+}
+
+nav .nav-notify {
+/*  background-color: #427FED; */
+  background-color: #CB4437;
+  top: -3px;
+  right: -4px;
+  font: bold 11px/16px Arial;
+  padding: 1px;
+  border-radius: 10px;
+}
+
+nav .nav-menu-icon .nav-notify {
+  top: 0px;
+}
+
+nav .nav-menu.selected a {
+  color: #000;
+/*  font-weight: bold; */
+}
+
+nav .nav-menu:hover,
+nav .nav-menu.selected {
+  border-bottom: 2px solid #427FED;
+}
+
+nav .nav-menu {
+  height: 23px;
+  font-size: 14px;
+  font-weight: initial;
+}
+
+#nav-site-menu,
+#nav-notifications-menu,
+#nav-user-menu {
+  top: 35px;
+}
+
+#nav-messages-menu {
+  top: 32px;
+}
+
+#nav-messages-see-all a {
+  color: #737373;
+}
+
+ul.tabs li .active, span.pager_current a {
+  border-bottom: 2px solid #427FED;
+}
+
+span.pager_current, span.pager_n a:hover, 
+span.pager_first a:hover, span.pager_last a:hover, 
+span.pager_prev a:hover, span.pager_next a:hover,
+ul.tabs a:hover {
+  border-bottom: 2px solid #427FED;
+}
+
+nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify {
+  color: #737373;
+}
+
+nav #nav-messages-linkmenu.selected,
+nav #nav-user-linklabel.selected,
+nav #nav-apps-link.selected {
+  background-color: #fff;
+  border-bottom-style: none;
+}
+
+div.jGrowl div.info {
+  background: #fff url("../../../images/icons/48/info.png") no-repeat 5px center;
+}
+
+nav .nav-menu-icon.selected {
+  background-color: #fff;
+}
+
+#jot #jot-tools li:hover {
+  background-color: #fff;
+}
+
+nav .icon {
+  color: #737373;
+}
+
+nav a:hover .icon {
+  color: #000;
+}
+
+ul.menu-popup {
+  border: 0px solid #FFF;
+  margin-top: 0px;
+}
+
+header #banner a, header #banner a:active, header #banner a:visited, header #banner a:link, header #banner a:hover {
+  color: #737373;
+}
+
+header {
+  left: 10px;
+}
+
+header #banner {
+  margin-top: 6px;
+}
+
+#banner #logo-text {
+  margin-left: 5px;
+}
+
+aside {
+  top: 44px;
+  height: calc(100% - 54px);
+}
+
+section {
+  top: 44px;
+}
+
+nav #search-box #search-text {
+  background-color: initial;
+  border-style: solid;
+  border-width: 1px;
+  border-color: rgba(0, 0, 0, 0.15);
+}
index 3fec53fcfe2aa6f74fe4cf1371247afc1fe4d1b3..88f310b26a96b535d46a1fdc89af6c98d0e910ed 100644 (file)
@@ -1987,6 +1987,7 @@ ul.tabs li .active, span.pager_current a {
 .comment-edit-bb a {
   color: #888;
   padding: 0px 5px 1px 5px;
+  cursor: pointer;
 }
 
 .comment-edit-bb a:hover {
index 7cbc02e0602418e705cd9a8b5db7e5ca83b37a3c..833cf1828c368a86943e573ba52eb1302efb08be 100644 (file)
 
                                <div class="comment-edit-bb">
                                        <a title="{{$edimg}}" onclick="insertFormatting('{{$comment}}','img',{{$id}});"><i class="icon-picture"></i></a>      
-                                       <a title="{{$edurl}}" onclick="insertFormatting('{{$comment}}','url',{{$id}});"><i class="icon-bookmark"></i></a>
+                                       <a title="{{$edurl}}" onclick="insertFormatting('{{$comment}}','url',{{$id}});"><i class="icon-link"></i></a>
                                        <a title="{{$edvideo}}" onclick="insertFormatting('{{$comment}}','video',{{$id}});"><i class="icon-film"></i></a>
                                                                                 
                                        <a title="{{$eduline}}" onclick="insertFormatting('{{$comment}}','u',{{$id}});"><i class="icon-underline"></i></a>
                                        <a title="{{$editalic}}" onclick="insertFormatting('{{$comment}}','i',{{$id}});"><i class="icon-italic"></i></a>
                                        <a title="{{$edbold}}" onclick="insertFormatting('{{$comment}}','b',{{$id}});"><i class="icon-bold"></i></a>
-                                       <a title="{{$edquote}}" onclick="insertFormatting('{{$comment}}','quote',{{$id}});"><i class="icon-comments"></i></a>
+                                       <a title="{{$edquote}}" onclick="insertFormatting('{{$comment}}','quote',{{$id}});"><i class="icon-quote-left"></i></a>
 
                                 </div>
                                        <input type="submit" onclick="post_comment({{$id}}); return false;" id="comment-edit-submit-{{$id}}" class="comment-edit-submit" name="submit" value="{{$submit}}" />
index 928ab6c8b2a4f49303a7c12831a1946d63774a3f..779a5ce4a9759c1e8cad2098a595970bc712b9e8 100644 (file)
@@ -26,11 +26,17 @@ else if ($style == "netcolour")
        $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/netcolour.css" type="text/css" media="screen"/>'."\n";
 else if ($style == "breathe")
        $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/breathe.css" type="text/css" media="screen"/>'."\n";
+else if ($style == "plus")
+       $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/plus.css" type="text/css" media="screen"/>'."\n";
 
 $a->page['htmlhead'] .= <<< EOT
 <script type="text/javascript" src="$baseurl/view/theme/vier/js/jquery.divgrow-1.3.1.f1.min.js"></script>
 <script>
 
+function showHideASide(e) {
+       var mouse_pos(e);
+}
+
 function collapseHeight(elems) {
        var elemName = '.wall-item-body:not(.divmore)';
        if(typeof elems != 'undefined') {